home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9086 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.4 KB

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!greenber.austin.ibm.com!jfh
  2. From: jfh@greenber.austin.ibm.com (John F Haugh II)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: Using getgroupattr()
  5. Message-ID: <1992Aug25.194708.8762@awdprime.austin.ibm.com>
  6. Date: 25 Aug 92 19:47:08 GMT
  7. References: <BtI47r.6xt@watserv1.uwaterloo.ca>
  8. Sender: news@awdprime.austin.ibm.com (USENET News)
  9. Organization: Obfuscated Features "R" Us, Austin, Republica de Tejas
  10. Lines: 16
  11.  
  12. In article <BtI47r.6xt@watserv1.uwaterloo.ca> mskucher@auk.UWaterloo.ca (Murray S. Kucherawy [MFCF]) writes:
  13. >The man page for getgroupattr() says that calling the routine and requesting
  14. >the group's users will return "a list of NULL terminated character strings.
  15. >The list itself is NULL terminated."  I'd have thought that invoking this:
  16.  
  17. The pointer that you are getting back points to a string like this
  18.  
  19.     "user1\0user2\0user3\0user4\0\0"
  20.  
  21. So, you are seeing the first user in the first pointed to location.  The
  22. second character pointer in your array has trash in it because the second
  23. user isn't pointed to by that array element, but instead is found by
  24. skipping past the first NUL character.
  25. -- 
  26. John F. Haugh II      | MaBellNet: (512) 823-1078       | SneakerNet: 042/2F068
  27. InterNet: jfh%snowball.austin.ibm.com@ibmpa.awdpa.ibm.com               [TSAKC]
  28.