svn commit: r217133 - head/usr.bin/sed

Bruce Evans brde at optusnet.com.au
Sat Jan 8 00:41:17 UTC 2011


On Sat, 8 Jan 2011, Jilles Tjoelker wrote:

> Log:
>  sed: Try hard links to make -i target available continually.
>  ...
>  I am not adding the suppression of redundant fchown/fchmod to this commit,
>  because FreeBSD appears to check this in the kernel (for msdosfs at least).

I vaguely remember fixing (?) ffs to allow null changes even in cases where
permissions should deny changes (perhaps even null ones).

msdosfs is still very inconsistent in ignoring (non-null) changes for
attributes that it cannot support.  Most annoying is utimes() with a
non-null times pointer.  This requires either the file's uid to match
the process's uid, or superuser privileges.  The file's uid is fake.
It can be anything, but is rarely you.  So you normally need superuser
privilege to copy file times.  msdosfs cannot really support copying
file times from most file other file systems even for the superuser,
since it only has mtimes and has deficient precision even for those,
but it silently ignores errors from these problems.  Ignoring errors
is not good, but this is almost the best possible.  Best would be to
give the user and application more control, and have applications
actually control things properly.  The best possible behaviour is what
happens for copying ids when the ids don't match -- cp sees the error
and reports it and then proceeds; this is accidentally best since there
is no possibility of setting the ids.  However, for file times it is
possible in theory to set the mtime, but impossible in practice unless
you are the superuser or own the file.

Bruce


More information about the svn-src-head mailing list