On Tue, 21 Nov 2017, Bruce Evans wrote:
On Mon, 20 Nov 2017, Conrad Meyer wrote:
Log:
msdosfs(5): Reflect READONLY attribute in file mode
...
This undoes only a small part of READONLY changes in r254627 (which are
small part of of r253627). I think r254627 got the READONLY semantics
wrong, but they were almost consistent and well documented in the commit
log. Now they are more seriously inconsistent.
...
Most relevant parts of the commit log for r254627:
X msdosfs_denode.c,
X msdosfs_vnops.c: Add support for getting and setting
X UF_HIDDEN, UF_SYSTEM and UF_READONLY
X in MSDOSFS.
X X It supported SF_ARCHIVED, but this has been
X changed to be UF_ARCHIVE, which has the same
X semantics as the DOS archive attribute instead
X of inverse semantics like SF_ARCHIVED.
X X After discussion with Bruce Evans, change
X several things in the msdosfs behavior:
X X Use UF_READONLY to indicate whether a file
X is writeable instead of file permissions, but
X don't actually enforce it.
^^^^^^^^^^^^^^^^^^^^^^^^^
I forget if I asked for not enforcing it or for removing the old enforcement.
PS: I now see a good reason to not change the READONLY attribute using
permissions (doing so is the inconsistent part of r254627), but perhaps
we should complete the undoing of the changes to ignore READONLY for
permissions.
Under MSDOS or Windows, you have to use attrib to change attributes.
This corresponds to having to use chflags(1) under FreeBSD. Allowing
chmod(1) to change flags together with permissons gives confusing
non-orthogonal behaviour. Only old FreeBSD and old(?) Cygwin have to
do that since they don't have UF_READONLY (or even chflags).
Example of non-orthogonal behaviour: the fake default permissions are
-r-xr-xr-x and attributes are R. You try to change this using chmod
u+w. This doesn't change the permissions, but it changes the attributes
to 0. Then on rebooting to msdosfs, the R attribute has been lost. It
is safer to require using only chflags(1 or 2) to change attributes.
Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"