registry: skip root check when running with uid-wrapper enabled
authorRalph Boehme <slow@samba.org>
Wed, 25 Aug 2021 07:26:00 +0000 (09:26 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 22 Sep 2021 16:57:25 +0000 (16:57 +0000)
Currently registry config is not used in the clustered testenv, so currently
there's no problem. But once we do add that, the check would be triggered.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 22 16:57:25 UTC 2021 on sn-devel-184

source3/registry/reg_backend_db.c

index 423b310fe8a0de89e3e28e9b48c54df03cb858a6..b1f6425d56a9a4cd08bfc9867201c5ffca217c5b 100644 (file)
@@ -737,7 +737,7 @@ WERROR regdb_init(void)
          * Clustered Samba can only work as root because we need messaging to
          * talk to ctdb which only works as root.
          */
-        if (lp_clustering() && geteuid() != 0) {
+        if (!uid_wrapper_enabled() && lp_clustering() && geteuid() != 0) {
                 DBG_ERR("Cluster mode requires running as root.\n");
                return WERR_ACCESS_DENIED;
         }