Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109158
b: refs/heads/master
c: c16fefa
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Aug 19, 2008
1 parent dd61765 commit e8d7230
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb7691b648bddbfaf6dd8d8068273dbb18d2484c
refs/heads/master: c16fefa56334e8d0197492607e473fdbb813073f
11 changes: 8 additions & 3 deletions trunk/fs/cifs/asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ decode_negTokenInit(unsigned char *security_blob, int length,
unsigned int cls, con, tag, oidlen, rc;
bool use_ntlmssp = false;
bool use_kerberos = false;
bool use_mskerberos = false;

*secType = NTLM; /* BB eventually make Kerberos or NLTMSSP the default*/

Expand Down Expand Up @@ -574,10 +575,12 @@ decode_negTokenInit(unsigned char *security_blob, int length,
*(oid + 1), *(oid + 2), *(oid + 3)));

if (compare_oid(oid, oidlen, MSKRB5_OID,
MSKRB5_OID_LEN))
use_kerberos = true;
MSKRB5_OID_LEN) &&
!use_kerberos)
use_mskerberos = true;
else if (compare_oid(oid, oidlen, KRB5_OID,
KRB5_OID_LEN))
KRB5_OID_LEN) &&
!use_mskerberos)
use_kerberos = true;
else if (compare_oid(oid, oidlen, NTLMSSP_OID,
NTLMSSP_OID_LEN))
Expand Down Expand Up @@ -630,6 +633,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,

if (use_kerberos)
*secType = Kerberos;
else if (use_mskerberos)
*secType = MSKerberos;
else if (use_ntlmssp)
*secType = NTLMSSP;

Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/cifs/cifs_spnego.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)

dp = description + strlen(description);

/* for now, only sec=krb5 is valid */
/* for now, only sec=krb5 and sec=mskrb5 are valid */
if (server->secType == Kerberos)
sprintf(dp, ";sec=krb5");
else if (server->secType == MSKerberos)
sprintf(dp, ";sec=mskrb5");
else
goto out;

Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ enum securityEnum {
NTLMv2, /* Legacy NTLM auth with NTLMv2 hash */
RawNTLMSSP, /* NTLMSSP without SPNEGO */
NTLMSSP, /* NTLMSSP via SPNEGO */
Kerberos /* Kerberos via SPNEGO */
Kerberos, /* Kerberos via SPNEGO */
MSKerberos, /* MS Kerberos via SPNEGO */
};

enum protocolEnum {
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
unicode_ssetup_strings(&bcc_ptr, ses, nls_cp);
} else
ascii_ssetup_strings(&bcc_ptr, ses, nls_cp);
} else if (type == Kerberos) {
} else if (type == Kerberos || type == MSKerberos) {
#ifdef CONFIG_CIFS_UPCALL
struct cifs_spnego_msg *msg;
spnego_key = cifs_get_spnego_key(ses);
Expand Down

0 comments on commit e8d7230

Please sign in to comment.