]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: clean up cifs_find_smb_ses (try #2)
authorJeff Layton <jlayton@redhat.com>
Wed, 7 Jul 2010 00:43:02 +0000 (20:43 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:21:22 +0000 (11:21 -0400)
commit88720224330a655ab6268e20109b65b11cfd7f6a
treeb6c88609e09bcf0de5213c7ccd373f42b8dc2b05
parent6dde6e7d348ebdd0a42cf3ef6f2226eb1ac34aa8
cifs: clean up cifs_find_smb_ses (try #2)

commit 4ff67b720c02c36e54d55b88c2931879b7db1cd2 upstream.

This patch replaces the earlier patch by the same name. The only
difference is that MAX_PASSWORD_SIZE has been increased to attempt to
match the limits that windows enforces.

Do a better job of matching sessions by authtype. Matching by username
for a Kerberos session is incorrect, and anonymous sessions need special
handling.

Also, in the case where we do match by username, we also need to match
by password. That ensures that someone else doesn't "borrow" an existing
session without needing to know the password.

Finally, passwords can be longer than 16 bytes. Bump MAX_PASSWORD_SIZE
to 512 to match the size that the userspace mount helper allows.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
[PG: origin vs. in 2.6.34; ses <-- pSesInfo, server <-- srvTcp ]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/cifs/cifsglob.h
fs/cifs/connect.c