1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4:auth: Reformat function calls

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-09-27 15:11:20 +13:00 committed by Joseph Sutton
parent 4f0ba2b0bf
commit a2b6c2199f
3 changed files with 31 additions and 12 deletions

View File

@ -558,9 +558,12 @@ static NTSTATUS auth_generate_session_info_wrapper(struct auth4_context *auth_co
session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED; session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED;
} }
status = auth_generate_session_info(mem_ctx, auth_context->lp_ctx, status = auth_generate_session_info(mem_ctx,
auth_context->sam_ctx, user_info_dc, auth_context->lp_ctx,
session_info_flags, session_info); auth_context->sam_ctx,
user_info_dc,
session_info_flags,
session_info);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
return status; return status;
} }

View File

@ -431,7 +431,8 @@ NTSTATUS authsam_get_session_info_principal(TALLOC_CTX *mem_ctx,
} }
nt_status = auth_generate_session_info(tmp_ctx, lp_ctx, sam_ctx, nt_status = auth_generate_session_info(tmp_ctx, lp_ctx, sam_ctx,
user_info_dc, session_info_flags, user_info_dc,
session_info_flags,
session_info); session_info);
if (NT_STATUS_IS_OK(nt_status)) { if (NT_STATUS_IS_OK(nt_status)) {

View File

@ -92,7 +92,12 @@ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
} }
/* references the user_info_dc into the session_info */ /* references the user_info_dc into the session_info */
nt_status = auth_generate_session_info(parent_ctx, lp_ctx, NULL, user_info_dc, AUTH_SESSION_INFO_SIMPLE_PRIVILEGES, &session_info); nt_status = auth_generate_session_info(parent_ctx,
lp_ctx,
NULL /* sam_ctx */,
user_info_dc,
AUTH_SESSION_INFO_SIMPLE_PRIVILEGES,
&session_info);
talloc_free(mem_ctx); talloc_free(mem_ctx);
NT_STATUS_NOT_OK_RETURN(nt_status); NT_STATUS_NOT_OK_RETURN(nt_status);
@ -369,15 +374,20 @@ static NTSTATUS auth_domain_admin_session_info(TALLOC_CTX *parent_ctx,
NT_STATUS_HAVE_NO_MEMORY(mem_ctx); NT_STATUS_HAVE_NO_MEMORY(mem_ctx);
nt_status = auth_domain_admin_user_info_dc(mem_ctx, lpcfg_netbios_name(lp_ctx), nt_status = auth_domain_admin_user_info_dc(mem_ctx,
lpcfg_workgroup(lp_ctx), domain_sid, lpcfg_netbios_name(lp_ctx),
&user_info_dc); lpcfg_workgroup(lp_ctx),
domain_sid,
&user_info_dc);
if (!NT_STATUS_IS_OK(nt_status)) { if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx); talloc_free(mem_ctx);
return nt_status; return nt_status;
} }
nt_status = auth_generate_session_info(mem_ctx, lp_ctx, NULL, user_info_dc, nt_status = auth_generate_session_info(mem_ctx,
lp_ctx,
NULL /* sam_ctx */,
user_info_dc,
AUTH_SESSION_INFO_SIMPLE_PRIVILEGES|AUTH_SESSION_INFO_AUTHENTICATED|AUTH_SESSION_INFO_DEFAULT_GROUPS, AUTH_SESSION_INFO_SIMPLE_PRIVILEGES|AUTH_SESSION_INFO_AUTHENTICATED|AUTH_SESSION_INFO_DEFAULT_GROUPS,
session_info); session_info);
/* There is already a reference between the session_info and user_info_dc */ /* There is already a reference between the session_info and user_info_dc */
@ -417,15 +427,20 @@ _PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
} }
nt_status = auth_anonymous_user_info_dc(mem_ctx, nt_status = auth_anonymous_user_info_dc(mem_ctx,
lpcfg_netbios_name(lp_ctx), lpcfg_netbios_name(lp_ctx),
&user_info_dc); &user_info_dc);
if (!NT_STATUS_IS_OK(nt_status)) { if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx); talloc_free(mem_ctx);
return nt_status; return nt_status;
} }
/* references the user_info_dc into the session_info */ /* references the user_info_dc into the session_info */
nt_status = auth_generate_session_info(parent_ctx, lp_ctx, NULL, user_info_dc, AUTH_SESSION_INFO_SIMPLE_PRIVILEGES, &session_info); nt_status = auth_generate_session_info(parent_ctx,
lp_ctx,
NULL /* sam_ctx */,
user_info_dc,
AUTH_SESSION_INFO_SIMPLE_PRIVILEGES,
&session_info);
talloc_free(mem_ctx); talloc_free(mem_ctx);
NT_STATUS_NOT_OK_RETURN(nt_status); NT_STATUS_NOT_OK_RETURN(nt_status);