The branch, v3-4-test has been updated
       via  b22713717422b822c3b8fcba611fc01e262d52c9 (commit)
      from  47c2dc4eee5f7644601db0c24dca0ca30b482940 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit b22713717422b822c3b8fcba611fc01e262d52c9
Author: Volker Lendecke <[email protected]>
Date:   Fri Sep 18 18:27:16 2009 +0200

    s3:smbstatus: Fix bug 6703, allow smbstatus as non-root
    
    We only require a ctdb connection when clustering is enabled. This limits 
the
    restriction for only-root smbstatus to the clustering case.

-----------------------------------------------------------------------

Summary of changes:
 source3/utils/status.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/status.c b/source3/utils/status.c
index cbf0dcb..6123a86 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -367,18 +367,20 @@ static int traverse_sessionid(struct db_record *db, void 
*state)
                goto done;
        }
 
-       /*
-        * This implicitly initializes the global ctdbd connection, usable by
-        * the db_open() calls further down.
-        */
 
-       msg_ctx = messaging_init(NULL, procid_self(),
-                                event_context_init(NULL));
-
-       if (msg_ctx == NULL) {
-               fprintf(stderr, "messaging_init failed\n");
-               ret = -1;
-               goto done;
+       if (lp_clustering()) {
+               /*
+                * This implicitly initializes the global ctdbd
+                * connection, usable by the db_open() calls further
+                * down.
+                */
+               msg_ctx = messaging_init(NULL, procid_self(),
+                                        event_context_init(NULL));
+               if (msg_ctx == NULL) {
+                       fprintf(stderr, "messaging_init failed\n");
+                       ret = -1;
+                       goto done;
+               }
        }
 
        if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {


-- 
Samba Shared Repository

Reply via email to