home *** CD-ROM | disk | FTP | other *** search
- 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
- From: jfh@greenber.austin.ibm.com (John F Haugh II)
- Newsgroups: comp.unix.aix
- Subject: Re: Using getgroupattr()
- Message-ID: <1992Aug25.194708.8762@awdprime.austin.ibm.com>
- Date: 25 Aug 92 19:47:08 GMT
- References: <BtI47r.6xt@watserv1.uwaterloo.ca>
- Sender: news@awdprime.austin.ibm.com (USENET News)
- Organization: Obfuscated Features "R" Us, Austin, Republica de Tejas
- Lines: 16
-
- In article <BtI47r.6xt@watserv1.uwaterloo.ca> mskucher@auk.UWaterloo.ca (Murray S. Kucherawy [MFCF]) writes:
- >The man page for getgroupattr() says that calling the routine and requesting
- >the group's users will return "a list of NULL terminated character strings.
- >The list itself is NULL terminated." I'd have thought that invoking this:
-
- The pointer that you are getting back points to a string like this
-
- "user1\0user2\0user3\0user4\0\0"
-
- So, you are seeing the first user in the first pointed to location. The
- second character pointer in your array has trash in it because the second
- user isn't pointed to by that array element, but instead is found by
- skipping past the first NUL character.
- --
- John F. Haugh II | MaBellNet: (512) 823-1078 | SneakerNet: 042/2F068
- InterNet: jfh%snowball.austin.ibm.com@ibmpa.awdpa.ibm.com [TSAKC]
-