diff options
author | Steve French <sfrench@us.ibm.com> | 2011-02-25 02:11:56 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-04-11 20:42:06 -0400 |
commit | 8727c8a85f3951ef0eef36a665f5dceebb4c495d (patch) | |
tree | f35b215604127ebb05a977a1b8c093b7b441b6af /fs/cifs/cifsglob.h | |
parent | bdf1b03e093bdbc571f404e751c7b0e2dca412ea (diff) |
Allow user names longer than 32 bytes
We artificially limited the user name to 32 bytes, but modern servers handle
larger. Set the maximum length to a reasonable 256, and make the user name
string dynamically allocated rather than a fixed size in session structure.
Also clean up old checkpatch warning.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 10e4afe54e22..94cd8747d28b 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -38,9 +38,8 @@ | |||
38 | #define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1) | 38 | #define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1) |
39 | #define MAX_SERVER_SIZE 15 | 39 | #define MAX_SERVER_SIZE 15 |
40 | #define MAX_SHARE_SIZE 64 /* used to be 20, this should still be enough */ | 40 | #define MAX_SHARE_SIZE 64 /* used to be 20, this should still be enough */ |
41 | #define MAX_USERNAME_SIZE 32 /* 32 is to allow for 15 char names + null | 41 | #define MAX_USERNAME_SIZE 256 /* reasonable maximum for current servers */ |
42 | termination then *2 for unicode versions */ | 42 | #define MAX_PASSWORD_SIZE 512 /* max for windows seems to be 256 wide chars */ |
43 | #define MAX_PASSWORD_SIZE 512 /* max for windows seems to be 256 wide chars */ | ||
44 | 43 | ||
45 | #define CIFS_MIN_RCV_POOL 4 | 44 | #define CIFS_MIN_RCV_POOL 4 |
46 | 45 | ||
@@ -274,7 +273,7 @@ struct cifsSesInfo { | |||
274 | int capabilities; | 273 | int capabilities; |
275 | char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for | 274 | char serverName[SERVER_NAME_LEN_WITH_NULL * 2]; /* BB make bigger for |
276 | TCP names - will ipv6 and sctp addresses fit? */ | 275 | TCP names - will ipv6 and sctp addresses fit? */ |
277 | char userName[MAX_USERNAME_SIZE + 1]; | 276 | char *user_name; |
278 | char *domainName; | 277 | char *domainName; |
279 | char *password; | 278 | char *password; |
280 | struct session_key auth_key; | 279 | struct session_key auth_key; |