4 * Copyright (C) International Business Machines Corp., 2000,2005
6 * Modified by Steve French (sfrench@us.ibm.com)
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
16 * the GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <linux/string.h>
24 #include <linux/ctype.h>
25 #include <linux/module.h>
26 #include <linux/proc_fs.h>
27 #include <asm/uaccess.h>
30 #include "cifsproto.h"
31 #include "cifs_debug.h"
35 cifs_dump_mem(char *label
, void *data
, int length
)
40 char buf
[10], line
[80];
42 printk(KERN_DEBUG
"%s: dump of %d bytes of data at 0x%p\n",
44 for (i
= 0; i
< length
; i
+= 16) {
46 for (j
= 0; (j
< 4) && (i
+ j
* 4 < length
); j
++) {
47 sprintf(buf
, " %08x", intptr
[i
/ 4 + j
]);
52 for (j
= 0; (j
< 16) && (i
+ j
< length
); j
++) {
53 buf
[1] = isprint(charptr
[i
+ j
]) ? charptr
[i
+ j
] : '.';
56 printk(KERN_DEBUG
"%s\n", line
);
60 #ifdef CONFIG_CIFS_DEBUG2
61 void cifs_dump_detail(struct smb_hdr
*smb
)
63 cERROR(1, ("Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d",
64 smb
->Command
, smb
->Status
.CifsError
,
65 smb
->Flags
, smb
->Flags2
, smb
->Mid
, smb
->Pid
));
66 cERROR(1, ("smb buf %p len %d", smb
, smbCalcSize_LE(smb
)));
70 void cifs_dump_mids(struct TCP_Server_Info
*server
)
72 struct list_head
*tmp
;
73 struct mid_q_entry
*mid_entry
;
78 cERROR(1, ("Dump pending requests:"));
79 spin_lock(&GlobalMid_Lock
);
80 list_for_each(tmp
, &server
->pending_mid_q
) {
81 mid_entry
= list_entry(tmp
, struct mid_q_entry
, qhead
);
83 cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d",
85 (int)mid_entry
->command
,
89 #ifdef CONFIG_CIFS_STATS2
90 cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld",
93 mid_entry
->when_received
,
96 cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry
->multiRsp
,
97 mid_entry
->multiEnd
));
98 if (mid_entry
->resp_buf
) {
99 cifs_dump_detail(mid_entry
->resp_buf
);
100 cifs_dump_mem("existing buf: ",
101 <<<<<<< HEAD
:fs
/cifs
/cifs_debug
.c
105 mid_entry
->resp_buf
, 62);
106 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:fs
/cifs
/cifs_debug
.c
110 spin_unlock(&GlobalMid_Lock
);
112 #endif /* CONFIG_CIFS_DEBUG2 */
114 #ifdef CONFIG_PROC_FS
116 cifs_debug_data_read(char *buf
, char **beginBuffer
, off_t offset
,
117 int count
, int *eof
, void *data
)
119 struct list_head
*tmp
;
120 struct list_head
*tmp1
;
121 struct mid_q_entry
*mid_entry
;
122 struct cifsSesInfo
*ses
;
123 struct cifsTconInfo
*tcon
;
126 char *original_buf
= buf
;
128 *beginBuffer
= buf
+ offset
;
132 "Display Internal CIFS Data Structures for Debugging\n"
133 "---------------------------------------------------\n");
135 length
= sprintf(buf
, "CIFS Version %s\n", CIFS_VERSION
);
137 length
= sprintf(buf
,
138 "Active VFS Requests: %d\n", GlobalTotalActiveXid
);
140 length
= sprintf(buf
, "Servers:");
144 read_lock(&GlobalSMBSeslock
);
145 list_for_each(tmp
, &GlobalSMBSessionList
) {
147 ses
= list_entry(tmp
, struct cifsSesInfo
, cifsSessionList
);
148 if ((ses
->serverDomain
== NULL
) || (ses
->serverOS
== NULL
) ||
149 (ses
->serverNOS
== NULL
)) {
150 buf
+= sprintf(buf
, "\nentry for %s not fully "
151 "displayed\n\t", ses
->serverName
);
155 "\n%d) Name: %s Domain: %s Mounts: %d OS:"
156 " %s \n\tNOS: %s\tCapability: 0x%x\n\tSMB"
157 " session status: %d\t",
158 i
, ses
->serverName
, ses
->serverDomain
,
159 atomic_read(&ses
->inUse
),
160 ses
->serverOS
, ses
->serverNOS
,
161 ses
->capabilities
, ses
->status
);
165 buf
+= sprintf(buf
, "TCP status: %d\n\tLocal Users To "
166 "Server: %d SecMode: 0x%x Req On Wire: %d",
167 ses
->server
->tcpStatus
,
168 atomic_read(&ses
->server
->socketUseCount
),
169 ses
->server
->secMode
,
170 atomic_read(&ses
->server
->inFlight
));
172 #ifdef CONFIG_CIFS_STATS2
173 buf
+= sprintf(buf
, " In Send: %d In MaxReq Wait: %d",
174 atomic_read(&ses
->server
->inSend
),
175 atomic_read(&ses
->server
->num_waiters
));
178 length
= sprintf(buf
, "\nMIDs:\n");
181 spin_lock(&GlobalMid_Lock
);
182 list_for_each(tmp1
, &ses
->server
->pending_mid_q
) {
183 mid_entry
= list_entry(tmp1
, struct
187 length
= sprintf(buf
,
188 "State: %d com: %d pid:"
189 " %d tsk: %p mid %d\n",
191 (int)mid_entry
->command
,
198 spin_unlock(&GlobalMid_Lock
);
202 read_unlock(&GlobalSMBSeslock
);
206 length
= sprintf(buf
, "Shares:");
210 read_lock(&GlobalSMBSeslock
);
211 list_for_each(tmp
, &GlobalTreeConnectionList
) {
214 tcon
= list_entry(tmp
, struct cifsTconInfo
, cifsConnectionList
);
215 dev_type
= le32_to_cpu(tcon
->fsDevInfo
.DeviceType
);
216 length
= sprintf(buf
, "\n%d) %s Uses: %d ", i
,
217 tcon
->treeName
, atomic_read(&tcon
->useCount
));
219 if (tcon
->nativeFileSystem
) {
220 length
= sprintf(buf
, "Type: %s ",
221 tcon
->nativeFileSystem
);
224 length
= sprintf(buf
, "DevInfo: 0x%x Attributes: 0x%x"
225 "\nPathComponentMax: %d Status: %d",
226 le32_to_cpu(tcon
->fsDevInfo
.DeviceCharacteristics
),
227 le32_to_cpu(tcon
->fsAttrInfo
.Attributes
),
228 le32_to_cpu(tcon
->fsAttrInfo
.MaxPathNameComponentLength
),
231 if (dev_type
== FILE_DEVICE_DISK
)
232 length
= sprintf(buf
, " type: DISK ");
233 else if (dev_type
== FILE_DEVICE_CD_ROM
)
234 length
= sprintf(buf
, " type: CDROM ");
237 sprintf(buf
, " type: %d ", dev_type
);
239 if (tcon
->tidStatus
== CifsNeedReconnect
) {
240 buf
+= sprintf(buf
, "\tDISCONNECTED ");
244 read_unlock(&GlobalSMBSeslock
);
246 length
= sprintf(buf
, "\n");
249 /* BB add code to dump additional info such as TCP session info now */
250 /* Now calculate total size of returned data */
251 length
= buf
- original_buf
;
253 if (offset
+ count
>= length
)
255 if (length
< offset
) {
259 length
= length
- offset
;
267 #ifdef CONFIG_CIFS_STATS
270 cifs_stats_write(struct file
*file
, const char __user
*buffer
,
271 unsigned long count
, void *data
)
275 struct list_head
*tmp
;
276 struct cifsTconInfo
*tcon
;
278 rc
= get_user(c
, buffer
);
282 if (c
== '1' || c
== 'y' || c
== 'Y' || c
== '0') {
283 read_lock(&GlobalSMBSeslock
);
284 #ifdef CONFIG_CIFS_STATS2
285 atomic_set(&totBufAllocCount
, 0);
286 atomic_set(&totSmBufAllocCount
, 0);
287 #endif /* CONFIG_CIFS_STATS2 */
288 list_for_each(tmp
, &GlobalTreeConnectionList
) {
289 tcon
= list_entry(tmp
, struct cifsTconInfo
,
291 atomic_set(&tcon
->num_smbs_sent
, 0);
292 atomic_set(&tcon
->num_writes
, 0);
293 atomic_set(&tcon
->num_reads
, 0);
294 atomic_set(&tcon
->num_oplock_brks
, 0);
295 atomic_set(&tcon
->num_opens
, 0);
296 atomic_set(&tcon
->num_closes
, 0);
297 atomic_set(&tcon
->num_deletes
, 0);
298 atomic_set(&tcon
->num_mkdirs
, 0);
299 atomic_set(&tcon
->num_rmdirs
, 0);
300 atomic_set(&tcon
->num_renames
, 0);
301 atomic_set(&tcon
->num_t2renames
, 0);
302 atomic_set(&tcon
->num_ffirst
, 0);
303 atomic_set(&tcon
->num_fnext
, 0);
304 atomic_set(&tcon
->num_fclose
, 0);
305 atomic_set(&tcon
->num_hardlinks
, 0);
306 atomic_set(&tcon
->num_symlinks
, 0);
307 atomic_set(&tcon
->num_locks
, 0);
309 read_unlock(&GlobalSMBSeslock
);
316 cifs_stats_read(char *buf
, char **beginBuffer
, off_t offset
,
317 int count
, int *eof
, void *data
)
319 int item_length
, i
, length
;
320 struct list_head
*tmp
;
321 struct cifsTconInfo
*tcon
;
323 *beginBuffer
= buf
+ offset
;
325 length
= sprintf(buf
,
326 "Resources in use\nCIFS Session: %d\n",
327 sesInfoAllocCount
.counter
);
330 sprintf(buf
, "Share (unique mount targets): %d\n",
331 tconInfoAllocCount
.counter
);
332 length
+= item_length
;
335 sprintf(buf
, "SMB Request/Response Buffer: %d Pool size: %d\n",
336 bufAllocCount
.counter
,
337 cifs_min_rcv
+ tcpSesAllocCount
.counter
);
338 length
+= item_length
;
341 sprintf(buf
, "SMB Small Req/Resp Buffer: %d Pool size: %d\n",
342 smBufAllocCount
.counter
, cifs_min_small
);
343 length
+= item_length
;
345 #ifdef CONFIG_CIFS_STATS2
346 item_length
= sprintf(buf
, "Total Large %d Small %d Allocations\n",
347 atomic_read(&totBufAllocCount
),
348 atomic_read(&totSmBufAllocCount
));
349 length
+= item_length
;
351 #endif /* CONFIG_CIFS_STATS2 */
354 sprintf(buf
, "Operations (MIDs): %d\n",
356 length
+= item_length
;
358 item_length
= sprintf(buf
,
359 "\n%d session %d share reconnects\n",
360 tcpSesReconnectCount
.counter
, tconInfoReconnectCount
.counter
);
361 length
+= item_length
;
364 item_length
= sprintf(buf
,
365 "Total vfs operations: %d maximum at one time: %d\n",
366 GlobalCurrentXid
, GlobalMaxActiveXid
);
367 length
+= item_length
;
371 read_lock(&GlobalSMBSeslock
);
372 list_for_each(tmp
, &GlobalTreeConnectionList
) {
374 tcon
= list_entry(tmp
, struct cifsTconInfo
, cifsConnectionList
);
375 item_length
= sprintf(buf
, "\n%d) %s", i
, tcon
->treeName
);
377 length
+= item_length
;
378 if (tcon
->tidStatus
== CifsNeedReconnect
) {
379 buf
+= sprintf(buf
, "\tDISCONNECTED ");
382 item_length
= sprintf(buf
, "\nSMBs: %d Oplock Breaks: %d",
383 atomic_read(&tcon
->num_smbs_sent
),
384 atomic_read(&tcon
->num_oplock_brks
));
386 length
+= item_length
;
387 item_length
= sprintf(buf
, "\nReads: %d Bytes: %lld",
388 atomic_read(&tcon
->num_reads
),
389 (long long)(tcon
->bytes_read
));
391 length
+= item_length
;
392 item_length
= sprintf(buf
, "\nWrites: %d Bytes: %lld",
393 atomic_read(&tcon
->num_writes
),
394 (long long)(tcon
->bytes_written
));
396 length
+= item_length
;
397 item_length
= sprintf(buf
,
398 "\nLocks: %d HardLinks: %d Symlinks: %d",
399 atomic_read(&tcon
->num_locks
),
400 atomic_read(&tcon
->num_hardlinks
),
401 atomic_read(&tcon
->num_symlinks
));
403 length
+= item_length
;
405 item_length
= sprintf(buf
, "\nOpens: %d Closes: %d Deletes: %d",
406 atomic_read(&tcon
->num_opens
),
407 atomic_read(&tcon
->num_closes
),
408 atomic_read(&tcon
->num_deletes
));
410 length
+= item_length
;
411 item_length
= sprintf(buf
, "\nMkdirs: %d Rmdirs: %d",
412 atomic_read(&tcon
->num_mkdirs
),
413 atomic_read(&tcon
->num_rmdirs
));
415 length
+= item_length
;
416 item_length
= sprintf(buf
, "\nRenames: %d T2 Renames %d",
417 atomic_read(&tcon
->num_renames
),
418 atomic_read(&tcon
->num_t2renames
));
420 length
+= item_length
;
421 item_length
= sprintf(buf
, "\nFindFirst: %d FNext %d FClose %d",
422 atomic_read(&tcon
->num_ffirst
),
423 atomic_read(&tcon
->num_fnext
),
424 atomic_read(&tcon
->num_fclose
));
426 length
+= item_length
;
428 read_unlock(&GlobalSMBSeslock
);
430 buf
+= sprintf(buf
, "\n");
433 if (offset
+ count
>= length
)
435 if (length
< offset
) {
439 length
= length
- offset
;
446 <<<<<<< HEAD
:fs
/cifs
/cifs_debug
.c
450 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:fs
/cifs
/cifs_debug
.c
452 static struct proc_dir_entry
*proc_fs_cifs
;
453 read_proc_t cifs_txanchor_read
;
454 static read_proc_t cifsFYI_read
;
455 static write_proc_t cifsFYI_write
;
456 static read_proc_t oplockEnabled_read
;
457 static write_proc_t oplockEnabled_write
;
458 static read_proc_t lookupFlag_read
;
459 static write_proc_t lookupFlag_write
;
460 static read_proc_t traceSMB_read
;
461 static write_proc_t traceSMB_write
;
462 static read_proc_t multiuser_mount_read
;
463 static write_proc_t multiuser_mount_write
;
464 static read_proc_t security_flags_read
;
465 static write_proc_t security_flags_write
;
466 /* static read_proc_t ntlmv2_enabled_read;
467 static write_proc_t ntlmv2_enabled_write;
468 static read_proc_t packet_signing_enabled_read;
469 static write_proc_t packet_signing_enabled_write;*/
470 static read_proc_t experimEnabled_read
;
471 static write_proc_t experimEnabled_write
;
472 static read_proc_t linuxExtensionsEnabled_read
;
473 static write_proc_t linuxExtensionsEnabled_write
;
478 struct proc_dir_entry
*pde
;
480 proc_fs_cifs
= proc_mkdir("cifs", proc_root_fs
);
481 if (proc_fs_cifs
== NULL
)
484 proc_fs_cifs
->owner
= THIS_MODULE
;
485 create_proc_read_entry("DebugData", 0, proc_fs_cifs
,
486 cifs_debug_data_read
, NULL
);
488 #ifdef CONFIG_CIFS_STATS
489 pde
= create_proc_read_entry("Stats", 0, proc_fs_cifs
,
490 cifs_stats_read
, NULL
);
492 pde
->write_proc
= cifs_stats_write
;
493 <<<<<<< HEAD
:fs
/cifs
/cifs_debug
.c
497 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:fs
/cifs
/cifs_debug
.c
498 pde
= create_proc_read_entry("cifsFYI", 0, proc_fs_cifs
,
501 pde
->write_proc
= cifsFYI_write
;
504 create_proc_read_entry("traceSMB", 0, proc_fs_cifs
,
505 traceSMB_read
, NULL
);
507 pde
->write_proc
= traceSMB_write
;
509 pde
= create_proc_read_entry("OplockEnabled", 0, proc_fs_cifs
,
510 oplockEnabled_read
, NULL
);
512 pde
->write_proc
= oplockEnabled_write
;
514 pde
= create_proc_read_entry("Experimental", 0, proc_fs_cifs
,
515 experimEnabled_read
, NULL
);
517 pde
->write_proc
= experimEnabled_write
;
519 pde
= create_proc_read_entry("LinuxExtensionsEnabled", 0, proc_fs_cifs
,
520 linuxExtensionsEnabled_read
, NULL
);
522 pde
->write_proc
= linuxExtensionsEnabled_write
;
525 create_proc_read_entry("MultiuserMount", 0, proc_fs_cifs
,
526 multiuser_mount_read
, NULL
);
528 pde
->write_proc
= multiuser_mount_write
;
531 create_proc_read_entry("SecurityFlags", 0, proc_fs_cifs
,
532 security_flags_read
, NULL
);
534 pde
->write_proc
= security_flags_write
;
537 create_proc_read_entry("LookupCacheEnabled", 0, proc_fs_cifs
,
538 lookupFlag_read
, NULL
);
540 pde
->write_proc
= lookupFlag_write
;
543 create_proc_read_entry("NTLMV2Enabled", 0, proc_fs_cifs,
544 ntlmv2_enabled_read, NULL);
546 pde->write_proc = ntlmv2_enabled_write;
549 create_proc_read_entry("PacketSigningEnabled", 0, proc_fs_cifs,
550 packet_signing_enabled_read, NULL);
552 pde->write_proc = packet_signing_enabled_write;*/
556 cifs_proc_clean(void)
558 if (proc_fs_cifs
== NULL
)
561 remove_proc_entry("DebugData", proc_fs_cifs
);
562 remove_proc_entry("cifsFYI", proc_fs_cifs
);
563 remove_proc_entry("traceSMB", proc_fs_cifs
);
564 #ifdef CONFIG_CIFS_STATS
565 remove_proc_entry("Stats", proc_fs_cifs
);
567 remove_proc_entry("MultiuserMount", proc_fs_cifs
);
568 remove_proc_entry("OplockEnabled", proc_fs_cifs
);
569 /* remove_proc_entry("NTLMV2Enabled",proc_fs_cifs); */
570 remove_proc_entry("SecurityFlags", proc_fs_cifs
);
571 /* remove_proc_entry("PacketSigningEnabled", proc_fs_cifs); */
572 remove_proc_entry("LinuxExtensionsEnabled", proc_fs_cifs
);
573 remove_proc_entry("Experimental", proc_fs_cifs
);
574 remove_proc_entry("LookupCacheEnabled", proc_fs_cifs
);
575 remove_proc_entry("cifs", proc_root_fs
);
579 cifsFYI_read(char *page
, char **start
, off_t off
, int count
,
580 int *eof
, void *data
)
584 len
= sprintf(page
, "%d\n", cifsFYI
);
600 cifsFYI_write(struct file
*file
, const char __user
*buffer
,
601 unsigned long count
, void *data
)
606 rc
= get_user(c
, buffer
);
609 if (c
== '0' || c
== 'n' || c
== 'N')
611 else if (c
== '1' || c
== 'y' || c
== 'Y')
613 else if ((c
> '1') && (c
<= '9'))
614 cifsFYI
= (int) (c
- '0'); /* see cifs_debug.h for meanings */
620 oplockEnabled_read(char *page
, char **start
, off_t off
,
621 int count
, int *eof
, void *data
)
625 len
= sprintf(page
, "%d\n", oplockEnabled
);
641 oplockEnabled_write(struct file
*file
, const char __user
*buffer
,
642 unsigned long count
, void *data
)
647 rc
= get_user(c
, buffer
);
650 if (c
== '0' || c
== 'n' || c
== 'N')
652 else if (c
== '1' || c
== 'y' || c
== 'Y')
659 experimEnabled_read(char *page
, char **start
, off_t off
,
660 int count
, int *eof
, void *data
)
664 len
= sprintf(page
, "%d\n", experimEnabled
);
680 experimEnabled_write(struct file
*file
, const char __user
*buffer
,
681 unsigned long count
, void *data
)
686 rc
= get_user(c
, buffer
);
689 if (c
== '0' || c
== 'n' || c
== 'N')
691 else if (c
== '1' || c
== 'y' || c
== 'Y')
700 linuxExtensionsEnabled_read(char *page
, char **start
, off_t off
,
701 int count
, int *eof
, void *data
)
705 len
= sprintf(page
, "%d\n", linuxExtEnabled
);
720 linuxExtensionsEnabled_write(struct file
*file
, const char __user
*buffer
,
721 unsigned long count
, void *data
)
726 rc
= get_user(c
, buffer
);
729 if (c
== '0' || c
== 'n' || c
== 'N')
731 else if (c
== '1' || c
== 'y' || c
== 'Y')
739 lookupFlag_read(char *page
, char **start
, off_t off
,
740 int count
, int *eof
, void *data
)
744 len
= sprintf(page
, "%d\n", lookupCacheEnabled
);
760 lookupFlag_write(struct file
*file
, const char __user
*buffer
,
761 unsigned long count
, void *data
)
766 rc
= get_user(c
, buffer
);
769 if (c
== '0' || c
== 'n' || c
== 'N')
770 lookupCacheEnabled
= 0;
771 else if (c
== '1' || c
== 'y' || c
== 'Y')
772 lookupCacheEnabled
= 1;
777 traceSMB_read(char *page
, char **start
, off_t off
, int count
,
778 int *eof
, void *data
)
782 len
= sprintf(page
, "%d\n", traceSMB
);
798 traceSMB_write(struct file
*file
, const char __user
*buffer
,
799 unsigned long count
, void *data
)
804 rc
= get_user(c
, buffer
);
807 if (c
== '0' || c
== 'n' || c
== 'N')
809 else if (c
== '1' || c
== 'y' || c
== 'Y')
816 multiuser_mount_read(char *page
, char **start
, off_t off
,
817 int count
, int *eof
, void *data
)
821 len
= sprintf(page
, "%d\n", multiuser_mount
);
837 multiuser_mount_write(struct file
*file
, const char __user
*buffer
,
838 unsigned long count
, void *data
)
843 rc
= get_user(c
, buffer
);
846 if (c
== '0' || c
== 'n' || c
== 'N')
848 else if (c
== '1' || c
== 'y' || c
== 'Y')
855 security_flags_read(char *page
, char **start
, off_t off
,
856 int count
, int *eof
, void *data
)
860 len
= sprintf(page
, "0x%x\n", extended_security
);
876 security_flags_write(struct file
*file
, const char __user
*buffer
,
877 unsigned long count
, void *data
)
880 char flags_string
[12];
883 if ((count
< 1) || (count
> 11))
886 memset(flags_string
, 0, 12);
888 if (copy_from_user(flags_string
, buffer
, count
))
892 /* single char or single char followed by null */
894 if (c
== '0' || c
== 'n' || c
== 'N') {
895 extended_security
= CIFSSEC_DEF
; /* default */
897 } else if (c
== '1' || c
== 'y' || c
== 'Y') {
898 extended_security
= CIFSSEC_MAX
;
900 } else if (!isdigit(c
)) {
901 cERROR(1, ("invalid flag %c", c
));
905 /* else we have a number */
907 flags
= simple_strtoul(flags_string
, NULL
, 0);
909 cFYI(1, ("sec flags 0x%x", flags
));
912 cERROR(1, ("invalid security flags %s", flags_string
));
916 if (flags
& ~CIFSSEC_MASK
) {
917 cERROR(1, ("attempt to set unsupported security flags 0x%x",
918 flags
& ~CIFSSEC_MASK
));
921 /* flags look ok - update the global security flags for cifs module */
922 extended_security
= flags
;
923 if (extended_security
& CIFSSEC_MUST_SIGN
) {
924 /* requiring signing implies signing is allowed */
925 extended_security
|= CIFSSEC_MAY_SIGN
;
926 cFYI(1, ("packet signing now required"));
927 } else if ((extended_security
& CIFSSEC_MAY_SIGN
) == 0) {
928 cFYI(1, ("packet signing disabled"));
930 /* BB should we turn on MAY flags for other MUST options? */
933 <<<<<<< HEAD
:fs
/cifs
/cifs_debug
.c
937 inline void cifs_proc_init(void)
941 inline void cifs_proc_clean(void)
945 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:fs
/cifs
/cifs_debug
.c