summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-12-09 18:34:26 +0000
committerJeremy Allison <jra@samba.org>2003-12-09 18:34:26 +0000
commitea4e53904ed015a754b5151fdd705fbab1630750 (patch)
tree17f96cf2afb30e5e6be5af82ba8157cd08d570b1
parent09c4409375289013e3c38e900cb7557d9846b955 (diff)
downloadsamba-ea4e53904ed015a754b5151fdd705fbab1630750.tar.gz
samba-ea4e53904ed015a754b5151fdd705fbab1630750.tar.bz2
samba-ea4e53904ed015a754b5151fdd705fbab1630750.zip
Final part of fix for #445. Don't add user for machine accounts.
Jeremy. (This used to be commit 0785295fe067093ea1483fc19e30c63512018db3)
-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)