From 8d019a9682c6d6b42f296b7db5d3c342a5633b3b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Dec 2003 18:34:29 +0000 Subject: Final part of fix for #445. Don't add user for machine accounts. Jeremy. (This used to be commit 3684cffbd269389d14b37edd5959e29912c13a60) --- source3/auth/auth_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 6df31b94a7..3dc0fdbe46 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -983,6 +983,10 @@ struct passwd *smb_getpwnam( char *domuser ) map_username( mapped_username ); pw = Get_Pwnam(mapped_username); if (!pw) { + /* Don't add a machine account. */ + if (mapped_username[strlen(mapped_username)-1] == '$') + return NULL; + /* Create local user if requested. */ p = strchr( mapped_username, *lp_winbind_separator() ); if (p) -- cgit