summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-17 11:49:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:23 -0500
commite17302200c138eec7df504a7f4b2bde46073a810 (patch)
tree0973275cef43fef24af3d07530f4464ec0702427 /source3/passdb
parent76a2ac3ac324466962adbeaf1f2a85572f631c0a (diff)
downloadsamba-e17302200c138eec7df504a7f4b2bde46073a810.tar.gz
samba-e17302200c138eec7df504a7f4b2bde46073a810.tar.bz2
samba-e17302200c138eec7df504a7f4b2bde46073a810.zip
r15101: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring does not
have the timeout argument in Samba4. Add a new routine tdb_lock_bystring_with_timeout. Volker (This used to be commit b9c6e3f55602fa505859a4b2cd137b74105d685f)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_tdb.c6
-rw-r--r--source3/passdb/secrets.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 94ae328812..ba8124d392 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -694,7 +694,7 @@ static BOOL tdbsam_convert(int32 from)
BOOL ret;
/* handle a Samba upgrade */
- tdb_lock_bystring(tdbsam, vstring, 0);
+ tdb_lock_bystring(tdbsam, vstring);
/* Enumerate all records and convert them */
key = tdb_firstkey(tdbsam);
@@ -1420,7 +1420,7 @@ static NTSTATUS tdbsam_rename_sam_account(struct pdb_methods *my_methods,
interim_account = True;
- if ( tdb_lock_bystring(tdbsam, newname, 30) == -1 ) {
+ if ( tdb_lock_bystring_with_timeout(tdbsam, newname, 30) == -1 ) {
goto done;
}
@@ -1492,7 +1492,7 @@ static BOOL init_idmap_tdb(TDB_CONTEXT *tdb)
{
int32 version;
- if (tdb_lock_bystring(tdb, "IDMAP_VERSION", 0) != 0) {
+ if (tdb_lock_bystring(tdb, "IDMAP_VERSION") != 0) {
DEBUG(0, ("Could not lock IDMAP_VERSION\n"));
return False;
}
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index a288e7d169..32793dea58 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -245,7 +245,7 @@ BOOL secrets_lock_trust_account_password(const char *domain, BOOL dolock)
return False;
if (dolock)
- return (tdb_lock_bystring(tdb, trust_keystr(domain),0) == 0);
+ return (tdb_lock_bystring(tdb, trust_keystr(domain)) == 0);
else
tdb_unlock_bystring(tdb, trust_keystr(domain));
return True;
@@ -774,7 +774,7 @@ BOOL secrets_named_mutex(const char *name, unsigned int timeout)
if (!secrets_init())
return False;
- ret = tdb_lock_bystring(tdb, name, timeout);
+ ret = tdb_lock_bystring_with_timeout(tdb, name, timeout);
if (ret == 0)
DEBUG(10,("secrets_named_mutex: got mutex for %s\n", name ));