Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9eae8a8903c3d90283d338fad2cc58f2eb90adcb
Commit: 9eae8a8903c3d90283d338fad2cc58f2eb90adcb
Parent: 63d2583f5a1a0b72fea3f2171f23f0ca8fa556ec
Author: Igor Mammedov <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 8 16:13:31 2007 +0000
Committer: Steve French <[EMAIL PROTECTED]>
CommitDate: Thu Nov 8 16:13:31 2007 +0000
[CIFS] Add uid to key description so krb can handle user mounts
Adds uid to key description fro supporting user mounts
and minor formating changes
Acked-by: Jeff Layton <[EMAIL PROTECTED]>
Signed-off-by: Igor Mammedov <[EMAIL PROTECTED]>
Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
fs/cifs/cifs_spnego.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index e142faf..ad54a3a 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -76,9 +76,10 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char
*hostname)
struct key *spnego_key;
- /* version + ;ip{4|6}= + address + ;host=hostname + ;sec= + NULL */
- desc_len = 2 + 5 + 32 + 1 + 5 + strlen(hostname) +
- strlen(";sec=krb5") + 1;
+ /* version + ;ip{4|6}= + address + ;host=hostname +
+ ;sec= + ;uid= + NULL */
+ desc_len = 4 + 5 + 32 + 1 + 5 + strlen(hostname) +
+ strlen(";sec=krb5") + 7 + sizeof(uid_t)*2 + 1;
spnego_key = ERR_PTR(-ENOMEM);
description = kzalloc(desc_len, GFP_KERNEL);
if (description == NULL)
@@ -87,7 +88,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char
*hostname)
dp = description;
/* start with version and hostname portion of UNC string */
spnego_key = ERR_PTR(-EINVAL);
- sprintf(dp, "%2.2x;host=%s;", CIFS_SPNEGO_UPCALL_VERSION,
+ sprintf(dp, "0x%2.2x;host=%s;", CIFS_SPNEGO_UPCALL_VERSION,
hostname);
dp = description + strlen(description);
@@ -109,6 +110,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char
*hostname)
else
goto out;
+ dp = description + strlen(description);
+ sprintf(dp, ";uid=0x%x", sesInfo->linux_uid);
+
cFYI(1, ("key description = %s", description));
spnego_key = request_key(&cifs_spnego_key_type, description, "");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html