summaryrefslogtreecommitdiff
path: root/source3/auth/auth_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r--source3/auth/auth_util.c4
1 files changed, 4 insertions, 0 deletions
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)