]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind: Add a check for "winbind varlink service"
authorSamuel Cabrero <scabrero@samba.org>
Thu, 6 Feb 2025 14:18:26 +0000 (15:18 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 20 Feb 2025 08:07:32 +0000 (08:07 +0000)
Print a warning in winbindd startup if the option is enabled
but samba was built without systemd's userdb support.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd.c

index 6489197688269df1853da7972b8e0f690e45fe18..fa150368fc6d2c06dd99e306acf8da5b9b4ae368 100644 (file)
@@ -1084,15 +1084,20 @@ static bool winbindd_setup_listeners(void)
        }
        tevent_fd_set_auto_close(fde);
 
-#if defined(WITH_SYSTEMD_USERDB)
        if (lp_winbind_varlink_service()) {
+#if defined(WITH_SYSTEMD_USERDB)
                /* Setup varlink socket */
                if (!winbind_setup_varlink(global_event_context(),
                                           global_event_context())) {
                        goto failed;
                }
-       }
+#else
+               DBG_WARNING("\"winbind varlink service\" is enabled but "
+                           "samba was built without systemd's userdb "
+                           "support. This option will not have any "
+                           "effect\n");
 #endif
+       }
 
        winbindd_scrub_clients_handler(global_event_context(), NULL,
                                       timeval_current(), NULL);