diff options
-rw-r--r-- | docs-xml/smbdotconf/base/path.xml | 1 | ||||
-rw-r--r-- | source3/param/loadparm.c | 4 | ||||
-rw-r--r-- | source3/printing/nt_printing.c | 17 | ||||
-rw-r--r-- | source3/printing/printing.c | 14 | ||||
-rw-r--r-- | source3/printing/printspoolss.c | 3 | ||||
-rw-r--r-- | source3/rpc_server/fss/srv_fss_agent.c | 12 | ||||
-rw-r--r-- | source3/rpc_server/mdssvc/srv_mdssvc_nt.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 36 | ||||
-rw-r--r-- | source3/smbd/lanman.c | 4 | ||||
-rw-r--r-- | source3/smbd/msdfs.c | 12 | ||||
-rw-r--r-- | source3/smbd/password.c | 4 | ||||
-rw-r--r-- | source3/smbd/service.c | 2 | ||||
-rw-r--r-- | source3/utils/net_vfs.c | 4 |
13 files changed, 79 insertions, 38 deletions
diff --git a/docs-xml/smbdotconf/base/path.xml b/docs-xml/smbdotconf/base/path.xml index c84e039875a..669c20d2a8b 100644 --- a/docs-xml/smbdotconf/base/path.xml +++ b/docs-xml/smbdotconf/base/path.xml @@ -1,6 +1,7 @@ <samba:parameter name="path" context="S" type="string" + substitution="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> <synonym>directory</synonym> <description> diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index b08589b22fb..1d47d74c5f4 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1557,6 +1557,8 @@ static bool hash_a_service(const char *name, int idx) bool lp_add_home(const char *pszHomename, int iDefaultService, const char *user, const char *pszHomedir) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); int i; char *global_path; @@ -1570,7 +1572,7 @@ bool lp_add_home(const char *pszHomename, int iDefaultService, if (i < 0) return false; - global_path = lp_path(talloc_tos(), GLOBAL_SECTION_SNUM); + global_path = lp_path(talloc_tos(), lp_sub, GLOBAL_SECTION_SNUM); if (!(*(ServicePtrs[iDefaultService]->path)) || strequal(ServicePtrs[iDefaultService]->path, global_path)) { lpcfg_string_set(ServicePtrs[i], &ServicePtrs[i]->path, diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 89405f1c8ee..46d2cea9e48 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -80,6 +80,9 @@ static bool print_driver_directories_init(void) char *driver_path; bool ok; TALLOC_CTX *mem_ctx = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); + const char *dir_list[] = { "W32X86/PCC", "x64/PCC", @@ -94,7 +97,7 @@ static bool print_driver_directories_init(void) return true; } - driver_path = lp_path(mem_ctx, service); + driver_path = lp_path(mem_ctx, lp_sub, service); if (driver_path == NULL) { talloc_free(mem_ctx); return false; @@ -987,6 +990,8 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf WERROR *perr) { TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); int cversion = -1; NTSTATUS nt_status; struct smb_filename *smb_fname = NULL; @@ -1028,7 +1033,7 @@ static uint32_t get_correct_cversion(const struct auth_session_info *session_inf return -1; } - printdollar_path = lp_path(frame, printdollar_snum); + printdollar_path = lp_path(frame, lp_sub, printdollar_snum); if (printdollar_path == NULL) { *perr = WERR_NOT_ENOUGH_MEMORY; TALLOC_FREE(frame); @@ -1477,6 +1482,8 @@ WERROR move_driver_to_download_area(const struct auth_session_info *session_info const char *driver_directory) { TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct spoolss_AddDriverInfo3 *driver; struct spoolss_AddDriverInfo3 converted_driver; const char *short_architecture; @@ -1527,7 +1534,7 @@ WERROR move_driver_to_download_area(const struct auth_session_info *session_info nt_status = create_conn_struct_tos_cwd(global_messaging_context(), printdollar_snum, - lp_path(frame, printdollar_snum), + lp_path(frame, lp_sub, printdollar_snum), session_info, &c); if (!NT_STATUS_IS_OK(nt_status)) { @@ -2041,6 +2048,8 @@ bool delete_driver_files(const struct auth_session_info *session_info, const struct spoolss_DriverInfo8 *r) { TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); const char *short_arch; struct conn_struct_tos *c = NULL; connection_struct *conn = NULL; @@ -2069,7 +2078,7 @@ bool delete_driver_files(const struct auth_session_info *session_info, nt_status = create_conn_struct_tos_cwd(global_messaging_context(), printdollar_snum, - lp_path(frame, printdollar_snum), + lp_path(frame, lp_sub, printdollar_snum), session_info, &c); if (!NT_STATUS_IS_OK(nt_status)) { diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 0f4db52e011..18c7ca0616c 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -2688,6 +2688,8 @@ static WERROR print_job_checks(const struct auth_session_info *server_info, int snum, int *njobs) { const char *sharename = lp_const_servicename(snum); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); uint64_t dspace, dsize; uint64_t minspace; int ret; @@ -2708,7 +2710,7 @@ static WERROR print_job_checks(const struct auth_session_info *server_info, /* see if we have sufficient disk space */ if (lp_min_print_space(snum)) { minspace = lp_min_print_space(snum); - ret = sys_fsusage(lp_path(talloc_tos(), snum), &dspace, &dsize); + ret = sys_fsusage(lp_path(talloc_tos(), lp_sub, snum), &dspace, &dsize); if (ret == 0 && dspace < 2*minspace) { DEBUG(3, ("print_job_checks: " "disk space check failed.\n")); @@ -2743,6 +2745,8 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid, const char *output_file, struct printjob *pjob) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); WERROR werr; SMB_STRUCT_STAT st; const char *path; @@ -2754,7 +2758,7 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid, * Verify that the file name is ok, within path, and it is * already already there */ if (output_file) { - path = lp_path(talloc_tos(), snum); + path = lp_path(talloc_tos(), lp_sub, snum); len = strlen(path); if (strncmp(output_file, path, len) == 0 && (output_file[len - 1] == '/' || output_file[len] == '/')) { @@ -2783,7 +2787,7 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid, } slprintf(pjob->filename, sizeof(pjob->filename)-1, - "%s/%sXXXXXX", lp_path(talloc_tos(), snum), + "%s/%sXXXXXX", lp_path(talloc_tos(), lp_sub, snum), PRINT_SPOOL_PREFIX); mask = umask(S_IRWXO | S_IRWXG); pjob->fd = mkstemp(pjob->filename); @@ -2823,6 +2827,8 @@ WERROR print_job_start(const struct auth_session_info *server_info, struct printjob pjob; const char *sharename = lp_const_servicename(snum); struct tdb_print_db *pdb = get_print_db_byname(sharename); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); int njobs; WERROR werr; @@ -2830,7 +2836,7 @@ WERROR print_job_start(const struct auth_session_info *server_info, return WERR_INTERNAL_DB_CORRUPTION; } - path = lp_path(talloc_tos(), snum); + path = lp_path(talloc_tos(), lp_sub, snum); werr = print_job_checks(server_info, msg_ctx, snum, &njobs); if (!W_ERROR_IS_OK(werr)) { diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 9d565de120a..68e94fd1635 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -57,6 +57,8 @@ NTSTATUS print_spool_open(files_struct *fsp, const char *fname, uint64_t current_vuid) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); NTSTATUS status; TALLOC_CTX *tmp_ctx; struct print_file_data *pf; @@ -119,6 +121,7 @@ NTSTATUS print_spool_open(files_struct *fsp, pf->filename = talloc_asprintf(pf, "%s/%sXXXXXX", lp_path(talloc_tos(), + lp_sub, SNUM(fsp->conn)), PRINT_SPOOL_PREFIX); if (!pf->filename) { diff --git a/source3/rpc_server/fss/srv_fss_agent.c b/source3/rpc_server/fss/srv_fss_agent.c index 925b68e9fa2..aebd9c0c753 100644 --- a/source3/rpc_server/fss/srv_fss_agent.c +++ b/source3/rpc_server/fss/srv_fss_agent.c @@ -286,12 +286,14 @@ static NTSTATUS fss_conn_create_tos(struct messaging_context *msg_ctx, int snum, struct connection_struct **conn_out) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct conn_struct_tos *c = NULL; NTSTATUS status; status = create_conn_struct_tos(msg_ctx, snum, - lp_path(talloc_tos(), snum), + lp_path(talloc_tos(), lp_sub, snum), session_info, &c); if (!NT_STATUS_IS_OK(status)) { @@ -730,6 +732,8 @@ uint32_t _fss_AddToShadowCopySet(struct pipes_struct *p, struct connection_struct *conn; NTSTATUS status; TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); if (!fss_permitted(p)) { ret = HRES_ERROR_V(HRES_E_ACCESSDENIED); @@ -755,7 +759,7 @@ uint32_t _fss_AddToShadowCopySet(struct pipes_struct *p, goto err_tmp_free; } - path_name = lp_path(frame, snum); + path_name = lp_path(frame, lp_sub, snum); if (path_name == NULL) { ret = HRES_ERROR_V(HRES_E_OUTOFMEMORY); goto err_tmp_free; @@ -1325,6 +1329,8 @@ uint32_t _fss_IsPathSupported(struct pipes_struct *p, struct connection_struct *conn; char *share; TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); if (!fss_permitted(p)) { TALLOC_FREE(frame); @@ -1355,7 +1361,7 @@ uint32_t _fss_IsPathSupported(struct pipes_struct *p, return HRES_ERROR_V(HRES_E_ACCESSDENIED); } status = SMB_VFS_SNAP_CHECK_PATH(conn, frame, - lp_path(frame, snum), + lp_path(frame, lp_sub, snum), &base_vol); unbecome_user_without_service(); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/rpc_server/mdssvc/srv_mdssvc_nt.c b/source3/rpc_server/mdssvc/srv_mdssvc_nt.c index 81114ce6513..04287008a5c 100644 --- a/source3/rpc_server/mdssvc/srv_mdssvc_nt.c +++ b/source3/rpc_server/mdssvc/srv_mdssvc_nt.c @@ -151,6 +151,8 @@ static NTSTATUS create_mdssvc_policy_handle(TALLOC_CTX *mem_ctx, void _mdssvc_open(struct pipes_struct *p, struct mdssvc_open *r) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); int snum; char *outpath = discard_const_p(char, r->out.share_path); char *path; @@ -168,7 +170,7 @@ void _mdssvc_open(struct pipes_struct *p, struct mdssvc_open *r) return; } - path = lp_path(talloc_tos(), snum); + path = lp_path(talloc_tos(), lp_sub, snum); if (path == NULL) { DBG_ERR("Couldn't create policy handle for %s\n", r->in.share_name); diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 1280cc90f69..65f0f1ffa47 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -229,7 +229,7 @@ static void init_srv_share_info_1(struct pipes_struct *p, if (remark) { remark = talloc_sub_full( p->mem_ctx, lp_servicename(talloc_tos(), snum), - get_current_username(), lp_path(talloc_tos(), snum), + get_current_username(), lp_path(talloc_tos(), lp_sub, snum), p->session_info->unix_token->uid, get_current_username(), "", remark); } @@ -259,12 +259,12 @@ static void init_srv_share_info_2(struct pipes_struct *p, if (remark) { remark = talloc_sub_full( p->mem_ctx, lp_servicename(talloc_tos(), snum), - get_current_username(), lp_path(talloc_tos(), snum), + get_current_username(), lp_path(talloc_tos(), lp_sub, snum), p->session_info->unix_token->uid, get_current_username(), "", remark); } path = talloc_asprintf(p->mem_ctx, - "C:%s", lp_path(talloc_tos(), snum)); + "C:%s", lp_path(talloc_tos(), lp_sub, snum)); if (path) { /* @@ -326,7 +326,7 @@ static void init_srv_share_info_501(struct pipes_struct *p, if (remark) { remark = talloc_sub_full( p->mem_ctx, lp_servicename(talloc_tos(), snum), - get_current_username(), lp_path(talloc_tos(), snum), + get_current_username(), lp_path(talloc_tos(), lp_sub, snum), p->session_info->unix_token->uid, get_current_username(), "", remark); } @@ -362,11 +362,11 @@ static void init_srv_share_info_502(struct pipes_struct *p, if (remark) { remark = talloc_sub_full( p->mem_ctx, lp_servicename(talloc_tos(), snum), - get_current_username(), lp_path(talloc_tos(), snum), + get_current_username(), lp_path(talloc_tos(), lp_sub, snum), p->session_info->unix_token->uid, get_current_username(), "", remark); } - path = talloc_asprintf(ctx, "C:%s", lp_path(talloc_tos(), snum)); + path = talloc_asprintf(ctx, "C:%s", lp_path(talloc_tos(), lp_sub, snum)); if (path) { /* * Change / to \\ so that win2k will see it as a valid path. This was added to @@ -405,7 +405,7 @@ static void init_srv_share_info_1004(struct pipes_struct *p, if (remark) { remark = talloc_sub_full( p->mem_ctx, lp_servicename(talloc_tos(), snum), - get_current_username(), lp_path(talloc_tos(), snum), + get_current_username(), lp_path(talloc_tos(), lp_sub, snum), p->session_info->unix_token->uid, get_current_username(), "", remark); } @@ -1140,6 +1140,8 @@ static WERROR init_srv_conn_info_1(const char *name, uint32_t *resume_handle_p, uint32_t *total_entries) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); uint32_t num_entries = 0; int snum = 0; uint32_t resume_handle = resume_handle_p ? *resume_handle_p : 0; @@ -1248,7 +1250,7 @@ static WERROR init_srv_conn_info_1(const char *name, */ count_share_opens(ctr1->array, svrid_arr, - lp_path(talloc_tos(), snum), + lp_path(talloc_tos(), lp_sub, snum), num_entries, *total_entries); } @@ -1793,7 +1795,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p, switch (r->in.level) { case 1: - pathname = lp_path(ctx, snum); + pathname = lp_path(ctx, lp_sub, snum); comment = talloc_strdup(ctx, info->info1->comment); type = info->info1->type; psd = NULL; @@ -1822,7 +1824,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p, map_generic_share_sd_bits(psd); break; case 1004: - pathname = lp_path(ctx, snum); + pathname = lp_path(ctx, lp_sub, snum); comment = talloc_strdup(ctx, info->info1004->comment); type = STYPE_DISKTREE; break; @@ -1842,7 +1844,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p, csc_policy_changed = true; } - pathname = lp_path(ctx, snum); + pathname = lp_path(ctx, lp_sub, snum); comment = lp_comment(ctx, lp_sub, snum); type = STYPE_DISKTREE; break; @@ -1850,7 +1852,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p, case 1007: return WERR_ACCESS_DENIED; case 1501: - pathname = lp_path(ctx, snum); + pathname = lp_path(ctx, lp_sub, snum); comment = lp_comment(ctx, lp_sub, snum); psd = info->info1501->sd; map_generic_share_sd_bits(psd); @@ -1891,7 +1893,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p, /* Only call modify function if something changed. */ - if (strcmp(path, lp_path(talloc_tos(), snum)) + if (strcmp(path, lp_path(talloc_tos(), lp_sub, snum)) || strcmp(comment, lp_comment(talloc_tos(), lp_sub, snum)) || (lp_max_connections(snum) != max_connections) || csc_policy_changed) { @@ -2333,6 +2335,8 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p, struct srvsvc_NetGetFileSecurity *r) { TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct smb_filename *smb_fname = NULL; size_t sd_size; char *servicename = NULL; @@ -2365,7 +2369,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p, nt_status = create_conn_struct_tos_cwd(global_messaging_context(), snum, - lp_path(frame, snum), + lp_path(frame, lp_sub, snum), p->session_info, &c); if (!NT_STATUS_IS_OK(nt_status)) { @@ -2465,6 +2469,8 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p, struct srvsvc_NetSetFileSecurity *r) { TALLOC_CTX *frame = talloc_stackframe(); + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct smb_filename *smb_fname = NULL; char *servicename = NULL; files_struct *fsp = NULL; @@ -2499,7 +2505,7 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p, nt_status = create_conn_struct_tos_cwd(global_messaging_context(), snum, - lp_path(frame, snum), + lp_path(frame, lp_sub, snum), p->session_info, &c); if (!NT_STATUS_IS_OK(nt_status)) { diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 0a3e1073eb6..679f4636431 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -1920,7 +1920,7 @@ static int fill_share_info(connection_struct *conn, int snum, int uLevel, len += StrlenExpanded(conn,snum,lp_comment(talloc_tos(), lp_sub, snum)); } if (uLevel > 1) { - len += strlen(lp_path(talloc_tos(), snum)) + 1; + len += strlen(lp_path(talloc_tos(), lp_sub, snum)) + 1; } if (buflen) { *buflen = struct_len; @@ -1972,7 +1972,7 @@ static int fill_share_info(connection_struct *conn, int snum, int uLevel, SSVALS(p,22,-1); /* max uses */ SSVAL(p,24,1); /* current uses */ SIVAL(p,26,PTR_DIFF(p2,baseaddr)); /* local pathname */ - len += CopyAndAdvance(&p2,lp_path(talloc_tos(),snum),&l2); + len += CopyAndAdvance(&p2,lp_path(talloc_tos(),lp_sub, snum),&l2); memset(p+30,0,SHPWLEN+2); /* passwd (reserved), pad field */ } diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 45015cae140..0e865829751 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -1115,7 +1115,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx, status = create_conn_struct_tos_cwd(global_messaging_context(), snum, - lp_path(frame, snum), + lp_path(frame, lp_sub, snum), NULL, &c); if (!NT_STATUS_IS_OK(status)) { @@ -1320,6 +1320,8 @@ static bool junction_to_local_path_tos(const struct junction_map *jucn, char **pp_path_out, connection_struct **conn_out) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); struct conn_struct_tos *c = NULL; int snum; char *path_out = NULL; @@ -1331,7 +1333,7 @@ static bool junction_to_local_path_tos(const struct junction_map *jucn, } status = create_conn_struct_tos_cwd(global_messaging_context(), snum, - lp_path(talloc_tos(), snum), + lp_path(talloc_tos(), lp_sub, snum), NULL, &c); if (!NT_STATUS_IS_OK(status)) { @@ -1340,7 +1342,7 @@ static bool junction_to_local_path_tos(const struct junction_map *jucn, path_out = talloc_asprintf(c, "%s/%s", - lp_path(talloc_tos(), snum), + lp_path(talloc_tos(), lp_sub, snum), jucn->volume_name); if (path_out == NULL) { TALLOC_FREE(c); @@ -1503,7 +1505,7 @@ static int count_dfs_links(TALLOC_CTX *ctx, int snum) DIR *dirp = NULL; const char *dname = NULL; char *talloced = NULL; - const char *connect_path = lp_path(frame, snum); + const char *connect_path = lp_path(frame, lp_sub, snum); const char *msdfs_proxy = lp_msdfs_proxy(frame, lp_sub, snum); struct conn_struct_tos *c = NULL; connection_struct *conn = NULL; @@ -1595,7 +1597,7 @@ static int form_junctions(TALLOC_CTX *ctx, DIR *dirp = NULL; const char *dname = NULL; char *talloced = NULL; - const char *connect_path = lp_path(frame, snum); + const char *connect_path = lp_path(frame, lp_sub, snum); char *service_name = lp_servicename(frame, snum); const char *msdfs_proxy = lp_msdfs_proxy(frame, lp_sub, snum); struct conn_struct_tos *c = NULL; diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 0576d2563eb..284a4aba778 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -109,6 +109,8 @@ void invalidate_vuid(struct smbd_server_connection *sconn, uint64_t vuid) int register_homes_share(const char *username) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); int result; struct passwd *pwd; @@ -116,7 +118,7 @@ int register_homes_share(const char *username) if (result != -1) { DEBUG(3, ("Using static (or previously created) service for " "user '%s'; path = '%s'\n", username, - lp_path(talloc_tos(), result))); + lp_path(talloc_tos(), lp_sub, result))); return result; } diff --git a/source3/smbd/service.c b/source3/smbd/service.c index e1a718b6d91..0d220903dec 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -624,7 +624,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, conn->session_info->unix_token->gid, conn->session_info->unix_info->sanitized_username, conn->session_info->info->domain_name, - lp_path(talloc_tos(), snum)); + lp_path(talloc_tos(), lp_sub, snum)); if (!s) { status = NT_STATUS_NO_MEMORY; goto err_root_exit; diff --git a/source3/utils/net_vfs.c b/source3/utils/net_vfs.c index c9e115292b3..d5f6beddb88 100644 --- a/source3/utils/net_vfs.c +++ b/source3/utils/net_vfs.c @@ -114,6 +114,8 @@ static bool net_vfs_make_session_info(struct auth_session_info **session_info) static int net_vfs_init(struct net_context *c, int argc, const char **argv) { + const struct loadparm_substitution *lp_sub = + loadparm_s3_global_substitution(); const char *service = NULL; char *share_root = NULL; int snum; @@ -166,7 +168,7 @@ static int net_vfs_init(struct net_context *c, int argc, const char **argv) goto done; } - share_root = lp_path(state.mem_ctx, snum); + share_root = lp_path(state.mem_ctx, lp_sub, snum); if (share_root == NULL) { fprintf(stderr, "Failed to find share root for service: %s\n", service); |