summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_backend_db.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index c870dc57ed6..423b310fe8a 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -733,6 +733,15 @@ WERROR regdb_init(void)
return WERR_OK;
}
+ /*
+ * 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) {
+ DBG_ERR("Cluster mode requires running as root.\n");
+ return WERR_ACCESS_DENIED;
+ }
+
db_path = state_path(talloc_tos(), "registry.tdb");
if (db_path == NULL) {
return WERR_NOT_ENOUGH_MEMORY;