summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-09-08 17:08:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:36 -0500
commit325b342f313369a8cbd8c7851ddcbe37d8ee4470 (patch)
tree71a83cadd954a901b35d6a9e413cb86e43caa3e9 /source3
parenta747e8bdcfdd45f34324ec72310320927e97e9ad (diff)
downloadsamba-325b342f313369a8cbd8c7851ddcbe37d8ee4470.tar.gz
samba-325b342f313369a8cbd8c7851ddcbe37d8ee4470.tar.bz2
samba-325b342f313369a8cbd8c7851ddcbe37d8ee4470.zip
r25036: Fix a become/unbecome_root() pair
(This used to be commit 9e53f50e9489a5f6cfa40eed59be39e8a294db7d)
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 9e089cf8a2..2c6a5df3e5 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3330,6 +3330,7 @@ static struct tdb_wrap *lp_regdb_open(void)
become_root();
reg_tdb = tdb_wrap_open(NULL, lock_path("registry.tdb"), 0,
REG_TDB_FLAGS, O_RDWR, 0600);
+ unbecome_root();
if (!reg_tdb) {
DEBUG(1, ("lp_regdb_open: failed to open %s: %s\n",
lock_path("registry.tdb"), strerror(errno)));
@@ -3338,7 +3339,6 @@ static struct tdb_wrap *lp_regdb_open(void)
else {
DEBUG(10, ("lp_regdb_open: reg tdb opened.\n"));
}
- unbecome_root();
vers_id = tdb_fetch_int32(reg_tdb->tdb, vstring);
if (vers_id != REGVER_V1) {