summaryrefslogtreecommitdiff
path: root/source3/lib/account_pol.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-11-05 21:55:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:09 -0500
commit9c61daf667ca0ac939f4bd724d1c0f708983f82a (patch)
tree716bcabf87e518deaea6339d904501e4e3b67afb /source3/lib/account_pol.c
parentbaf1ae1b0e86e16cc1364d64463d654e297fa221 (diff)
downloadsamba-9c61daf667ca0ac939f4bd724d1c0f708983f82a.tar.gz
samba-9c61daf667ca0ac939f4bd724d1c0f708983f82a.tar.bz2
samba-9c61daf667ca0ac939f4bd724d1c0f708983f82a.zip
r3561: Since we have tdb_reopen_all() after all forks, the local_pid logic is not
correct anymore. If we actually open the tdb before the fork, we end up opening the tdb twice. Jerry, jra, this also happens in the locking and printing subsystems. You might want to check it there (not that it actually happens right now, but this gave me some confusion lately...). Volker (This used to be commit 40cad9dcc14ddec0ce74bb9010d13bd82e4d10af)
Diffstat (limited to 'source3/lib/account_pol.c')
-rw-r--r--source3/lib/account_pol.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c
index 8d5b963da2..c8507f722d 100644
--- a/source3/lib/account_pol.c
+++ b/source3/lib/account_pol.c
@@ -30,11 +30,10 @@ static TDB_CONTEXT *tdb; /* used for driver files */
BOOL init_account_policy(void)
{
- static pid_t local_pid;
const char *vstring = "INFO/version";
uint32 version;
- if (tdb && local_pid == sys_getpid())
+ if (tdb)
return True;
tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
if (!tdb) {
@@ -42,8 +41,6 @@ BOOL init_account_policy(void)
return False;
}
- local_pid = sys_getpid();
-
/* handle a Samba upgrade */
tdb_lock_bystring(tdb, vstring,0);
if (!tdb_fetch_uint32(tdb, vstring, &version) || version != DATABASE_VERSION) {