diff options
author | Jeremy Allison <jra@samba.org> | 2003-12-09 18:34:29 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-12-09 18:34:29 +0000 |
commit | 8d019a9682c6d6b42f296b7db5d3c342a5633b3b (patch) | |
tree | 7515758d16b5d407eadc96b1263a57b9fe7fac06 | |
parent | e25b7b8eed38942dc8daaff3b7273c1c60fe82f0 (diff) | |
download | samba-8d019a9682c6d6b42f296b7db5d3c342a5633b3b.tar.gz samba-8d019a9682c6d6b42f296b7db5d3c342a5633b3b.tar.bz2 samba-8d019a9682c6d6b42f296b7db5d3c342a5633b3b.zip |
Final part of fix for #445. Don't add user for machine accounts.
Jeremy.
(This used to be commit 3684cffbd269389d14b37edd5959e29912c13a60)
-rw-r--r-- | source3/auth/auth_util.c | 4 |
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) |