summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-03-16 15:54:18 +0100
committerStefan Metzmacher <metze@samba.org>2017-03-24 11:57:08 +0100
commitf1ec0c40d9f0b17e42ae2ec62f022035b23d88fa (patch)
treee70e6fecbafafc9d65c8407e160dd2448a6872fa /source3/rpc_server
parentc6531b9df8ba20d1f5472a8d578a87a6d102b453 (diff)
downloadsamba-f1ec0c40d9f0b17e42ae2ec62f022035b23d88fa.tar.gz
netlogond3: only call make_auth_context_subsystem() in one place
BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index 09feb130a87..088ffe12d4e 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -1580,6 +1580,12 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
r->in.logon_level,
logon);
+ status = make_auth_context_subsystem(talloc_tos(),
+ &auth_context);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
switch (r->in.logon_level) {
case NetlogonNetworkInformation:
case NetlogonNetworkTransitiveInformation:
@@ -1588,12 +1594,6 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
const char *workgroup = lp_workgroup();
bool ok;
- status = make_auth_context_subsystem(talloc_tos(),
- &auth_context);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
ok = auth3_context_set_challenge(
auth_context, logon->network->challenge, "fixed");
if (!ok) {
@@ -1658,11 +1658,6 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
DEBUG(100,("decrypt of nt owf password:"));
dump_data(100, logon->password->ntpassword.hash, 16);
#endif
- status = make_auth_context_subsystem(talloc_tos(),
- &auth_context);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
auth_get_ntlm_challenge(auth_context, chal);