From: Stefan Metzmacher Date: Fri, 8 Oct 2021 16:08:20 +0000 (+0200) Subject: CVE-2020-25717: s3:auth: no longer let check_account() autocreate local users X-Git-Tag: ldb-2.5.0~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd0423bfbbce2d9f1f8a62c21cf612e5c755b616;p=thirdparty%2Fsamba.git CVE-2020-25717: s3:auth: no longer let check_account() autocreate local users So far we autocreated local user accounts based on just the account_name (just ignoring any domain part). This only happens via a possible 'add user script', which is not typically defined on domain members and on NT4 DCs local users already exist in the local passdb anyway. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14556 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14801 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 9ff7256bbed..be2f466526f 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1912,7 +1912,7 @@ static NTSTATUS check_account(TALLOC_CTX *mem_ctx, const char *domain, return NT_STATUS_NO_MEMORY; } - passwd = smb_getpwnam(mem_ctx, dom_user, &real_username, true ); + passwd = smb_getpwnam(mem_ctx, dom_user, &real_username, false); if (!passwd) { DEBUG(3, ("Failed to find authenticated user %s via " "getpwnam(), denying access.\n", dom_user));