[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-5.2.1: test failure - chgrp/posix-H
From: |
Paul Eggert |
Subject: |
Re: coreutils-5.2.1: test failure - chgrp/posix-H |
Date: |
Sat, 01 May 2004 00:23:13 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> If anyone knows how to test chown(2) -- to see if it dereferences symlinks --
> when called by a non-root user with only one group, please let me know.
Can't you do something like this?
ln -s nosuchfile danglingsymlink
if (chown ("danglingsymlink", getuid (), getgid ()) != 0
&& errno == ENOENT)
print ("chown follows symlinks");
else
print ("chown does not follow symlinks");