mirror of
https://github.com/samba-team/samba.git
synced 2025-06-02 13:06:57 +03:00
Rename server_info->was_mapped to server_info->nss_token
"nss_token" from my point of view much better reflects what this flag actually represents (This used to be commit b121a5acb2ef0bb3067d953b028696175432f10d)
This commit is contained in:
parent
4f731150bd
commit
64ddd381b7
@ -270,9 +270,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
|
||||
info3);
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
if (user_info->was_mapped) {
|
||||
(*server_info)->was_mapped = user_info->was_mapped;
|
||||
}
|
||||
(*server_info)->nss_token |= user_info->was_mapped;
|
||||
|
||||
if ( ! (*server_info)->guest) {
|
||||
/* if a real user check pam account restrictions */
|
||||
|
@ -122,7 +122,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
auth_ntlmssp_state->server_info->was_mapped |= username_was_mapped;
|
||||
auth_ntlmssp_state->server_info->nss_token |= username_was_mapped;
|
||||
|
||||
nt_status = create_local_token(auth_ntlmssp_state->server_info);
|
||||
|
||||
|
@ -367,7 +367,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
|
||||
lm_sess_key.length);
|
||||
data_blob_free(&lm_sess_key);
|
||||
|
||||
(*server_info)->was_mapped |= user_info->was_mapped;
|
||||
(*server_info)->nss_token |= user_info->was_mapped;
|
||||
|
||||
return nt_status;
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ NTSTATUS create_local_token(auth_serversupplied_info *server_info)
|
||||
*/
|
||||
|
||||
if (((lp_server_role() == ROLE_DOMAIN_MEMBER) && !winbind_ping()) ||
|
||||
(server_info->was_mapped)) {
|
||||
(server_info->nss_token)) {
|
||||
status = create_token_from_username(server_info,
|
||||
server_info->unix_name,
|
||||
server_info->guest,
|
||||
@ -1626,7 +1626,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
|
||||
sizeof(info3->base.LMSessKey.key));
|
||||
}
|
||||
|
||||
result->was_mapped = username_was_mapped;
|
||||
result->nss_token |= username_was_mapped;
|
||||
|
||||
*server_info = result;
|
||||
|
||||
@ -1859,7 +1859,7 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
|
||||
sizeof(info->lm_session_key));
|
||||
}
|
||||
|
||||
result->was_mapped = username_was_mapped;
|
||||
result->nss_token |= username_was_mapped;
|
||||
|
||||
*server_info = result;
|
||||
|
||||
|
@ -120,9 +120,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
if (user_info->was_mapped) {
|
||||
(*server_info)->was_mapped = user_info->was_mapped;
|
||||
}
|
||||
(*server_info)->nss_token |= user_info->was_mapped;
|
||||
|
||||
return nt_status;
|
||||
}
|
||||
|
@ -67,7 +67,11 @@ typedef struct auth_serversupplied_info {
|
||||
|
||||
void *pam_handle;
|
||||
|
||||
bool was_mapped; /* Did the username map match? */
|
||||
/*
|
||||
* This is a token from /etc/passwd and /etc/group
|
||||
*/
|
||||
bool nss_token;
|
||||
|
||||
char *unix_name;
|
||||
|
||||
/*
|
||||
|
@ -530,9 +530,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
|
||||
}
|
||||
}
|
||||
|
||||
if (username_was_mapped) {
|
||||
server_info->was_mapped = username_was_mapped;
|
||||
}
|
||||
server_info->nss_token |= username_was_mapped;
|
||||
|
||||
/* we need to build the token for the user. make_server_info_guest()
|
||||
already does this */
|
||||
|
Loading…
x
Reference in New Issue
Block a user