From: Ralph Boehme Date: Wed, 25 Aug 2021 07:26:00 +0000 (+0200) Subject: registry: skip root check when running with uid-wrapper enabled X-Git-Tag: ldb-2.5.0~577 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=702ebb3d8c8d9f7241bb264f9cb2a41a3dc46f32;p=thirdparty%2Fsamba.git registry: skip root check when running with uid-wrapper enabled 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 Reviewed-by: Michael Adam Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Wed Sep 22 16:57:25 UTC 2021 on sn-devel-184 --- diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 423b310fe8a..b1f6425d56a 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -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; }