aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-01-11 10:33:24 -0500
committerSteve French <sfrench@us.ibm.com>2011-01-14 13:51:11 -0500
commitbd7633195581c7665ce9dd80c665ec93466d1b64 (patch)
treea3a82eff9b960c59a07d3bc9b8145d6bac24c02c /fs/cifs
parent56c24305d1494a7e345c75669dc60e8b231b735b (diff)
cifs: add cruid= mount option
In commit 3e4b3e1f we separated the "uid" mount option such that it no longer determined the owner of the credential cache by default. When we did this, we added a new option to cifs.upcall (--legacy-uid) to try to make it so that it would behave the same was as it did before. This ignored a rather important point -- the kernel has no way to know what options are being passed to cifs.upcall, so it doesn't know what uid it should use to determine whether to match an existing krb5 session. The simplest solution is to simply add a new "cruid=" mount option that only governs the uid owner of the credential cache for the mount. Unfortunately, this means that the --legacy-uid option in cifs.upcall was ill-considered and is now useless, but I don't see a better way to deal with this. A patch for the mount.cifs manpage will follow once this patch has been accepted. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/connect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index a65d311d163a..9f59887badd2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1113,6 +1113,8 @@ cifs_parse_mount_options(char *options, const char *devname,
1113 } else if (!strnicmp(data, "uid", 3) && value && *value) { 1113 } else if (!strnicmp(data, "uid", 3) && value && *value) {
1114 vol->linux_uid = simple_strtoul(value, &value, 0); 1114 vol->linux_uid = simple_strtoul(value, &value, 0);
1115 uid_specified = true; 1115 uid_specified = true;
1116 } else if (!strnicmp(data, "cruid", 5) && value && *value) {
1117 vol->cred_uid = simple_strtoul(value, &value, 0);
1116 } else if (!strnicmp(data, "forceuid", 8)) { 1118 } else if (!strnicmp(data, "forceuid", 8)) {
1117 override_uid = 1; 1119 override_uid = 1;
1118 } else if (!strnicmp(data, "noforceuid", 10)) { 1120 } else if (!strnicmp(data, "noforceuid", 10)) {