From 8b55dabf55335dc91cef54db8888ec40c9932434 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Thu, 27 Oct 2022 06:40:41 -0600 Subject: [PATCH] winbind: Add smbconf fallback for gpupdate_callback We should use the configfile specified, but also fallback if none is specified. Signed-off-by: David Mulder Reviewed-by: Jeremy Allison --- source3/winbindd/winbindd_gpupdate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/winbindd/winbindd_gpupdate.c b/source3/winbindd/winbindd_gpupdate.c index 6f294c1d030..9892cfd82fa 100644 --- a/source3/winbindd/winbindd_gpupdate.c +++ b/source3/winbindd/winbindd_gpupdate.c @@ -58,7 +58,10 @@ static void gpupdate_callback(struct tevent_context *ev, talloc_get_type_abort(private_data, struct gpupdate_state); const char *const *gpupdate_cmd = lpcfg_gpo_update_command(data->lp_ctx); - const char *smbconf = lp_default_path(); + const char *smbconf = lpcfg_configfile(data->lp_ctx); + if (smbconf == NULL) { + smbconf = lp_default_path(); + } /* Execute gpupdate */ req = samba_runcmd_send(data->ctx, ev, timeval_zero(), 2, 0,