home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9108 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.0 KB  |  40 lines

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