diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsacl.h | 4 | ||||
-rw-r--r-- | fs/cifs/cifsencrypt.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 5 | ||||
-rw-r--r-- | fs/cifs/cifsfs.h | 2 | ||||
-rw-r--r-- | fs/cifs/cifsglob.h | 4 | ||||
-rw-r--r-- | fs/cifs/cifsproto.h | 6 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 6 | ||||
-rw-r--r-- | fs/cifs/connect.c | 20 | ||||
-rw-r--r-- | fs/cifs/md5.c | 4 | ||||
-rw-r--r-- | fs/cifs/md5.h | 8 | ||||
-rw-r--r-- | fs/cifs/misc.c | 2 | ||||
-rw-r--r-- | fs/cifs/smbdes.c | 4 | ||||
-rw-r--r-- | fs/cifs/smbencrypt.c | 4 |
13 files changed, 37 insertions, 34 deletions
diff --git a/fs/cifs/cifsacl.h b/fs/cifs/cifsacl.h index d0776ac2b804..5eff35d6e564 100644 --- a/fs/cifs/cifsacl.h +++ b/fs/cifs/cifsacl.h | |||
@@ -31,8 +31,8 @@ struct cifs_sid { | |||
31 | } __attribute__((packed)); | 31 | } __attribute__((packed)); |
32 | 32 | ||
33 | /* everyone */ | 33 | /* everyone */ |
34 | extern const struct cifs_sid sid_everyone; | 34 | /* extern const struct cifs_sid sid_everyone;*/ |
35 | /* group users */ | 35 | /* group users */ |
36 | extern const struct cifs_sid sid_user; | 36 | /* extern const struct cifs_sid sid_user;*/ |
37 | 37 | ||
38 | #endif /* _CIFSACL_H */ | 38 | #endif /* _CIFSACL_H */ |
diff --git a/fs/cifs/cifsencrypt.h b/fs/cifs/cifsencrypt.h index 03e359b32861..152fa2dcfc6c 100644 --- a/fs/cifs/cifsencrypt.h +++ b/fs/cifs/cifsencrypt.h | |||
@@ -27,8 +27,6 @@ extern void mdfour(unsigned char *out, unsigned char *in, int n); | |||
27 | /* smbdes.c */ | 27 | /* smbdes.c */ |
28 | extern void E_P16(unsigned char *p14, unsigned char *p16); | 28 | extern void E_P16(unsigned char *p14, unsigned char *p16); |
29 | extern void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24); | 29 | extern void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24); |
30 | extern void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out); | ||
31 | extern void E_old_pw_hash(unsigned char *, unsigned char *, unsigned char *); | ||
32 | 30 | ||
33 | 31 | ||
34 | 32 | ||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f5ba41132488..cd17d4b78173 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -442,7 +442,7 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data) | |||
442 | return 0; | 442 | return 0; |
443 | } | 443 | } |
444 | 444 | ||
445 | struct super_operations cifs_super_ops = { | 445 | static struct super_operations cifs_super_ops = { |
446 | .read_inode = cifs_read_inode, | 446 | .read_inode = cifs_read_inode, |
447 | .put_super = cifs_put_super, | 447 | .put_super = cifs_put_super, |
448 | .statfs = cifs_statfs, | 448 | .statfs = cifs_statfs, |
@@ -930,7 +930,7 @@ init_cifs(void) | |||
930 | #ifdef CONFIG_PROC_FS | 930 | #ifdef CONFIG_PROC_FS |
931 | cifs_proc_init(); | 931 | cifs_proc_init(); |
932 | #endif | 932 | #endif |
933 | INIT_LIST_HEAD(&GlobalServerList); /* BB not implemented yet */ | 933 | /* INIT_LIST_HEAD(&GlobalServerList);*/ /* BB not implemented yet */ |
934 | INIT_LIST_HEAD(&GlobalSMBSessionList); | 934 | INIT_LIST_HEAD(&GlobalSMBSessionList); |
935 | INIT_LIST_HEAD(&GlobalTreeConnectionList); | 935 | INIT_LIST_HEAD(&GlobalTreeConnectionList); |
936 | INIT_LIST_HEAD(&GlobalOplock_Q); | 936 | INIT_LIST_HEAD(&GlobalOplock_Q); |
@@ -958,6 +958,7 @@ init_cifs(void) | |||
958 | GlobalCurrentXid = 0; | 958 | GlobalCurrentXid = 0; |
959 | GlobalTotalActiveXid = 0; | 959 | GlobalTotalActiveXid = 0; |
960 | GlobalMaxActiveXid = 0; | 960 | GlobalMaxActiveXid = 0; |
961 | memset(Local_System_Name, 0, 15); | ||
961 | rwlock_init(&GlobalSMBSeslock); | 962 | rwlock_init(&GlobalSMBSeslock); |
962 | spin_lock_init(&GlobalMid_Lock); | 963 | spin_lock_init(&GlobalMid_Lock); |
963 | 964 | ||
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index bea875d9a46a..a243f779b363 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -36,7 +36,7 @@ extern const struct address_space_operations cifs_addr_ops; | |||
36 | extern const struct address_space_operations cifs_addr_ops_smallbuf; | 36 | extern const struct address_space_operations cifs_addr_ops_smallbuf; |
37 | 37 | ||
38 | /* Functions related to super block operations */ | 38 | /* Functions related to super block operations */ |
39 | extern struct super_operations cifs_super_ops; | 39 | /* extern struct super_operations cifs_super_ops;*/ |
40 | extern void cifs_read_inode(struct inode *); | 40 | extern void cifs_read_inode(struct inode *); |
41 | extern void cifs_delete_inode(struct inode *); | 41 | extern void cifs_delete_inode(struct inode *); |
42 | /* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */ | 42 | /* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */ |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index b24006c47df1..441f8d2514fa 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -512,7 +512,8 @@ require use of the stronger protocol */ | |||
512 | * This list helps improve performance and eliminate the messages indicating | 512 | * This list helps improve performance and eliminate the messages indicating |
513 | * that we had a communications error talking to the server in this list. | 513 | * that we had a communications error talking to the server in this list. |
514 | */ | 514 | */ |
515 | GLOBAL_EXTERN struct servers_not_supported *NotSuppList; /*@z4a */ | 515 | /* Feature not supported */ |
516 | /* GLOBAL_EXTERN struct servers_not_supported *NotSuppList; */ | ||
516 | 517 | ||
517 | /* | 518 | /* |
518 | * The following is a hash table of all the users we know about. | 519 | * The following is a hash table of all the users we know about. |
@@ -568,7 +569,6 @@ GLOBAL_EXTERN unsigned int lookupCacheEnabled; | |||
568 | GLOBAL_EXTERN unsigned int extended_security; /* if on, session setup sent | 569 | GLOBAL_EXTERN unsigned int extended_security; /* if on, session setup sent |
569 | with more secure ntlmssp2 challenge/resp */ | 570 | with more secure ntlmssp2 challenge/resp */ |
570 | GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */ | 571 | GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */ |
571 | GLOBAL_EXTERN unsigned int secFlags; | ||
572 | GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/ | 572 | GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/ |
573 | GLOBAL_EXTERN unsigned int CIFSMaxBufSize; /* max size not including hdr */ | 573 | GLOBAL_EXTERN unsigned int CIFSMaxBufSize; /* max size not including hdr */ |
574 | GLOBAL_EXTERN unsigned int cifs_min_rcv; /* min size of big ntwrk buf pool */ | 574 | GLOBAL_EXTERN unsigned int cifs_min_rcv; /* min size of big ntwrk buf pool */ |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 2fbc982aa13d..7dd2f48a4073 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -50,11 +50,11 @@ extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *, | |||
50 | extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, | 50 | extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, |
51 | struct kvec *, int /* nvec to send */, | 51 | struct kvec *, int /* nvec to send */, |
52 | int * /* type of buf returned */ , const int long_op); | 52 | int * /* type of buf returned */ , const int long_op); |
53 | extern int SendReceiveBlockingLock(const unsigned int /* xid */ , struct cifsTconInfo *, | 53 | extern int SendReceiveBlockingLock(const unsigned int /* xid */ , |
54 | struct cifsTconInfo *, | ||
54 | struct smb_hdr * /* input */ , | 55 | struct smb_hdr * /* input */ , |
55 | struct smb_hdr * /* out */ , | 56 | struct smb_hdr * /* out */ , |
56 | int * /* bytes returned */); | 57 | int * /* bytes returned */); |
57 | extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); | ||
58 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); | 58 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); |
59 | extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); | 59 | extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); |
60 | extern int is_size_safe_to_change(struct cifsInodeInfo *); | 60 | extern int is_size_safe_to_change(struct cifsInodeInfo *); |
@@ -282,8 +282,6 @@ extern void sesInfoFree(struct cifsSesInfo *); | |||
282 | extern struct cifsTconInfo *tconInfoAlloc(void); | 282 | extern struct cifsTconInfo *tconInfoAlloc(void); |
283 | extern void tconInfoFree(struct cifsTconInfo *); | 283 | extern void tconInfoFree(struct cifsTconInfo *); |
284 | 284 | ||
285 | extern int cifs_reconnect(struct TCP_Server_Info *server); | ||
286 | |||
287 | extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *,__u32 *); | 285 | extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *,__u32 *); |
288 | extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *, | 286 | extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *, |
289 | __u32 *); | 287 | __u32 *); |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 2851d6e0d823..dcd7087a1ae8 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2773,9 +2773,11 @@ GetExtAttrOut: | |||
2773 | 2773 | ||
2774 | 2774 | ||
2775 | /* security id for everyone */ | 2775 | /* security id for everyone */ |
2776 | const struct cifs_sid sid_everyone = {1, 1, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0}}; | 2776 | const static struct cifs_sid sid_everyone = |
2777 | {1, 1, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0}}; | ||
2777 | /* group users */ | 2778 | /* group users */ |
2778 | const struct cifs_sid sid_user = {1, 2 , {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0}}; | 2779 | const static struct cifs_sid sid_user = |
2780 | {1, 2 , {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0}}; | ||
2779 | 2781 | ||
2780 | /* Convert CIFS ACL to POSIX form */ | 2782 | /* Convert CIFS ACL to POSIX form */ |
2781 | static int parse_sec_desc(struct cifs_sid * psec_desc, int acl_len) | 2783 | static int parse_sec_desc(struct cifs_sid * psec_desc, int acl_len) |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0e9ba0b9d71e..b3268e53ab95 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -109,7 +109,7 @@ static int ipv6_connect(struct sockaddr_in6 *psin_server, | |||
109 | * wake up waiters on reconnection? - (not needed currently) | 109 | * wake up waiters on reconnection? - (not needed currently) |
110 | */ | 110 | */ |
111 | 111 | ||
112 | int | 112 | static int |
113 | cifs_reconnect(struct TCP_Server_Info *server) | 113 | cifs_reconnect(struct TCP_Server_Info *server) |
114 | { | 114 | { |
115 | int rc = 0; | 115 | int rc = 0; |
@@ -771,13 +771,17 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol) | |||
771 | separator[0] = ','; | 771 | separator[0] = ','; |
772 | separator[1] = 0; | 772 | separator[1] = 0; |
773 | 773 | ||
774 | memset(vol->source_rfc1001_name,0x20,15); | 774 | if(Local_System_Name[0] != 0) |
775 | for(i=0;i < strnlen(system_utsname.nodename,15);i++) { | 775 | memcpy(vol->source_rfc1001_name, Local_System_Name,15); |
776 | /* does not have to be a perfect mapping since the field is | 776 | else { |
777 | informational, only used for servers that do not support | 777 | memset(vol->source_rfc1001_name,0x20,15); |
778 | port 445 and it can be overridden at mount time */ | 778 | for(i=0;i < strnlen(system_utsname.nodename,15);i++) { |
779 | vol->source_rfc1001_name[i] = | 779 | /* does not have to be perfect mapping since field is |
780 | toupper(system_utsname.nodename[i]); | 780 | informational, only used for servers that do not support |
781 | port 445 and it can be overridden at mount time */ | ||
782 | vol->source_rfc1001_name[i] = | ||
783 | toupper(system_utsname.nodename[i]); | ||
784 | } | ||
781 | } | 785 | } |
782 | vol->source_rfc1001_name[15] = 0; | 786 | vol->source_rfc1001_name[15] = 0; |
783 | /* null target name indicates to use *SMBSERVR default called name | 787 | /* null target name indicates to use *SMBSERVR default called name |
diff --git a/fs/cifs/md5.c b/fs/cifs/md5.c index 7aa23490541f..273aa0383f27 100644 --- a/fs/cifs/md5.c +++ b/fs/cifs/md5.c | |||
@@ -255,7 +255,7 @@ MD5Transform(__u32 buf[4], __u32 const in[16]) | |||
255 | /*********************************************************************** | 255 | /*********************************************************************** |
256 | the rfc 2104 version of hmac_md5 initialisation. | 256 | the rfc 2104 version of hmac_md5 initialisation. |
257 | ***********************************************************************/ | 257 | ***********************************************************************/ |
258 | void | 258 | static void |
259 | hmac_md5_init_rfc2104(unsigned char *key, int key_len, | 259 | hmac_md5_init_rfc2104(unsigned char *key, int key_len, |
260 | struct HMACMD5Context *ctx) | 260 | struct HMACMD5Context *ctx) |
261 | { | 261 | { |
@@ -350,7 +350,7 @@ hmac_md5_final(unsigned char *digest, struct HMACMD5Context *ctx) | |||
350 | single function to calculate an HMAC MD5 digest from data. | 350 | single function to calculate an HMAC MD5 digest from data. |
351 | use the microsoft hmacmd5 init method because the key is 16 bytes. | 351 | use the microsoft hmacmd5 init method because the key is 16 bytes. |
352 | ************************************************************/ | 352 | ************************************************************/ |
353 | void | 353 | static void |
354 | hmac_md5(unsigned char key[16], unsigned char *data, int data_len, | 354 | hmac_md5(unsigned char key[16], unsigned char *data, int data_len, |
355 | unsigned char *digest) | 355 | unsigned char *digest) |
356 | { | 356 | { |
diff --git a/fs/cifs/md5.h b/fs/cifs/md5.h index 00e1c5394fe1..f7d4f4197bac 100644 --- a/fs/cifs/md5.h +++ b/fs/cifs/md5.h | |||
@@ -27,12 +27,12 @@ void MD5Final(unsigned char digest[16], struct MD5Context *context); | |||
27 | 27 | ||
28 | /* The following definitions come from lib/hmacmd5.c */ | 28 | /* The following definitions come from lib/hmacmd5.c */ |
29 | 29 | ||
30 | void hmac_md5_init_rfc2104(unsigned char *key, int key_len, | 30 | /* void hmac_md5_init_rfc2104(unsigned char *key, int key_len, |
31 | struct HMACMD5Context *ctx); | 31 | struct HMACMD5Context *ctx);*/ |
32 | void hmac_md5_init_limK_to_64(const unsigned char *key, int key_len, | 32 | void hmac_md5_init_limK_to_64(const unsigned char *key, int key_len, |
33 | struct HMACMD5Context *ctx); | 33 | struct HMACMD5Context *ctx); |
34 | void hmac_md5_update(const unsigned char *text, int text_len, | 34 | void hmac_md5_update(const unsigned char *text, int text_len, |
35 | struct HMACMD5Context *ctx); | 35 | struct HMACMD5Context *ctx); |
36 | void hmac_md5_final(unsigned char *digest, struct HMACMD5Context *ctx); | 36 | void hmac_md5_final(unsigned char *digest, struct HMACMD5Context *ctx); |
37 | void hmac_md5(unsigned char key[16], unsigned char *data, int data_len, | 37 | /* void hmac_md5(unsigned char key[16], unsigned char *data, int data_len, |
38 | unsigned char *digest); | 38 | unsigned char *digest);*/ |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 22c937e5884f..ca6e9b1413fa 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -389,7 +389,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , | |||
389 | return; | 389 | return; |
390 | } | 390 | } |
391 | 391 | ||
392 | int | 392 | static int |
393 | checkSMBhdr(struct smb_hdr *smb, __u16 mid) | 393 | checkSMBhdr(struct smb_hdr *smb, __u16 mid) |
394 | { | 394 | { |
395 | /* Make sure that this really is an SMB, that it is a response, | 395 | /* Make sure that this really is an SMB, that it is a response, |
diff --git a/fs/cifs/smbdes.c b/fs/cifs/smbdes.c index efaa044523a7..2b193e422f83 100644 --- a/fs/cifs/smbdes.c +++ b/fs/cifs/smbdes.c | |||
@@ -364,14 +364,14 @@ E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24) | |||
364 | smbhash(p24 + 16, c8, p21 + 14, 1); | 364 | smbhash(p24 + 16, c8, p21 + 14, 1); |
365 | } | 365 | } |
366 | 366 | ||
367 | void | 367 | static void |
368 | D_P16(unsigned char *p14, unsigned char *in, unsigned char *out) | 368 | D_P16(unsigned char *p14, unsigned char *in, unsigned char *out) |
369 | { | 369 | { |
370 | smbhash(out, in, p14, 0); | 370 | smbhash(out, in, p14, 0); |
371 | smbhash(out + 8, in + 8, p14 + 7, 0); | 371 | smbhash(out + 8, in + 8, p14 + 7, 0); |
372 | } | 372 | } |
373 | 373 | ||
374 | void | 374 | static void |
375 | E_old_pw_hash(unsigned char *p14, unsigned char *in, unsigned char *out) | 375 | E_old_pw_hash(unsigned char *p14, unsigned char *in, unsigned char *out) |
376 | { | 376 | { |
377 | smbhash(out, in, p14, 1); | 377 | smbhash(out, in, p14, 1); |
diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c index f518c5e45035..c7e55a940e2e 100644 --- a/fs/cifs/smbencrypt.c +++ b/fs/cifs/smbencrypt.c | |||
@@ -145,7 +145,7 @@ E_md4hash(const unsigned char *passwd, unsigned char *p16) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | /* Does both the NT and LM owfs of a user's password */ | 147 | /* Does both the NT and LM owfs of a user's password */ |
148 | void | 148 | static void |
149 | nt_lm_owf_gen(char *pwd, unsigned char nt_p16[16], unsigned char p16[16]) | 149 | nt_lm_owf_gen(char *pwd, unsigned char nt_p16[16], unsigned char p16[16]) |
150 | { | 150 | { |
151 | char passwd[514]; | 151 | char passwd[514]; |
@@ -223,7 +223,7 @@ SMBOWFencrypt(unsigned char passwd[16], unsigned char *c8, | |||
223 | } | 223 | } |
224 | 224 | ||
225 | /* Does the des encryption from the FIRST 8 BYTES of the NT or LM MD4 hash. */ | 225 | /* Does the des encryption from the FIRST 8 BYTES of the NT or LM MD4 hash. */ |
226 | void | 226 | static void |
227 | NTLMSSPOWFencrypt(unsigned char passwd[8], | 227 | NTLMSSPOWFencrypt(unsigned char passwd[8], |
228 | unsigned char *ntlmchalresp, unsigned char p24[24]) | 228 | unsigned char *ntlmchalresp, unsigned char p24[24]) |
229 | { | 229 | { |