From: Pavel Kalugin Date: Mon, 14 Aug 2023 01:37:16 +0000 (+0300) Subject: s3:notifyd: Use lpcfg_set_cmdline() X-Git-Tag: tevent-0.16.0~553 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6e4643274dcdb58ca1706ba6cfd512ef0c31974;p=thirdparty%2Fsamba.git s3:notifyd: Use lpcfg_set_cmdline() Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/notifyd/notifydd.c b/source3/smbd/notifyd/notifydd.c index 26bfcd8e410..b27a4ab5de5 100644 --- a/source3/smbd/notifyd/notifydd.c +++ b/source3/smbd/notifyd/notifydd.c @@ -22,10 +22,12 @@ #include "lib/messages_ctdb.h" #include #include "lib/util/tevent_unix.h" +#include "lib/param/param.h" int main(int argc, const char *argv[]) { TALLOC_CTX *frame; + struct loadparm_context *lp_ctx = NULL; struct tevent_context *ev; struct messaging_context *msg; struct tevent_req *req; @@ -36,8 +38,15 @@ int main(int argc, const char *argv[]) frame = talloc_stackframe(); + lp_ctx = loadparm_init_s3(frame, loadparm_s3_helpers()); + if (lp_ctx == NULL) { + fprintf(stderr, + "Failed to initialise the global parameter structure.\n"); + return 1; + } + setup_logging("notifyd", DEBUG_DEFAULT_STDOUT); - lp_set_cmdline("log level", "10"); + lpcfg_set_cmdline(lp_ctx, "log level", "10"); ok = lp_load_initial_only(get_dyn_CONFIGFILE()); if (!ok) {