Hi Martin,

On Thu, Oct 06, 2005 at 05:48:46PM +0200, Martin Walter wrote:
> On Thu, 6 Oct 2005 [EMAIL PROTECTED] wrote:
> 
> > I have tried ro nfs + rw reiserfs(loopback) on
> > linux-2.6.13.2+unionfs-20050929-0844 and succeeded creating a file.
> > But probably there left some differences between your environment and
> > mine.
> > Still it is worth to try another filesystem instead of reiserfs since
> > the warnings saying I/O error are in your 20050921-1517 debug output. I
> > am afraid every time when you do 'ls', the warnings appear even unionfs
> > is 20050921-1517.
> 
> Ok, I changed /diff from reiserfs to a tmpfs. See attachments.
> 
> Same result:
> 
>     ok:         20050921-1517
>     failed:     20050923-1803, 20050929-0844
> 
> 
> The changes from 20050921-1517 to 20050923-1803 were done by Klaus Knopper.

This is not completely correct. ;-)

> Klaus, could you please check your patch in this direction?

The OLD behaviour of 20050921-1517 was the following:

IF the lower level branch was read-only (EROFS), THEN file/directory permissions
were COMPLETELY IGNORED and overwriting ANY FILE succeeded, by ANY USER.

This is apparently wrong, since this leads to a kind of DOS file system
where any user can overwrite files he isn't supposed to.

What my original patch did, is the following:

- Check an existing files permission (regardless of a read-only lower branch),
- allow read or write ONLY if the permissions match the users privileges.

which is the standard POSIX behaviour (IMHO).

Now, Dave has changed my patch somewhat in a way that I do not
completely understand, namely there is a part of the old behaviour
(using the vfs permission() call), and later also the corrected one
(check the real permissions, but only in case the vfs permission call
before returned EROFS and we are not on the toplevel branch). This may be
correct. Or maybe not. I really don't know in which cases it will work
and in which it won't.

If you like, I can send you my original version of the patched
20050921-1517 for testing.

Regards
-Klaus Knopper
_______________________________________________
unionfs mailing list
unionfs@mail.fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to