git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56ceeaa
)
r15086: Get defensive about creating user accounts when winbindd
author
Gerald Carter
<jerry@samba.org>
Fri, 14 Apr 2006 19:36:36 +0000
(19:36 +0000)
committer
Gerald Carter
<jerry@samba.org>
Fri, 14 Apr 2006 19:36:36 +0000
(19:36 +0000)
fails (but is present).
source/auth/auth_util.c
patch
|
blob
|
history
diff --git
a/source/auth/auth_util.c
b/source/auth/auth_util.c
index 31bc2664b88a660a702fe28aafb95fc255f11014..4ffbba2e23720bfa064bfe39c125092bb225f37d 100644
(file)
--- a/
source/auth/auth_util.c
+++ b/
source/auth/auth_util.c
@@
-1469,9
+1469,12
@@
struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, char *domuser,
pw = Get_Pwnam_alloc(mem_ctx, username);
- /* Create local user if requested. */
+ /* Create local user if requested but only if winbindd
+ is not running. We need to protect against cases
+ where winbindd is failing and then prematurely
+ creating users in /etc/passwd */
- if ( !pw && create ) {
+ if ( !pw && create
&& !winbind_ping()
) {
/* Don't add a machine account. */
if (username[strlen(username)-1] == '$')
return NULL;