Re: [PATCH] cifs: send real uid of initiating process to upcall instead of mount uid
Steve French <[email protected]>
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
Wouldn't it give more flexibility to the upcall program if we sent both or changed the name (and be less confusing) e.g. to "mount_uid" or something else distinct On Mon, Aug 3, 2009 at 1:34 PM, Jeff Layton <[email protected]> wrote: > The ownership of files on the mount has no direct relationship to the > credentials used to do the mount. Instead of sending the uid > corresponding to the owner of files on the mount, instead send the real > uid of the process that initiated the upcall. > > Usually this will be the real uid of the process running /bin/mount. > Eventually however, we want to be able to establish new sessions for > users that walk into a cifs mount. For that we need the real uid of > those users. > > Signed-off-by: Jeff Layton <[email protected]> > --- > fs/cifs/cifs_spnego.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c > index 8ec7736..1d0d8fc 100644 > --- a/fs/cifs/cifs_spnego.c > +++ b/fs/cifs/cifs_spnego.c > @@ -140,7 +140,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) > goto out; > > dp = description + strlen(description); > - sprintf(dp, ";uid=0x%x", sesInfo->linux_uid); > + sprintf(dp, ";uid=0x%x", current_uid()); > > dp = description + strlen(description); > sprintf(dp, ";user=%s", sesInfo->userName); > -- > 1.6.0.6 > > -- Thanks, Steve _______________________________________________ linux-cifs-client mailing list [email protected] https://lists.samba.org/mailman/listinfo/linux-cifs-client