bug-coreutils
[Top][All Lists]
Advanced

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

Re: modify chmod


From: Jim Meyering
Subject: Re: modify chmod
Date: Sun, 07 Feb 2010 16:30:48 +0100

Finally, I see the one true way ;-)
Do this for each "name":

    - open each file/dir. with fd = openat (fts_cwd_fd, name, ...
    - if that succeeds, then call fstatfs (fd, ...

Using the combination of openat and fstatfs is required in order to
avoid using the full relative name of each object that chmod processes.

The above works for all readable objects.
For unreadable ones, revert to using the statfs with the full relative name.




reply via email to

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