]> Pileus Git - ~andy/linux/blobdiff - fs/cifs/cifsglob.h
move sectype to the cifs_ses instead of TCP_Server_Info
[~andy/linux] / fs / cifs / cifsglob.h
index 4f07f6fbe4944c5e6f8bdf12c30b4eaed9397976..ad3408042ff06e028402ba24eab0fb8e68950b89 100644 (file)
@@ -101,20 +101,14 @@ enum statusEnum {
 };
 
 enum securityEnum {
-       LANMAN = 0,                     /* Legacy LANMAN auth */
+       Unspecified = 0,        /* not specified */
+       LANMAN,                 /* Legacy LANMAN auth */
        NTLM,                   /* Legacy NTLM012 auth with NTLM hash */
        NTLMv2,                 /* Legacy NTLM auth with NTLMv2 hash */
        RawNTLMSSP,             /* NTLMSSP without SPNEGO, NTLMv2 hash */
-/*     NTLMSSP, */ /* can use rawNTLMSSP instead of NTLMSSP via SPNEGO */
        Kerberos,               /* Kerberos via SPNEGO */
 };
 
-enum protocolEnum {
-       TCP = 0,
-       SCTP
-       /* Netbios frames protocol not supported at this time */
-};
-
 struct session_key {
        unsigned int len;
        char *response;
@@ -407,7 +401,8 @@ struct smb_vol {
        kgid_t backupgid;
        umode_t file_mode;
        umode_t dir_mode;
-       unsigned secFlg;
+       enum securityEnum sectype; /* sectype requested via mnt opts */
+       bool sign; /* was signing requested via mnt opts? */
        bool retry:1;
        bool intr:1;
        bool setuids:1;
@@ -441,6 +436,7 @@ struct smb_vol {
        bool mfsymlinks:1; /* use Minshall+French Symlinks */
        bool multiuser:1;
        bool rwpidforward:1; /* pid forward for read/write operations */
+       bool nosharesock;
        unsigned int rsize;
        unsigned int wsize;
        bool sockopt_tcp_nodelay:1;
@@ -514,6 +510,7 @@ struct TCP_Server_Info {
        struct task_struct *tsk;
        char server_GUID[16];
        __u16 sec_mode;
+       bool sign; /* is signing enabled on this connection? */
        bool session_estab; /* mark when very first sess is established */
 #ifdef CONFIG_CIFS_SMB2
        int echo_credits;  /* echo reserved slots */
@@ -521,7 +518,6 @@ struct TCP_Server_Info {
        bool echoes:1; /* enable echoes */
 #endif
        u16 dialect; /* dialect index that server chose */
-       enum securityEnum secType;
        bool oplocks:1; /* enable oplocks */
        unsigned int maxReq;    /* Clients should submit no more */
        /* than maxReq distinct unanswered SMBs to the server when using  */
@@ -546,6 +542,10 @@ struct TCP_Server_Info {
        struct session_key session_key;
        unsigned long lstrp; /* when we got last response from this server */
        struct cifs_secmech secmech; /* crypto sec mech functs, descriptors */
+#define        CIFS_NEGFLAVOR_LANMAN   0       /* wct == 13, LANMAN */
+#define        CIFS_NEGFLAVOR_UNENCAP  1       /* wct == 17, but no ext_sec */
+#define        CIFS_NEGFLAVOR_EXTENDED 2       /* wct == 17, ext_sec bit set */
+       char    negflavor;      /* NEGOTIATE response flavor */
        /* extended security flavors that server supports */
        bool    sec_ntlmssp;            /* supports NTLMSSP */
        bool    sec_kerberosu2u;        /* supports U2U Kerberos */
@@ -697,7 +697,6 @@ struct cifs_ses {
        enum statusEnum status;
        unsigned overrideSecFlg;  /* if non-zero override global sec flags */
        __u16 ipc_tid;          /* special tid for connection to IPC share */
-       __u16 flags;
        __u16 vcnum;
        char *serverOS;         /* name of operating system underlying server */
        char *serverNOS;        /* name of network operating system of server */
@@ -714,21 +713,14 @@ struct cifs_ses {
        char *password;
        struct session_key auth_key;
        struct ntlmssp_auth *ntlmssp; /* ciphertext, flags, server challenge */
+       enum securityEnum sectype; /* what security flavor was specified? */
+       bool sign;              /* is signing required? */
        bool need_reconnect:1; /* connection reset, uid now invalid */
 #ifdef CONFIG_CIFS_SMB2
        __u16 session_flags;
 #endif /* CONFIG_CIFS_SMB2 */
 };
 
-/* no more than one of the following three session flags may be set */
-#define CIFS_SES_NT4 1
-#define CIFS_SES_OS2 2
-#define CIFS_SES_W9X 4
-/* following flag is set for old servers such as OS2 (and Win95?)
-   which do not negotiate NTLM or POSIX dialects, but instead
-   negotiate one of the older LANMAN dialects */
-#define CIFS_SES_LANMAN 8
-
 static inline bool
 cap_unix(struct cifs_ses *ses)
 {