summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Baumbach <bb@sernet.de>2010-12-07 14:36:44 +0100
committerMichael Adam <obnox@samba.org>2010-12-07 17:37:52 +0100
commit6acbcd1b0ce6529eb381ea94573a707e677eebb4 (patch)
tree15e4ec507987eeb260c273d0195234be9d46239d
parent94cfb49bb7051c7e979bcf168e467328b96ee631 (diff)
downloadsamba-6acbcd1b0ce6529eb381ea94573a707e677eebb4.tar.gz
samba-6acbcd1b0ce6529eb381ea94573a707e677eebb4.tar.bz2
samba-6acbcd1b0ce6529eb381ea94573a707e677eebb4.zip
Make sure that user exists after running add user script before adding sam account.
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Dec 7 17:37:52 CET 2010 on sn-devel-104
-rw-r--r--source3/passdb/pdb_interface.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index a6fe2e0408..1361c178b6 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -476,6 +476,11 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
flush_pwnam_cache();
pwd = Get_Pwnam_alloc(tmp_ctx, name);
+
+ if(pwd == NULL) {
+ DEBUG(3, ("Could not find user %s, add script did not work\n", name));
+ return NT_STATUS_NO_SUCH_USER;
+ }
}
/* we have a valid SID coming out of this call */