summaryrefslogtreecommitdiffstats
path: root/source/groupdb
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
commit40cad9dcc14ddec0ce74bb9010d13bd82e4d10af (patch)
tree9313c0a387f5a34a3b65f8848e6140a34eb24b6f /source/groupdb
parentb111bb46afc247e034a11e953b9d243cde69cc07 (diff)
downloadsamba-40cad9dcc14ddec0ce74bb9010d13bd82e4d10af.tar.gz
samba-40cad9dcc14ddec0ce74bb9010d13bd82e4d10af.tar.xz
samba-40cad9dcc14ddec0ce74bb9010d13bd82e4d10af.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
Diffstat (limited to 'source/groupdb')
-rw-r--r--source/groupdb/mapping.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/groupdb/mapping.c b/source/groupdb/mapping.c
index d189f447d08..50064415f9c 100644
--- a/source/groupdb/mapping.c
+++ b/source/groupdb/mapping.c
@@ -135,11 +135,10 @@ static BOOL default_group_mapping(void)
static BOOL init_group_mapping(void)
{
- static pid_t local_pid;
const char *vstring = "INFO/version";
int32 vers_id;
- if (tdb && local_pid == sys_getpid())
+ if (tdb)
return True;
tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
if (!tdb) {
@@ -147,8 +146,6 @@ static BOOL init_group_mapping(void)
return False;
}
- local_pid = sys_getpid();
-
/* handle a Samba upgrade */
tdb_lock_bystring(tdb, vstring, 0);