From: Phillip Susi <psusi@cfl.rr.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Peter Osterlund <petero2@telia.com>,
linux-kernel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu,
Christoph Hellwig <hch@lst.de>, Al Viro <viro@ftp.linux.org.uk>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC][PATCH] UDF filesystem uid fix
Date: Mon, 13 Feb 2006 11:51:08 -0500 [thread overview]
Message-ID: <43F0B8FC.6020605@cfl.rr.com> (raw)
In-Reply-To: <84144f020602130149k72b8ebned89ff5719cdd0c2@mail.gmail.com>
Pekka Enberg wrote:
> The UDF code really seems broken. It fails for new inodes and some
> chown cases, when the mount options are being used. Phillip's patch
> does not look like a complete fix, though, as it will store invalid
> uid/gid (-1) for some cases where we probably should be storing the
> real uid/gid. For example, doing chown <user> when the same user is
> passed as mount option, we'll get -1 on disk, instead of user's uid.
>
Could you be more specific about what test cases fail? It worked fine
for me so far.
Also the storage of -1 id is very much intentional. Prior to this
patch, if you mount with uid=yourid then you create a file, it would
appear to be owned by you. If you unmounted and remounted the volume
however, it would suddenly be owned by root. Clearly that is not
acceptable. With this patch applied, the file appears to be owned by you
both before and after the remount. The actual value written to disk is
-1, which on a read is translated to the value from the mount option,
giving the appearance that the file is owned by the user specified in
the mount, which is the expected behavior.
Should the desktop user insert this media in another machine where they
have a different uid ( that is specified in the mount options ) then
they would still have access to their files, as the -1 will be
translated to the correct uid on that system.
Should you chown files to a user other than the one given in the mount
option, then that actual uid is stored on the disk. Also if you do not
specify a uid/gid when you mount, then the actual uid is stored.
> I think the semantics you want is: "if uid/gid is invalid on disk,
> leave it that way unless we explicitly change it via chown; otherwise
> we can always overwrite it." Hmm?
>
No, the semantics is if the uid/gid on disk is invalid, then use the id
specified in the mount options. That was the case before, however when
you created new files or chowned files to you ( and you gave your id in
the mount options ), an id of 0 was written to disk instead. Now -1 is
written, which when read, is mapped back to your id specified in the
mount options.
next prev parent reply other threads:[~2006-02-13 16:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-12 18:17 [RFC][PATCH] UDF filesystem uid fix Peter Osterlund
2006-02-13 9:49 ` Pekka Enberg
2006-02-13 16:51 ` Phillip Susi [this message]
2006-02-14 7:28 ` Pekka J Enberg
2006-02-14 11:36 ` Sergey Vlasov
2006-02-14 15:54 ` Phillip Susi
2006-02-15 7:31 ` Pekka Enberg
2006-02-15 15:55 ` Phillip Susi
2006-02-15 17:31 ` Pekka Enberg
2006-02-15 18:48 ` Phillip Susi
2006-02-15 20:28 ` Pekka Enberg
2006-03-04 23:19 ` Phillip Susi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43F0B8FC.6020605@cfl.rr.com \
--to=psusi@cfl.rr.com \
--cc=akpm@osdl.org \
--cc=bfennema@falcon.csc.calpoly.edu \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=petero2@telia.com \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.