summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-01-27 00:09:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:16 -0500
commit114a24c19bfcdfdfd15df191d43c9cb36b705491 (patch)
treef0b384c48288cf4e22f4d9724c4b67a4664df051
parent3ea781f62a93a251891a0e57babe36118e92ddea (diff)
downloadsamba-114a24c19bfcdfdfd15df191d43c9cb36b705491.tar.gz
samba-114a24c19bfcdfdfd15df191d43c9cb36b705491.tar.bz2
samba-114a24c19bfcdfdfd15df191d43c9cb36b705491.zip
r13175: Actually make adding a new user into an empty pdbtdb
file create the file. Jeremy. (This used to be commit 31b3201f537220ec82d6fecbb4c457bfe3dbb9c9)
-rw-r--r--source3/passdb/pdb_tdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index d58187ffe5..164ec72299 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -420,7 +420,7 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods, SAM_ACCOUNT
* TDB file doesn't exist, so try to create new one. This is useful to avoid
* confusing error msg when adding user account first time
*/
- if ((pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT )) != NULL) {
+ if ((pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT|O_RDWR )) != NULL) {
DEBUG(0, ("pdb_getsampwnam: TDB passwd (%s) did not exist. File successfully created.\n",
tdb_state->tdbsam_location));
} else {