From: Martin Schwenke Date: Mon, 6 Jul 2026 08:44:34 +0000 (+1000) Subject: ctdb-common: Fix CTDB_SOCKET default outside test mode X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=143262299ba9671e202472cca0f4a83c288bb377;p=thirdparty%2Fsamba.git ctdb-common: Fix CTDB_SOCKET default outside test mode smbd expects to use CTDB_SOCKET (define, not environment variable) as a default. If --with-socketpath was specified at build time then smbd and ctdbd might disagree on the socket location. smbd will use whatever is specified (i.e. CTDB_SOCKET) but CTDB always uses path_socket() to put the socket in CTDB_RUNDIR. CTDB should default to CTDB_SOCKET (define) too. This only changes the result when --with-socketpath is specified. We should get rid of that later and always use something in CTDB_SOCKETDIR. Signed-off-by: Martin Schwenke Reviewed-by: Anoop C S --- diff --git a/ctdb/common/path.c b/ctdb/common/path.c index 2aac1e39d37..e207641beb9 100644 --- a/ctdb/common/path.c +++ b/ctdb/common/path.c @@ -314,6 +314,8 @@ char *path_socket(TALLOC_CTX *mem_ctx, const char *daemon) if (t != NULL) { return talloc_strdup(mem_ctx, t); } + } else { + return talloc_strdup(mem_ctx, CTDB_SOCKET); } }