Author: abartlet Date: 2004-10-29 08:32:59 +0000 (Fri, 29 Oct 2004) New Revision: 3359
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3359 Log: Add magic auto-initialisation hooks here, to match the rest of secrets. (Which will, I am assured, go away). Andrew Bartlett Modified: branches/SAMBA_4_0/source/passdb/secrets.c Changeset: Modified: branches/SAMBA_4_0/source/passdb/secrets.c =================================================================== --- branches/SAMBA_4_0/source/passdb/secrets.c 2004-10-29 08:31:27 UTC (rev 3358) +++ branches/SAMBA_4_0/source/passdb/secrets.c 2004-10-29 08:32:59 UTC (rev 3359) @@ -129,6 +129,10 @@ size_t ref_count = *p_ref_count; int ret = 0; + secrets_init(); + if (!tdb) + return False; + if (ref_count == 0) { ret = tdb_lock_bystring(tdb->tdb, name, timeout); if (ret == 0) @@ -152,6 +156,10 @@ SMB_ASSERT(ref_count != 0); + secrets_init(); + if (!tdb) + return; + if (ref_count == 1) { tdb_unlock_bystring(tdb->tdb, name); DEBUG(10,("secrets_named_mutex: released mutex for %s\n", name ));