diff options
author | Simo Sorce <simo@redhat.com> | 2013-07-27 13:51:52 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-07-28 13:17:51 -0400 |
commit | e52754a84ad9320378d88e79be8d7ba139b30595 (patch) | |
tree | 99e1f4353ebc318c19408b0c11249b687f1d9f07 /src/gss_sec_ctx.c | |
parent | 976c19ccefe5053baee272de4ae136c0b4731c7c (diff) | |
download | gss-ntlmssp-e52754a84ad9320378d88e79be8d7ba139b30595.tar.gz gss-ntlmssp-e52754a84ad9320378d88e79be8d7ba139b30595.tar.xz gss-ntlmssp-e52754a84ad9320378d88e79be8d7ba139b30595.zip |
Helper function to check lm compatibility level
Also stop associating it with th creds struct.
Diffstat (limited to 'src/gss_sec_ctx.c')
-rw-r--r-- | src/gss_sec_ctx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gss_sec_ctx.c b/src/gss_sec_ctx.c index 948c58d..5ee4964 100644 --- a/src/gss_sec_ctx.c +++ b/src/gss_sec_ctx.c @@ -58,6 +58,7 @@ uint32_t gssntlm_init_sec_context(uint32_t *minor_status, struct ntlm_buffer enc_sess_key = { 0 }; struct ntlm_key encrypted_random_session_key = { .length = 16 }; struct ntlm_key key_exchange_key = { .length = 16 }; + int lm_compat_lvl; uint32_t tmpmin; uint32_t retmin = 0; uint32_t retmaj = 0; @@ -162,8 +163,8 @@ uint32_t gssntlm_init_sec_context(uint32_t *minor_status, workstation = ctx->workstation; } - sec_req = gssntlm_required_security(cred->lm_compatibility_level, - ctx->role); + lm_compat_lvl = gssntlm_get_lm_compatibility_level(); + sec_req = gssntlm_required_security(lm_compat_lvl, ctx->role); if (sec_req == 0xff) { retmaj = GSS_S_FAILURE; goto done; @@ -237,8 +238,8 @@ uint32_t gssntlm_init_sec_context(uint32_t *minor_status, goto done; } - sec_req = gssntlm_required_security(ctx->cred.lm_compatibility_level, - ctx->role); + lm_compat_lvl = gssntlm_get_lm_compatibility_level(); + sec_req = gssntlm_required_security(lm_compat_lvl, ctx->role); if (sec_req == 0xff) { retmaj = GSS_S_FAILURE; goto done; |