From: Stefan Metzmacher Date: Tue, 15 Oct 2019 11:56:44 +0000 (+0200) Subject: s3:vfs_tsmsm: make use of lp_parm_substituted_string() X-Git-Tag: ldb-2.1.0~594 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5170fc24218f387c61bf24b13a414ce7d685b2d0;p=thirdparty%2Fsamba.git s3:vfs_tsmsm: make use of lp_parm_substituted_string() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c index 85a9bfdfa9c..27b21369673 100644 --- a/source3/modules/vfs_tsmsm.c +++ b/source3/modules/vfs_tsmsm.c @@ -89,6 +89,8 @@ static void tsmsm_free_data(void **pptr) { static int tsmsm_connect(struct vfs_handle_struct *handle, const char *service, const char *user) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct tsmsm_struct *tsmd; const char *fres; const char *tsmname; @@ -115,18 +117,18 @@ static int tsmsm_connect(struct vfs_handle_struct *handle, tsmname = (handle->param ? handle->param : "tsmsm"); /* Get 'hsm script' and 'dmapi attribute' parameters to tsmd context */ - tsmd->hsmscript = lp_parm_talloc_string( - tsmd, SNUM(handle->conn), tsmname, + tsmd->hsmscript = lp_parm_substituted_string( + tsmd, lp_sub, SNUM(handle->conn), tsmname, "hsm script", NULL); talloc_steal(tsmd, tsmd->hsmscript); - tsmd->attrib_name = lp_parm_talloc_string( - tsmd, SNUM(handle->conn), tsmname, + tsmd->attrib_name = lp_parm_substituted_string( + tsmd, lp_sub, SNUM(handle->conn), tsmname, "dmapi attribute", DM_ATTRIB_OBJECT); talloc_steal(tsmd, tsmd->attrib_name); - tsmd->attrib_value = lp_parm_talloc_string( - tsmd, SNUM(handle->conn), tsmname, + tsmd->attrib_value = lp_parm_substituted_string( + tsmd, lp_sub, SNUM(handle->conn), tsmname, "dmapi value", NULL); talloc_steal(tsmd, tsmd->attrib_value);