aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2013-02-06 05:30:39 -0500
committerEric W. Biederman <ebiederm@xmission.com>2013-02-13 10:28:55 -0500
commit64ed39dd1ef284c0338799a6167b77a6d6e01982 (patch)
tree4cc91e6d9081a6ff2b5ebe877593bdab165703c9 /fs
parent1f68233c52e9f2bb53130a0063bc1e6864f6d204 (diff)
cifs: Convert struct cifs_ses to use a kuid_t and a kgid_t
Cc: Steve French <smfrench@gmail.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifs_spnego.c6
-rw-r--r--fs/cifs/cifsglob.h4
-rw-r--r--fs/cifs/connect.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 086f381d6489..10e774761299 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -149,10 +149,12 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo)
149 goto out; 149 goto out;
150 150
151 dp = description + strlen(description); 151 dp = description + strlen(description);
152 sprintf(dp, ";uid=0x%x", sesInfo->linux_uid); 152 sprintf(dp, ";uid=0x%x",
153 from_kuid_munged(&init_user_ns, sesInfo->linux_uid));
153 154
154 dp = description + strlen(description); 155 dp = description + strlen(description);
155 sprintf(dp, ";creduid=0x%x", sesInfo->cred_uid); 156 sprintf(dp, ";creduid=0x%x",
157 from_kuid_munged(&init_user_ns, sesInfo->cred_uid));
156 158
157 if (sesInfo->user_name) { 159 if (sesInfo->user_name) {
158 dp = description + strlen(description); 160 dp = description + strlen(description);
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index e308e8bd0772..aaef57beba0e 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -702,8 +702,8 @@ struct cifs_ses {
702 char *serverNOS; /* name of network operating system of server */ 702 char *serverNOS; /* name of network operating system of server */
703 char *serverDomain; /* security realm of server */ 703 char *serverDomain; /* security realm of server */
704 __u64 Suid; /* remote smb uid */ 704 __u64 Suid; /* remote smb uid */
705 uid_t linux_uid; /* overriding owner of files on the mount */ 705 kuid_t linux_uid; /* overriding owner of files on the mount */
706 uid_t cred_uid; /* owner of credentials */ 706 kuid_t cred_uid; /* owner of credentials */
707 unsigned int capabilities; 707 unsigned int capabilities;
708 char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for 708 char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for
709 TCP names - will ipv6 and sctp addresses fit? */ 709 TCP names - will ipv6 and sctp addresses fit? */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 01279b8f5d1f..067b0e169fe4 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2271,7 +2271,7 @@ static int match_session(struct cifs_ses *ses, struct smb_vol *vol)
2271{ 2271{
2272 switch (ses->server->secType) { 2272 switch (ses->server->secType) {
2273 case Kerberos: 2273 case Kerberos:
2274 if (vol->cred_uid != ses->cred_uid) 2274 if (!uid_eq(vol->cred_uid, ses->cred_uid))
2275 return 0; 2275 return 0;
2276 break; 2276 break;
2277 default: 2277 default: