diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index b079d04..7e65933 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -447,6 +447,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx, struct auth_session_info *session_info; struct unixid *ids; fstring tmp; + bool info3_token = false; /* Ensure we can't possible take a code path leading to a * null defref. */ @@ -557,6 +558,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx, server_info->info3, &server_info->extra, &session_info->security_token); + info3_token = true; } if (!NT_STATUS_IS_OK(status)) { @@ -583,7 +585,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx, for (i=0; inum_sids; i++) { - if (i == 0 && ids[i].type != ID_TYPE_BOTH) { + if (i == 0 && info3_token && ids[i].type != ID_TYPE_BOTH) { continue; }