bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-5.2.1: test failure - chgrp/posix-H


From: Jim Meyering
Subject: Re: coreutils-5.2.1: test failure - chgrp/posix-H
Date: Sat, 01 May 2004 09:31:00 +0200

Paul Eggert <address@hidden> wrote:
> 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");

Yes, indeed!
Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]