summaryrefslogtreecommitdiff
path: root/modules/lchown
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-11-12 21:45:20 -0700
committerEric Blake <ebb9@byu.net>2009-11-14 10:33:28 -0700
commit9cd8acbae7f8ca3985001de0752b22e2a28d0cd7 (patch)
treee4e6533b153eb4537063a328635b014719e6bd4e /modules/lchown
parentfb1b608caaa3de195f3d97356e95a165ef5517da (diff)
downloadgnulib-9cd8acbae7f8ca3985001de0752b22e2a28d0cd7.tar.gz
chown: detect Solaris and FreeBSD bug
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>
Diffstat (limited to 'modules/lchown')
-rw-r--r--modules/lchown1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/lchown b/modules/lchown
index 65c084c933..c50537aac2 100644
--- a/modules/lchown
+++ b/modules/lchown
@@ -8,6 +8,7 @@ m4/lchown.m4
Depends-on:
chown
errno
+lstat
sys_stat
unistd