diff options
-rw-r--r-- | fs/cifs/cifs_spnego.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 4a4581cb2b5e..051caecf7d67 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
@@ -86,6 +86,9 @@ struct key_type cifs_spnego_key_type = { | |||
86 | /* strlen of ";user=" */ | 86 | /* strlen of ";user=" */ |
87 | #define USER_KEY_LEN 6 | 87 | #define USER_KEY_LEN 6 |
88 | 88 | ||
89 | /* strlen of ";pid=0x" */ | ||
90 | #define PID_KEY_LEN 7 | ||
91 | |||
89 | /* get a key struct with a SPNEGO security blob, suitable for session setup */ | 92 | /* get a key struct with a SPNEGO security blob, suitable for session setup */ |
90 | struct key * | 93 | struct key * |
91 | cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | 94 | cifs_get_spnego_key(struct cifsSesInfo *sesInfo) |
@@ -103,7 +106,8 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
103 | IP_KEY_LEN + INET6_ADDRSTRLEN + | 106 | IP_KEY_LEN + INET6_ADDRSTRLEN + |
104 | MAX_MECH_STR_LEN + | 107 | MAX_MECH_STR_LEN + |
105 | UID_KEY_LEN + (sizeof(uid_t) * 2) + | 108 | UID_KEY_LEN + (sizeof(uid_t) * 2) + |
106 | USER_KEY_LEN + strlen(sesInfo->userName) + 1; | 109 | USER_KEY_LEN + strlen(sesInfo->userName) + |
110 | PID_KEY_LEN + (sizeof(pid_t) * 2) + 1; | ||
107 | 111 | ||
108 | spnego_key = ERR_PTR(-ENOMEM); | 112 | spnego_key = ERR_PTR(-ENOMEM); |
109 | description = kzalloc(desc_len, GFP_KERNEL); | 113 | description = kzalloc(desc_len, GFP_KERNEL); |
@@ -141,6 +145,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
141 | dp = description + strlen(description); | 145 | dp = description + strlen(description); |
142 | sprintf(dp, ";user=%s", sesInfo->userName); | 146 | sprintf(dp, ";user=%s", sesInfo->userName); |
143 | 147 | ||
148 | dp = description + strlen(description); | ||
149 | sprintf(dp, ";pid=0x%x", current->pid); | ||
150 | |||
144 | cFYI(1, ("key description = %s", description)); | 151 | cFYI(1, ("key description = %s", description)); |
145 | spnego_key = request_key(&cifs_spnego_key_type, description, ""); | 152 | spnego_key = request_key(&cifs_spnego_key_type, description, ""); |
146 | 153 | ||