From e17302200c138eec7df504a7f4b2bde46073a810 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 17 Apr 2006 11:49:06 +0000 Subject: 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) --- source3/passdb/pdb_tdb.c | 6 +++--- source3/passdb/secrets.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/passdb') 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 )); -- cgit