From 325b342f313369a8cbd8c7851ddcbe37d8ee4470 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 8 Sep 2007 17:08:59 +0000 Subject: r25036: Fix a become/unbecome_root() pair (This used to be commit 9e53f50e9489a5f6cfa40eed59be39e8a294db7d) --- source3/param/loadparm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/param') 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) { -- cgit