1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-22 02:50:28 +03:00

s3:auth_sam: make sure we never handle empty usernames

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-01-23 16:17:30 +01:00 committed by Andreas Schneider
parent 72ef8d3a52
commit 01b8374e79

View File

@ -36,6 +36,12 @@ static NTSTATUS auth_sam_ignoredomain_auth(const struct auth_context *auth_conte
return NT_STATUS_UNSUCCESSFUL;
}
if (user_info->mapped.account_name == NULL ||
user_info->mapped.account_name[0] == '\0')
{
return NT_STATUS_NOT_IMPLEMENTED;
}
DBG_DEBUG("Check auth for: [%s]\\[%s]\n",
user_info->mapped.domain_name,
user_info->mapped.account_name);
@ -80,6 +86,12 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context,
return NT_STATUS_LOGON_FAILURE;
}
if (user_info->mapped.account_name == NULL ||
user_info->mapped.account_name[0] == '\0')
{
return NT_STATUS_NOT_IMPLEMENTED;
}
DBG_DEBUG("Check auth for: [%s]\\[%s]\n",
user_info->mapped.domain_name,
user_info->mapped.account_name);
@ -154,6 +166,12 @@ static NTSTATUS auth_sam_netlogon3_auth(const struct auth_context *auth_context,
return NT_STATUS_LOGON_FAILURE;
}
if (user_info->mapped.account_name == NULL ||
user_info->mapped.account_name[0] == '\0')
{
return NT_STATUS_NOT_IMPLEMENTED;
}
DBG_DEBUG("Check auth for: [%s]\\[%s]\n",
user_info->mapped.domain_name,
user_info->mapped.account_name);