Re: [PATCH] 9p: rename uid and gid parameters

Previous thread: [PATCH] 9p: define session flags by Latchesar Ionkov on Thursday, September 13, 2007 - 12:46 am. (1 message)

Next thread: [PATCH] 9p: attach-per-user by Latchesar Ionkov on Thursday, September 13, 2007 - 12:48 am. (2 messages)
To: <linux-kernel@...>
Cc: <v9fs-developer@...>, <linux-fsdevel@...>, <ericvh@...>
Date: Thursday, September 13, 2007 - 12:47 am

Change the names of 'uid' and 'gid' parameters to the more appropriate
'dfltuid' and 'dfltgid'.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>

---
commit 13bf527796712619df072c0963e3f6c8c00189b8
tree 7211a2899dcfd58c76b901334a8726c7e60115e1
parent 52f23404fd5bd77b619460e00930087463ec0cd9
author Latchesar Ionkov <lucho@eregion.(none)> Wed, 12 Sep 2007 22:37:33 -0600
committer Latchesar Ionkov <lucho@eregion.(none)> Wed, 12 Sep 2007 22:37:33 -0600

Documentation/filesystems/9p.txt | 4 ++--
fs/9p/v9fs.c | 16 +++++++++-------
fs/9p/v9fs.h | 6 ++++--
fs/9p/vfs_inode.c | 4 ++--
4 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt
index 1a5f50d..e694cd1 100644
--- a/Documentation/filesystems/9p.txt
+++ b/Documentation/filesystems/9p.txt
@@ -78,9 +78,9 @@ OPTIONS

noextend force legacy mode (no 9p2000.u semantics)

- uid attempt to mount as a particular uid
+ dfltuid attempt to mount as a particular uid

- gid attempt to mount with a particular gid
+ dfltgid attempt to mount with a particular gid

afid security channel - used by Plan 9 authentication protocols

diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 8ac2467..68f82be 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -84,7 +84,7 @@ static struct p9_trans_module *v9fs_match_trans(const substring_t *name)

enum {
/* Options that take integer arguments */
- Opt_debug, Opt_msize, Opt_uid, Opt_gid, Opt_afid,
+ Opt_debug, Opt_msize, Opt_dfltuid, Opt_dfltgid, Opt_afid,
/* String options */
Opt_uname, Opt_remotename, Opt_trans,
/* Options that take no arguments */
@@ -98,8 +98,8 @@ enum {
static match_table_t tokens = {
{Opt_debug, "debug=%x"},
{Opt_msize, "msize=%u"},
- {Opt_uid, "uid=%u"},
- {Opt_gid, "gid=%u"},
+ {Opt_dfltuid, "dfltuid=%u"},
+ {Opt_dfltgid, "dfltgid=%u"},
{Opt_afid, "afid=%u"},
{Opt_uname, "u...

To: Latchesar Ionkov <lucho@...>
Cc: <linux-kernel@...>, <v9fs-developer@...>, <linux-fsdevel@...>
Date: Thursday, September 13, 2007 - 9:38 am

I'm not sure if there is a good solution here, but I'm uncomfortable
with using uid=0 as the default. I'm not sure if there is a default
uid for nobody, but anything is probably better than 0. Looks like
nfsnobody is 65534, we could use that - even if only as a marker for
the server to map it to nobody on the target system? What do you
think?

Particularly with attach-per-user, we probably need to look at
interacting with idmapd or create our own variant real soon.

-eric
-

To: Eric Van Hensbergen <ericvh@...>
Cc: <linux-kernel@...>, <v9fs-developer@...>, <linux-fsdevel@...>
Date: Thursday, September 13, 2007 - 10:51 am

Zero was the value that was used before, even though it wasn't defined
explicitly. I just defined a macro so we can see and eventually change
it to something better. I don't know if there is a good default value.
Is nfsnobody the same on all Linux distributions?

Thanks,
Lucho

-

To: Latchesar Ionkov <lucho@...>
Cc: Eric Van Hensbergen <ericvh@...>, <linux-kernel@...>, <v9fs-developer@...>, <linux-fsdevel@...>
Date: Thursday, September 13, 2007 - 10:55 am

Not necessarily.

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services

-

Previous thread: [PATCH] 9p: define session flags by Latchesar Ionkov on Thursday, September 13, 2007 - 12:46 am. (1 message)

Next thread: [PATCH] 9p: attach-per-user by Latchesar Ionkov on Thursday, September 13, 2007 - 12:48 am. (2 messages)