]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Final part of fix for #445. Don't add user for machine accounts.
authorJeremy Allison <jra@samba.org>
Tue, 9 Dec 2003 18:34:26 +0000 (18:34 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 9 Dec 2003 18:34:26 +0000 (18:34 +0000)
Jeremy.

source/auth/auth_util.c

index 6df31b94a71d2c59ac1e4ab7c252ecc065d2f913..3dc0fdbe4640312b1f0a2f5d1529c8189389cc39 100644 (file)
@@ -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)