home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!mskucher
- From: mskucher@math.uwaterloo.ca (Murray S. Kucherawy [MFCF])
- Subject: Re: Using getgroupattr()
- Message-ID: <BtLrM4.JKM@math.uwaterloo.ca>
- Organization: Math Faculty Computing Facility, University of Waterloo, Canada
- References: <BtI47r.6xt@watserv1.uwaterloo.ca> <1992Aug25.194708.8762@awdprime.austin.ibm.com>
- Date: Wed, 26 Aug 1992 18:06:02 GMT
- Lines: 29
-
- jfh@greenber.austin.ibm.com (John F Haugh II) writes:
- >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.
-
- The man page for getgroupattr() says that I will get back "a list of NULL
- terminated character strings. The list itself is NULL terminated."
- That sounds to me a lot more like a vector of char pointers, something like
- argv, or something else of that nature, NOT a single string with nulls in it
- and two nulls at the end of it.
-
- Perhaps the man pages should be made more clear in this case, and in fact
- in many man pages related to getgroupattr() and getuserattr().
-
- -- Murray S. Kucherawy ----------------------------------------+--------------
- Software Systems Co-op, Math Faculty Computing Facility [MFCF] | This is a
- University of Waterloo, Ontario, Canada | machine that
- E-mail: mskucherawy@{math,watdragon}.UWaterloo.ca | goes PING!
- ---------------------------------------------------------------+--------------
-