[PATCH] cifs: send real uid of initiating process to upcall instead of mount uid
Jeff Layton <[email protected]>
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
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