|| strequal(default_service->pathname, lp_ctx->sDefault->pathname)) {
service->pathname = talloc_strdup(service, pszHomedir);
} else {
- service->pathname = string_sub_talloc(service, lpcfg_pathname(default_service, lp_ctx->sDefault), "%H", pszHomedir);
+ service->pathname = string_sub_talloc(service, lpcfg_path(default_service, lp_ctx->sDefault), "%H", pszHomedir);
}
if (!(*(service->comment))) {
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-FN_LOCAL_STRING(pathname, pathname)
+FN_LOCAL_STRING(path, pathname)
FN_LOCAL_LIST(hostsallow, hostsallow)
FN_LOCAL_LIST(hostsdeny, hostsdeny)
FN_LOCAL_STRING(fstype, fstype)
if (!(*(ServicePtrs[iDefaultService]->pathname))
|| strequal(ServicePtrs[iDefaultService]->pathname,
- lp_pathname(talloc_tos(), GLOBAL_SECTION_SNUM))) {
+ lp_path(talloc_tos(), GLOBAL_SECTION_SNUM))) {
string_set(&ServicePtrs[i]->pathname, pszHomedir);
}
return true;
}
- driver_path = lp_pathname(mem_ctx, service);
+ driver_path = lp_path(mem_ctx, service);
if (driver_path == NULL) {
talloc_free(mem_ctx);
return false;
server_messaging_context(),
&conn,
printdollar_snum,
- lp_pathname(talloc_tos(), printdollar_snum),
+ lp_path(talloc_tos(), printdollar_snum),
session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("get_correct_cversion: create_conn_struct "
server_messaging_context(),
&conn,
printdollar_snum,
- lp_pathname(talloc_tos(), printdollar_snum),
+ lp_path(talloc_tos(), printdollar_snum),
session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("move_driver_to_download_area: create_conn_struct "
server_messaging_context(),
&conn,
printdollar_snum,
- lp_pathname(talloc_tos(), printdollar_snum),
+ lp_path(talloc_tos(), printdollar_snum),
session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("delete_driver_files: create_conn_struct "
/* see if we have sufficient disk space */
if (lp_minprintspace(snum)) {
minspace = lp_minprintspace(snum);
- ret = sys_fsusage(lp_pathname(talloc_tos(), snum), &dspace, &dsize);
+ ret = sys_fsusage(lp_path(talloc_tos(), snum), &dspace, &dsize);
if (ret == 0 && dspace < 2*minspace) {
DEBUG(3, ("print_job_checks: "
"disk space check failed.\n"));
* Verify that the file name is ok, within path, and it is
* already already there */
if (output_file) {
- path = lp_pathname(talloc_tos(), snum);
+ path = lp_path(talloc_tos(), snum);
len = strlen(path);
if (strncmp(output_file, path, len) == 0 &&
(output_file[len - 1] == '/' || output_file[len] == '/')) {
}
slprintf(pjob->filename, sizeof(pjob->filename)-1,
- "%s/%sXXXXXX", lp_pathname(talloc_tos(), snum),
+ "%s/%sXXXXXX", lp_path(talloc_tos(), snum),
PRINT_SPOOL_PREFIX);
mask = umask(S_IRWXO | S_IRWXG);
pjob->fd = mkstemp(pjob->filename);
return WERR_INTERNAL_DB_CORRUPTION;
}
- path = lp_pathname(talloc_tos(), snum);
+ path = lp_path(talloc_tos(), snum);
werr = print_job_checks(server_info, msg_ctx, snum, &njobs);
if (!W_ERROR_IS_OK(werr)) {
*/
pf->filename = talloc_asprintf(pf, "%s/%sXXXXXX",
- lp_pathname(talloc_tos(),
- SNUM(fsp->conn)),
+ lp_path(talloc_tos(),
+ SNUM(fsp->conn)),
PRINT_SPOOL_PREFIX);
if (!pf->filename) {
status = NT_STATUS_NO_MEMORY;
if (remark) {
remark = talloc_sub_advanced(
p->mem_ctx, lp_servicename(talloc_tos(), snum),
- get_current_username(), lp_pathname(talloc_tos(), snum),
+ get_current_username(), lp_path(talloc_tos(), snum),
p->session_info->unix_token->uid, get_current_username(),
"", remark);
}
if (remark) {
remark = talloc_sub_advanced(
p->mem_ctx, lp_servicename(talloc_tos(), snum),
- get_current_username(), lp_pathname(talloc_tos(), snum),
+ get_current_username(), lp_path(talloc_tos(), snum),
p->session_info->unix_token->uid, get_current_username(),
"", remark);
}
path = talloc_asprintf(p->mem_ctx,
- "C:%s", lp_pathname(talloc_tos(), snum));
+ "C:%s", lp_path(talloc_tos(), snum));
if (path) {
/*
if (remark) {
remark = talloc_sub_advanced(
p->mem_ctx, lp_servicename(talloc_tos(), snum),
- get_current_username(), lp_pathname(talloc_tos(), snum),
+ get_current_username(), lp_path(talloc_tos(), snum),
p->session_info->unix_token->uid, get_current_username(),
"", remark);
}
if (remark) {
remark = talloc_sub_advanced(
p->mem_ctx, lp_servicename(talloc_tos(), snum),
- get_current_username(), lp_pathname(talloc_tos(), snum),
+ get_current_username(), lp_path(talloc_tos(), snum),
p->session_info->unix_token->uid, get_current_username(),
"", remark);
}
- path = talloc_asprintf(ctx, "C:%s", lp_pathname(talloc_tos(), snum));
+ path = talloc_asprintf(ctx, "C:%s", lp_path(talloc_tos(), snum));
if (path) {
/*
* Change / to \\ so that win2k will see it as a valid path. This was added to
if (remark) {
remark = talloc_sub_advanced(
p->mem_ctx, lp_servicename(talloc_tos(), snum),
- get_current_username(), lp_pathname(talloc_tos(), snum),
+ get_current_username(), lp_path(talloc_tos(), snum),
p->session_info->unix_token->uid, get_current_username(),
"", remark);
}
switch (r->in.level) {
case 1:
- pathname = lp_pathname(ctx, snum);
+ pathname = lp_path(ctx, snum);
comment = talloc_strdup(ctx, info->info1->comment);
type = info->info1->type;
psd = NULL;
map_generic_share_sd_bits(psd);
break;
case 1004:
- pathname = lp_pathname(ctx, snum);
+ pathname = lp_path(ctx, snum);
comment = talloc_strdup(ctx, info->info1004->comment);
type = STYPE_DISKTREE;
break;
case 1007:
return WERR_ACCESS_DENIED;
case 1501:
- pathname = lp_pathname(ctx, snum);
+ pathname = lp_path(ctx, snum);
comment = lp_comment(ctx, snum);
psd = info->info1501->sd;
map_generic_share_sd_bits(psd);
/* Only call modify function if something changed. */
- if (strcmp(path, lp_pathname(talloc_tos(), snum)) || strcmp(comment, lp_comment(talloc_tos(), snum))
+ if (strcmp(path, lp_path(talloc_tos(), snum)) || strcmp(comment, lp_comment(talloc_tos(), snum))
|| (lp_max_connections(snum) != max_connections)) {
if (!lp_change_share_cmd(talloc_tos()) || !*lp_change_share_cmd(talloc_tos())) {
DEBUG(10,("_srvsvc_NetShareSetInfo: No change share command\n"));
server_event_context(),
server_messaging_context(),
&conn,
- snum, lp_pathname(talloc_tos(), snum),
+ snum, lp_path(talloc_tos(), snum),
p->session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(10, ("create_conn_struct failed: %s\n",
server_event_context(),
server_messaging_context(),
&conn,
- snum, lp_pathname(talloc_tos(), snum),
+ snum, lp_path(talloc_tos(), snum),
p->session_info, &oldcwd);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(10, ("create_conn_struct failed: %s\n",
continue;
}
- share_path = lp_pathname(talloc_tos(), snum);
+ share_path = lp_path(talloc_tos(), snum);
/* make sure we have a path (e.g. [homes] ) */
if (strlen(share_path) == 0) {
len += StrlenExpanded(conn,snum,lp_comment(talloc_tos(), snum));
}
if (uLevel > 1) {
- len += strlen(lp_pathname(talloc_tos(), snum)) + 1;
+ len += strlen(lp_path(talloc_tos(), snum)) + 1;
}
if (buflen) {
*buflen = struct_len;
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_pathname(talloc_tos(),snum),&l2);
+ len += CopyAndAdvance(&p2,lp_path(talloc_tos(),snum),&l2);
memset(p+30,0,SHPWLEN+2); /* passwd (reserved), pad field */
}
server_event_context(),
server_messaging_context(),
&conn, snum,
- lp_pathname(talloc_tos(), snum), NULL, &oldpath);
+ lp_path(talloc_tos(), snum), NULL, &oldpath);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(pdp);
return status;
server_event_context(),
server_messaging_context(),
conn_out,
- snum, lp_pathname(talloc_tos(), snum), NULL, oldpath);
+ snum, lp_path(talloc_tos(), snum), NULL, oldpath);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
*pp_path_out = talloc_asprintf(*conn_out,
"%s/%s",
- lp_pathname(talloc_tos(), snum),
+ lp_path(talloc_tos(), snum),
jucn->volume_name);
if (!*pp_path_out) {
vfs_ChDir(*conn_out, *oldpath);
DIR *dirp = NULL;
const char *dname = NULL;
char *talloced = NULL;
- const char *connect_path = lp_pathname(talloc_tos(), snum);
+ const char *connect_path = lp_path(talloc_tos(), snum);
const char *msdfs_proxy = lp_msdfs_proxy(talloc_tos(), snum);
connection_struct *conn;
NTSTATUS status;
DIR *dirp = NULL;
const char *dname = NULL;
char *talloced = NULL;
- const char *connect_path = lp_pathname(talloc_tos(), snum);
+ const char *connect_path = lp_path(talloc_tos(), snum);
char *service_name = lp_servicename(talloc_tos(), snum);
const char *msdfs_proxy = lp_msdfs_proxy(talloc_tos(), snum);
connection_struct *conn;
if (result != -1) {
DEBUG(3, ("Using static (or previously created) service for "
"user '%s'; path = '%s'\n", username,
- lp_pathname(talloc_tos(), result)));
+ lp_path(talloc_tos(), result)));
return result;
}
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
conn->session_info->info->domain_name,
- lp_pathname(talloc_tos(), snum));
+ lp_path(talloc_tos(), snum));
if (!s) {
status = NT_STATUS_NO_MEMORY;
goto err_root_exit;
}
if (strcmp(opt_name, SHARE_PATH) == 0) {
- return lpcfg_pathname(s, lpcfg_default_service(lp_ctx));
+ return lpcfg_path(s, lpcfg_default_service(lp_ctx));
}
if (strcmp(opt_name, SHARE_COMMENT) == 0) {