diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-01-23 16:17:30 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-02-11 11:49:17 +0000 |
commit | f8e11e6ca9ace9c1abf2eaa7dd7038852591ea07 (patch) | |
tree | 525a7091d1cbdf3cf445489b673e015dcfff42cc | |
parent | 5f8e3650f06ff1d768ee2e11515a2051f8febd29 (diff) | |
download | samba-f8e11e6ca9ace9c1abf2eaa7dd7038852591ea07.tar.gz |
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>
(cherry picked from commit 01b8374e7942141e7f6cbdec7623c981a008e4c1)
-rw-r--r-- | source3/auth/auth_sam.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 56f28ab94a6..e2c62f94d48 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -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); @@ -77,6 +83,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); @@ -148,6 +160,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); |