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

s4-auth: allow to pass original_user_name=NULL to auth_session_info_fill_unix()

With this patch the auth_session_info_fill_unix() uses the "unix_name"
from the session_info->unix_info if no original_user_name was specified.

This is used to process a system session info where no original_user_name
is given.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Björn Baumbach 2018-09-25 13:16:15 +02:00
parent f3b7ba1746
commit 6f08cb6693

View File

@ -160,6 +160,10 @@ NTSTATUS auth_session_info_fill_unix(struct loadparm_context *lp_ctx,
session_info->info->account_name);
NT_STATUS_HAVE_NO_MEMORY(session_info->unix_info->unix_name);
if (original_user_name == NULL) {
original_user_name = session_info->unix_info->unix_name;
}
len = strlen(original_user_name) + 1;
session_info->unix_info->sanitized_username = su = talloc_array(session_info->unix_info, char, len);
NT_STATUS_HAVE_NO_MEMORY(su);