From: Stefan Metzmacher Date: Fri, 23 Dec 2011 13:45:45 +0000 (+0100) Subject: s3:lib/ctdbd_conn: try ctdbd_init_connection() as root (bug #8684) X-Git-Tag: samba-3.6.2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33b160306c7e79658034465cce2391cf9af90481;p=thirdparty%2Fsamba.git s3:lib/ctdbd_conn: try ctdbd_init_connection() as root (bug #8684) ctdbd_traverse is only called if the main db_context is already open. So if we could get to information via dbwrap_fetch, we should also be able to traverse. metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Fri Dec 23 18:19:14 CET 2011 on sn-devel-104 (cherry picked from commit 4a1895eb9921ad533910d08823c2814c470875fd) (cherry picked from commit ff4e1df575a3d7eb484b31d6afe46825ba418981) --- diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 1d01da6739c..4e8f0900973 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -1200,7 +1200,9 @@ NTSTATUS ctdbd_traverse(uint32 db_id, int cstatus; struct ctdbd_traverse_state state; + become_root(); status = ctdbd_init_connection(NULL, &conn); + unbecome_root(); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("ctdbd_init_connection failed: %s\n", nt_errstr(status)));