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 | 3684cffbd269389d14b37edd5959e29912c13a60 (patch) | |
tree | 8f7952fab0695d14f366df29021c5af782302d10 /source | |
parent | b7df6849c9368aa2e5960de54a03be269ab89fef (diff) | |
download | samba-3684cffbd269389d14b37edd5959e29912c13a60.tar.gz samba-3684cffbd269389d14b37edd5959e29912c13a60.tar.xz samba-3684cffbd269389d14b37edd5959e29912c13a60.zip |
Final part of fix for #445. Don't add user for machine accounts.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r-- | source/auth/auth_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c index 6df31b94a71..3dc0fdbe464 100644 --- a/source/auth/auth_util.c +++ b/source/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) |