]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:lib/ctdbd_conn: try ctdbd_init_connection() as root (bug #8684)
authorStefan Metzmacher <metze@samba.org>
Fri, 23 Dec 2011 13:45:45 +0000 (14:45 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 23 Jan 2012 20:29:41 +0000 (21:29 +0100)
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 <metze@samba.org>
Autobuild-Date: Fri Dec 23 18:19:14 CET 2011 on sn-devel-104
(cherry picked from commit 4a1895eb9921ad533910d08823c2814c470875fd)
(cherry picked from commit ff4e1df575a3d7eb484b31d6afe46825ba418981)

source3/lib/ctdbd_conn.c

index 1d01da6739c7655303de870265b0f248107baae9..4e8f09009736980a356b7a622f873f714a119f25 100644 (file)
@@ -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)));