diff options
author | Steve French <sfrench@us.ibm.com> | 2011-05-27 00:34:02 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-05-27 00:34:02 -0400 |
commit | 96daf2b09178d8ebde2b0d56b027de917c17dfdf (patch) | |
tree | 74802fa44e87925e49067d5106eb762cc27b9b97 /fs/cifs/sess.c | |
parent | 07cc6cf9ef84bcf6a60ee513332bcb0ad5d628d8 (diff) |
[CIFS] Rename three structures to avoid camel case
secMode to sec_mode
and
cifsTconInfo to cifs_tcon
and
cifsSesInfo to cifs_ses
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r-- | fs/cifs/sess.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 7dd462100378..3892ab817a36 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -37,13 +37,13 @@ | |||
37 | * the socket has been reestablished (so we know whether to use vc 0). | 37 | * the socket has been reestablished (so we know whether to use vc 0). |
38 | * Called while holding the cifs_tcp_ses_lock, so do not block | 38 | * Called while holding the cifs_tcp_ses_lock, so do not block |
39 | */ | 39 | */ |
40 | static bool is_first_ses_reconnect(struct cifsSesInfo *ses) | 40 | static bool is_first_ses_reconnect(struct cifs_ses *ses) |
41 | { | 41 | { |
42 | struct list_head *tmp; | 42 | struct list_head *tmp; |
43 | struct cifsSesInfo *tmp_ses; | 43 | struct cifs_ses *tmp_ses; |
44 | 44 | ||
45 | list_for_each(tmp, &ses->server->smb_ses_list) { | 45 | list_for_each(tmp, &ses->server->smb_ses_list) { |
46 | tmp_ses = list_entry(tmp, struct cifsSesInfo, | 46 | tmp_ses = list_entry(tmp, struct cifs_ses, |
47 | smb_ses_list); | 47 | smb_ses_list); |
48 | if (tmp_ses->need_reconnect == false) | 48 | if (tmp_ses->need_reconnect == false) |
49 | return false; | 49 | return false; |
@@ -61,11 +61,11 @@ static bool is_first_ses_reconnect(struct cifsSesInfo *ses) | |||
61 | * any vc but zero (some servers reset the connection on vcnum zero) | 61 | * any vc but zero (some servers reset the connection on vcnum zero) |
62 | * | 62 | * |
63 | */ | 63 | */ |
64 | static __le16 get_next_vcnum(struct cifsSesInfo *ses) | 64 | static __le16 get_next_vcnum(struct cifs_ses *ses) |
65 | { | 65 | { |
66 | __u16 vcnum = 0; | 66 | __u16 vcnum = 0; |
67 | struct list_head *tmp; | 67 | struct list_head *tmp; |
68 | struct cifsSesInfo *tmp_ses; | 68 | struct cifs_ses *tmp_ses; |
69 | __u16 max_vcs = ses->server->max_vcs; | 69 | __u16 max_vcs = ses->server->max_vcs; |
70 | __u16 i; | 70 | __u16 i; |
71 | int free_vc_found = 0; | 71 | int free_vc_found = 0; |
@@ -87,7 +87,7 @@ static __le16 get_next_vcnum(struct cifsSesInfo *ses) | |||
87 | free_vc_found = 1; | 87 | free_vc_found = 1; |
88 | 88 | ||
89 | list_for_each(tmp, &ses->server->smb_ses_list) { | 89 | list_for_each(tmp, &ses->server->smb_ses_list) { |
90 | tmp_ses = list_entry(tmp, struct cifsSesInfo, | 90 | tmp_ses = list_entry(tmp, struct cifs_ses, |
91 | smb_ses_list); | 91 | smb_ses_list); |
92 | if (tmp_ses->vcnum == i) { | 92 | if (tmp_ses->vcnum == i) { |
93 | free_vc_found = 0; | 93 | free_vc_found = 0; |
@@ -114,7 +114,7 @@ get_vc_num_exit: | |||
114 | return cpu_to_le16(vcnum); | 114 | return cpu_to_le16(vcnum); |
115 | } | 115 | } |
116 | 116 | ||
117 | static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) | 117 | static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB) |
118 | { | 118 | { |
119 | __u32 capabilities = 0; | 119 | __u32 capabilities = 0; |
120 | 120 | ||
@@ -136,7 +136,7 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) | |||
136 | capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | | 136 | capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | |
137 | CAP_LARGE_WRITE_X | CAP_LARGE_READ_X; | 137 | CAP_LARGE_WRITE_X | CAP_LARGE_READ_X; |
138 | 138 | ||
139 | if (ses->server->secMode & | 139 | if (ses->server->sec_mode & |
140 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | 140 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) |
141 | pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; | 141 | pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; |
142 | 142 | ||
@@ -181,7 +181,7 @@ unicode_oslm_strings(char **pbcc_area, const struct nls_table *nls_cp) | |||
181 | *pbcc_area = bcc_ptr; | 181 | *pbcc_area = bcc_ptr; |
182 | } | 182 | } |
183 | 183 | ||
184 | static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses, | 184 | static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, |
185 | const struct nls_table *nls_cp) | 185 | const struct nls_table *nls_cp) |
186 | { | 186 | { |
187 | char *bcc_ptr = *pbcc_area; | 187 | char *bcc_ptr = *pbcc_area; |
@@ -204,7 +204,7 @@ static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses, | |||
204 | } | 204 | } |
205 | 205 | ||
206 | 206 | ||
207 | static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | 207 | static void unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, |
208 | const struct nls_table *nls_cp) | 208 | const struct nls_table *nls_cp) |
209 | { | 209 | { |
210 | char *bcc_ptr = *pbcc_area; | 210 | char *bcc_ptr = *pbcc_area; |
@@ -236,7 +236,7 @@ static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | |||
236 | *pbcc_area = bcc_ptr; | 236 | *pbcc_area = bcc_ptr; |
237 | } | 237 | } |
238 | 238 | ||
239 | static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | 239 | static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses, |
240 | const struct nls_table *nls_cp) | 240 | const struct nls_table *nls_cp) |
241 | { | 241 | { |
242 | char *bcc_ptr = *pbcc_area; | 242 | char *bcc_ptr = *pbcc_area; |
@@ -276,7 +276,7 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, | |||
276 | } | 276 | } |
277 | 277 | ||
278 | static void | 278 | static void |
279 | decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | 279 | decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, |
280 | const struct nls_table *nls_cp) | 280 | const struct nls_table *nls_cp) |
281 | { | 281 | { |
282 | int len; | 282 | int len; |
@@ -310,7 +310,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, | |||
310 | } | 310 | } |
311 | 311 | ||
312 | static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | 312 | static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, |
313 | struct cifsSesInfo *ses, | 313 | struct cifs_ses *ses, |
314 | const struct nls_table *nls_cp) | 314 | const struct nls_table *nls_cp) |
315 | { | 315 | { |
316 | int rc = 0; | 316 | int rc = 0; |
@@ -364,7 +364,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | |||
364 | } | 364 | } |
365 | 365 | ||
366 | static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, | 366 | static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, |
367 | struct cifsSesInfo *ses) | 367 | struct cifs_ses *ses) |
368 | { | 368 | { |
369 | unsigned int tioffset; /* challenge message target info area */ | 369 | unsigned int tioffset; /* challenge message target info area */ |
370 | unsigned int tilen; /* challenge message target info area length */ | 370 | unsigned int tilen; /* challenge message target info area length */ |
@@ -411,7 +411,7 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, | |||
411 | /* We do not malloc the blob, it is passed in pbuffer, because | 411 | /* We do not malloc the blob, it is passed in pbuffer, because |
412 | it is fixed size, and small, making this approach cleaner */ | 412 | it is fixed size, and small, making this approach cleaner */ |
413 | static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, | 413 | static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, |
414 | struct cifsSesInfo *ses) | 414 | struct cifs_ses *ses) |
415 | { | 415 | { |
416 | NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer; | 416 | NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer; |
417 | __u32 flags; | 417 | __u32 flags; |
@@ -424,7 +424,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, | |||
424 | flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET | | 424 | flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET | |
425 | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | | 425 | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | |
426 | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; | 426 | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; |
427 | if (ses->server->secMode & | 427 | if (ses->server->sec_mode & |
428 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { | 428 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { |
429 | flags |= NTLMSSP_NEGOTIATE_SIGN; | 429 | flags |= NTLMSSP_NEGOTIATE_SIGN; |
430 | if (!ses->server->session_estab) | 430 | if (!ses->server->session_estab) |
@@ -449,7 +449,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, | |||
449 | This function returns the length of the data in the blob */ | 449 | This function returns the length of the data in the blob */ |
450 | static int build_ntlmssp_auth_blob(unsigned char *pbuffer, | 450 | static int build_ntlmssp_auth_blob(unsigned char *pbuffer, |
451 | u16 *buflen, | 451 | u16 *buflen, |
452 | struct cifsSesInfo *ses, | 452 | struct cifs_ses *ses, |
453 | const struct nls_table *nls_cp) | 453 | const struct nls_table *nls_cp) |
454 | { | 454 | { |
455 | int rc; | 455 | int rc; |
@@ -464,10 +464,10 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer, | |||
464 | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO | | 464 | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO | |
465 | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | | 465 | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | |
466 | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; | 466 | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; |
467 | if (ses->server->secMode & | 467 | if (ses->server->sec_mode & |
468 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) | 468 | (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) |
469 | flags |= NTLMSSP_NEGOTIATE_SIGN; | 469 | flags |= NTLMSSP_NEGOTIATE_SIGN; |
470 | if (ses->server->secMode & SECMODE_SIGN_REQUIRED) | 470 | if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED) |
471 | flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; | 471 | flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; |
472 | 472 | ||
473 | tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE); | 473 | tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE); |
@@ -551,7 +551,7 @@ setup_ntlmv2_ret: | |||
551 | } | 551 | } |
552 | 552 | ||
553 | int | 553 | int |
554 | CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, | 554 | CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses, |
555 | const struct nls_table *nls_cp) | 555 | const struct nls_table *nls_cp) |
556 | { | 556 | { |
557 | int rc = 0; | 557 | int rc = 0; |
@@ -657,7 +657,7 @@ ssetup_ntlmssp_authenticate: | |||
657 | */ | 657 | */ |
658 | 658 | ||
659 | rc = calc_lanman_hash(ses->password, ses->server->cryptkey, | 659 | rc = calc_lanman_hash(ses->password, ses->server->cryptkey, |
660 | ses->server->secMode & SECMODE_PW_ENCRYPT ? | 660 | ses->server->sec_mode & SECMODE_PW_ENCRYPT ? |
661 | true : false, lnm_session_key); | 661 | true : false, lnm_session_key); |
662 | 662 | ||
663 | ses->flags |= CIFS_SES_LANMAN; | 663 | ses->flags |= CIFS_SES_LANMAN; |