reassign 520744 manpages-dev retitle 520744 getgrnam_r(3): wrong explanation about the sysconf(_SC_GETGR_R_SIZE_MAX) value thanks
On Fri, Apr 24, 2009 at 12:43:07PM +0200, Guido Günther wrote: > On Fri, Apr 24, 2009 at 12:27:49PM +0200, Aurelien Jarno wrote: > [..snip..] > > That said I don't fully understand POSIX here. What should happen if a > > line in /etc/group needs more memory than sysconf(_SC_GETGR_R_SIZE_MAX)? > > The line should be truncated? As far as I understand user can create as > > many entries as he wants there, so _SC_GETGR_R_SIZE_MAX can only be > > defined to an arbitrary value. > The manpage (as well as posix) says: > > The maximum needed size for buf can be found using sysconf(3) with the > argument _SC_GETGR_R_SIZE_MAX. > > I don't understand how this is supposed to work with arbitrary large > groups given that gr_mem is part of the buffer. It's probaly just a > documentation bug that should read "minimum" instead of "maximum"? > Actually the latest POSIX documentation (IEEE Std 1003.1-2008) changed this part, and now says: | A call to sysconf(_SC_GETGR_R_SIZE_MAX) returns either -1 without | changing errno or an initial value suggested for the size of this | buffer. So this is clearly a bug in the manpage. Reassigning the bug. -- Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

