mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-17 12:41:05 +03:00
Solaris 9 and FreeBSD 7.2 chown("link-to-file/",uid,gid) mistakenly changes ownership of "file". * lib/chown.c (rpl_chown): Work around bug. * m4/chown.m4 (gl_FUNC_CHOWN): Check for trailing slash bugs. (gl_PREREQ_CHOWN): Delete. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. * modules/unistd (Makefile.am): Populate it. * lib/unistd.in.h (chown): Update declaration. * lib/lchown.c (chown): Update client. * modules/lchown (Depends-on): Add lstat. * doc/posix-functions/chown.texi (chown): Document the bug. * doc/posix-functions/getgroups.texi (getgroups): Document getgroups pitfall. * modules/chown-tests: New file. * tests/test-chown.h (test_chown): Likewise. * tests/test-chown.c (main): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
@node getgroups
|
|
@section @code{getgroups}
|
|
@findex getgroups
|
|
|
|
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/getgroups.html}
|
|
|
|
Gnulib module: getgroups
|
|
|
|
Portability problems fixed by Gnulib:
|
|
@itemize
|
|
@item
|
|
This function is missing on some platforms:
|
|
mingw.
|
|
@item
|
|
On some platforms, this function fails to reject a negative count,
|
|
even though that is less than the size that would be returned:
|
|
FreeBSD 7.2.
|
|
@item
|
|
On Ultrix 4.3, @code{getgroups (0, NULL)} always fails. See macro
|
|
@samp{AC_FUNC_GETGROUPS}.
|
|
@item
|
|
On very old systems, this function operated on an array of @samp{int},
|
|
even though that was a different size than an array of @samp{gid_t}.
|
|
@end itemize
|
|
|
|
Portability problems not fixed by Gnulib:
|
|
@itemize
|
|
@item
|
|
It is unspecified whether the effective group id will be included in
|
|
the returned list, nor whether the list will be sorted in any
|
|
particular order. For that matter, some platforms include the
|
|
effective group id twice, if it is also a member of the current
|
|
supplemental group ids.
|
|
@end itemize
|