aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index b98742fc3b5a..87f51f23276f 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -19,6 +19,7 @@
19#include <linux/in.h> 19#include <linux/in.h>
20#include <linux/in6.h> 20#include <linux/in6.h>
21#include "cifs_fs_sb.h" 21#include "cifs_fs_sb.h"
22#include "cifsacl.h"
22/* 23/*
23 * The sizes of various internal tables and strings 24 * The sizes of various internal tables and strings
24 */ 25 */
@@ -89,7 +90,8 @@ enum statusEnum {
89}; 90};
90 91
91enum securityEnum { 92enum securityEnum {
92 LANMAN = 0, /* Legacy LANMAN auth */ 93 PLAINTXT = 0, /* Legacy with Plaintext passwords */
94 LANMAN, /* Legacy LANMAN auth */
93 NTLM, /* Legacy NTLM012 auth with NTLM hash */ 95 NTLM, /* Legacy NTLM012 auth with NTLM hash */
94 NTLMv2, /* Legacy NTLM auth with NTLMv2 hash */ 96 NTLMv2, /* Legacy NTLM auth with NTLMv2 hash */
95 RawNTLMSSP, /* NTLMSSP without SPNEGO */ 97 RawNTLMSSP, /* NTLMSSP without SPNEGO */
@@ -115,6 +117,17 @@ struct mac_key {
115 } data; 117 } data;
116}; 118};
117 119
120struct cifs_cred {
121 int uid;
122 int gid;
123 int mode;
124 int cecount;
125 struct cifs_sid osid;
126 struct cifs_sid gsid;
127 struct cifs_ntace *ntaces;
128 struct cifs_ace *aces;
129};
130
118/* 131/*
119 ***************************************************************** 132 *****************************************************************
120 * Except the CIFS PDUs themselves all the 133 * Except the CIFS PDUs themselves all the
@@ -279,6 +292,7 @@ struct cifsTconInfo {
279 FILE_SYSTEM_DEVICE_INFO fsDevInfo; 292 FILE_SYSTEM_DEVICE_INFO fsDevInfo;
280 FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */ 293 FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */
281 FILE_SYSTEM_UNIX_INFO fsUnixInfo; 294 FILE_SYSTEM_UNIX_INFO fsUnixInfo;
295 unsigned ipc:1; /* set if connection to IPC$ eg for RPC/PIPES */
282 unsigned retry:1; 296 unsigned retry:1;
283 unsigned nocase:1; 297 unsigned nocase:1;
284 unsigned unix_ext:1; /* if off disable Linux extensions to CIFS protocol 298 unsigned unix_ext:1; /* if off disable Linux extensions to CIFS protocol
@@ -329,6 +343,7 @@ struct cifsFileInfo {
329 struct list_head llist; /* list of byte range locks we have. */ 343 struct list_head llist; /* list of byte range locks we have. */
330 unsigned closePend:1; /* file is marked to close */ 344 unsigned closePend:1; /* file is marked to close */
331 unsigned invalidHandle:1; /* file closed via session abend */ 345 unsigned invalidHandle:1; /* file closed via session abend */
346 unsigned messageMode:1; /* for pipes: message vs byte mode */
332 atomic_t wrtPending; /* handle in use - defer close */ 347 atomic_t wrtPending; /* handle in use - defer close */
333 struct semaphore fh_sem; /* prevents reopen race after dead ses*/ 348 struct semaphore fh_sem; /* prevents reopen race after dead ses*/
334 char *search_resume_name; /* BB removeme BB */ 349 char *search_resume_name; /* BB removeme BB */
@@ -464,6 +479,9 @@ struct dir_notify_req {
464#ifdef CONFIG_CIFS_WEAK_PW_HASH 479#ifdef CONFIG_CIFS_WEAK_PW_HASH
465#define CIFSSEC_MAY_LANMAN 0x00010 480#define CIFSSEC_MAY_LANMAN 0x00010
466#define CIFSSEC_MAY_PLNTXT 0x00020 481#define CIFSSEC_MAY_PLNTXT 0x00020
482#else
483#define CIFSSEC_MAY_LANMAN 0
484#define CIFSSEC_MAY_PLNTXT 0
467#endif /* weak passwords */ 485#endif /* weak passwords */
468#define CIFSSEC_MAY_SEAL 0x00040 /* not supported yet */ 486#define CIFSSEC_MAY_SEAL 0x00040 /* not supported yet */
469 487
@@ -477,14 +495,23 @@ require use of the stronger protocol */
477#ifdef CONFIG_CIFS_WEAK_PW_HASH 495#ifdef CONFIG_CIFS_WEAK_PW_HASH
478#define CIFSSEC_MUST_LANMAN 0x10010 496#define CIFSSEC_MUST_LANMAN 0x10010
479#define CIFSSEC_MUST_PLNTXT 0x20020 497#define CIFSSEC_MUST_PLNTXT 0x20020
498#ifdef CONFIG_CIFS_UPCALL
499#define CIFSSEC_MASK 0x3F03F /* allows weak security but also krb5 */
500#else
480#define CIFSSEC_MASK 0x37037 /* current flags supported if weak */ 501#define CIFSSEC_MASK 0x37037 /* current flags supported if weak */
502#endif /* UPCALL */
503#else /* do not allow weak pw hash */
504#ifdef CONFIG_CIFS_UPCALL
505#define CIFSSEC_MASK 0x0F00F /* flags supported if no weak allowed */
481#else 506#else
482#define CIFSSEC_MASK 0x07007 /* flags supported if no weak config */ 507#define CIFSSEC_MASK 0x07007 /* flags supported if no weak allowed */
508#endif /* UPCALL */
483#endif /* WEAK_PW_HASH */ 509#endif /* WEAK_PW_HASH */
484#define CIFSSEC_MUST_SEAL 0x40040 /* not supported yet */ 510#define CIFSSEC_MUST_SEAL 0x40040 /* not supported yet */
485 511
486#define CIFSSEC_DEF CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2 512#define CIFSSEC_DEF CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2
487#define CIFSSEC_MAX CIFSSEC_MUST_SIGN | CIFSSEC_MUST_NTLMV2 513#define CIFSSEC_MAX CIFSSEC_MUST_SIGN | CIFSSEC_MUST_NTLMV2
514#define CIFSSEC_AUTH_MASK (CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_LANMAN | CIFSSEC_MAY_PLNTXT | CIFSSEC_MAY_KRB5)
488/* 515/*
489 ***************************************************************** 516 *****************************************************************
490 * All constants go here 517 * All constants go here