aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-12-05 20:41:21 -0500
committerSteve French <sfrench@us.ibm.com>2008-12-25 21:29:11 -0500
commit00e485b0198ea4f509341373f1d9adb0a5977a2f (patch)
tree2f8a50be11f0551fe8ad2af33a00577621398027 /fs/cifs/misc.c
parent4e53a3fb98d3d5c2941d2e7199dab317a9d4ead3 (diff)
cifs: store password in tcon
cifs: store password in tcon Each tcon has its own password for share-level security. Store it in the tcon and wipe it clean and free it when freeing the tcon. When doing the tree connect with share-level security, use the tcon password instead of the session password. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 7c3f4b9230d7..a0513605d7e3 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -132,6 +132,10 @@ tconInfoFree(struct cifsTconInfo *buf_to_free)
132 } 132 }
133 atomic_dec(&tconInfoAllocCount); 133 atomic_dec(&tconInfoAllocCount);
134 kfree(buf_to_free->nativeFileSystem); 134 kfree(buf_to_free->nativeFileSystem);
135 if (buf_to_free->password) {
136 memset(buf_to_free->password, 0, strlen(buf_to_free->password));
137 kfree(buf_to_free->password);
138 }
135 kfree(buf_to_free); 139 kfree(buf_to_free);
136} 140}
137 141