Re: [PATCH 09/11] cifs: allow mixed secTypes on a socket
Steve French <[email protected]> Thu, 6 May 2010 17:29:17 -0500
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Apr 24, 2010 at 6:57 AM, Jeff Layton <[email protected]> wrote: > Allow secType to be set on a per-session basis. This allows us to mix > secTypes on a single socket. Also, add a "sign" bool to cifsSesInfo > and determine whether signing should be enabled at session setup > time. > > enum securityEnum { > - PLAINTXT = 0, /* Legacy with Plaintext passwords */ > + Undefined = 0, /* Uninitialized */ > + Anonymous, /* Anonymous login */ > + Plaintext, /* Legacy with plaintext passwords */ > 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 */ > + NTLMSSP, /* NTLMSSP, NTLMv1 hash */ > Kerberos, /* Kerberos via SPNEGO */ > }; > > I like how this adds anonymous, and starts that with 1 rather than 0 - makes sense. > @@ -978,42 +978,39 @@ cifs_parse_mount_options(char *options, const char > *devname, > cERROR(1, "no security value specified"); > continue; > } else if (strnicmp(value, "krb5i", 5) == 0) { > - vol->secFlg |= CIFSSEC_MAY_KRB5 | > - CIFSSEC_MUST_SIGN; > + vol->sectype = Kerberos; > + vol->sign = true; > } else if (strnicmp(value, "krb5p", 5) == 0) { > - /* vol->secFlg |= CIFSSEC_MUST_SEAL | > - CIFSSEC_MAY_KRB5; */ > cERROR(1, "Krb5 cifs privacy not > supported"); > return 1; > } else if (strnicmp(value, "krb5", 4) == 0) { > - vol->secFlg |= CIFSSEC_MAY_KRB5; > + vol->sectype = Kerberos; > Doesn't this change behavior a lot - user can no longer pass in a list of more than one acceptable security options as before (e.g. sec=krb5, sec=ntlmv2i) and can only specify one (but doesn't know ahead of time which the server supports). Also curious if it changed how plaintext was handled (if build with weak password support allowed, which I don't want to encourage) - IIRC we sent this via the older (LANMAN only) style session setup. -- Thanks, Steve _______________________________________________ linux-cifs-client mailing list [email protected] https://lists.samba.org/mailman/listinfo/linux-cifs-client