From: Ralph Boehme Date: Tue, 5 Nov 2019 11:21:58 +0000 (+0100) Subject: smbdotconf: mark "wins hook" with substitution="1" X-Git-Tag: ldb-2.1.0~521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d2a3c8a791a42e2162ef957de2937673d536f53;p=thirdparty%2Fsamba.git smbdotconf: mark "wins hook" with substitution="1" Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/docs-xml/smbdotconf/wins/winshook.xml b/docs-xml/smbdotconf/wins/winshook.xml index 748e8b8f239..3dcf5d7cca5 100644 --- a/docs-xml/smbdotconf/wins/winshook.xml +++ b/docs-xml/smbdotconf/wins/winshook.xml @@ -1,6 +1,7 @@ When Samba is running as a WINS server this diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index c34bfaea3be..f68d6eebc0b 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -454,8 +454,10 @@ static void get_global_id_and_update(uint64_t *current_id, bool update) static void wins_hook(const char *operation, struct name_record *namerec, int ttl) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); char *command = NULL; - char *cmd = lp_wins_hook(talloc_tos()); + char *cmd = lp_wins_hook(talloc_tos(), lp_sub); char *p, *namestr; int i; TALLOC_CTX *ctx = talloc_tos(); diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c index 41a9fd8550d..be1d8ba8050 100644 --- a/source4/nbt_server/wins/winsdb.c +++ b/source4/nbt_server/wins/winsdb.c @@ -985,6 +985,8 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, const char *owner, enum winsdb_handle_caller caller) { + const struct loadparm_substitution *lp_sub = + lpcfg_noop_substitution(); struct winsdb_handle *h = NULL; unsigned int flags = 0; bool ret; @@ -1005,7 +1007,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, if (!h->ldb) goto failed; h->caller = caller; - h->hook_script = lpcfg_wins_hook(lp_ctx, h); + h->hook_script = lpcfg_wins_hook(lp_ctx, lp_sub, h); h->local_owner = talloc_strdup(h, owner); if (!h->local_owner) goto failed;