struct spoolss_PrinterInfo2 *pinfo2,
TALLOC_CTX *mem_ctx)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
const char *p;
if (*pinfo2->comment == '\0') {
- p = lp_comment(talloc_tos(), snum);
+ p = lp_comment(talloc_tos(), lp_sub, snum);
} else {
p = pinfo2->comment;
}
struct spoolss_PrinterInfo1 *r,
int snum)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
WERROR result;
r->flags = flags;
if (info2->comment == NULL || info2->comment[0] == '\0') {
- r->comment = lp_comment(mem_ctx, snum);
+ r->comment = lp_comment(mem_ctx, lp_sub, snum);
} else {
r->comment = talloc_strdup(mem_ctx, info2->comment); /* saved comment */
}
struct spoolss_PrinterInfo2 *r,
int snum)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
int count;
print_status_struct status;
WERROR result;
W_ERROR_HAVE_NO_MEMORY(r->drivername);
if (info2->comment[0] == '\0') {
- r->comment = lp_comment(mem_ctx, snum);
+ r->comment = lp_comment(mem_ctx, lp_sub, snum);
} else {
r->comment = talloc_strdup(mem_ctx, info2->comment);
}
struct srvsvc_NetShareInfo1 *r,
int snum)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
char *net_name = lp_servicename(talloc_tos(), snum);
- char *remark = lp_comment(p->mem_ctx, snum);
+ char *remark = lp_comment(p->mem_ctx, lp_sub, snum);
if (remark) {
remark = talloc_sub_full(
struct srvsvc_NetShareInfo2 *r,
int snum)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
char *remark = NULL;
char *path = NULL;
int max_connections = lp_max_connections(snum);
uint32_t max_uses = max_connections!=0 ? max_connections : (uint32_t)-1;
char *net_name = lp_servicename(talloc_tos(), snum);
- remark = lp_comment(p->mem_ctx, snum);
+ remark = lp_comment(p->mem_ctx, lp_sub, snum);
if (remark) {
remark = talloc_sub_full(
p->mem_ctx, lp_servicename(talloc_tos(), snum),
static void init_srv_share_info_501(struct pipes_struct *p,
struct srvsvc_NetShareInfo501 *r, int snum)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
const char *net_name = lp_servicename(talloc_tos(), snum);
- char *remark = lp_comment(p->mem_ctx, snum);
+ char *remark = lp_comment(p->mem_ctx, lp_sub, snum);
if (remark) {
remark = talloc_sub_full(
static void init_srv_share_info_502(struct pipes_struct *p,
struct srvsvc_NetShareInfo502 *r, int snum)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
const char *net_name = lp_servicename(talloc_tos(), snum);
char *path = NULL;
struct security_descriptor *sd = NULL;
struct sec_desc_buf *sd_buf = NULL;
size_t sd_size = 0;
TALLOC_CTX *ctx = p->mem_ctx;
- char *remark = lp_comment(ctx, snum);
+ char *remark = lp_comment(ctx, lp_sub, snum);
if (remark) {
remark = talloc_sub_full(
struct srvsvc_NetShareInfo1004 *r,
int snum)
{
- char *remark = lp_comment(p->mem_ctx, snum);
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
+ char *remark = lp_comment(p->mem_ctx, lp_sub, snum);
if (remark) {
remark = talloc_sub_full(
WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
struct srvsvc_NetShareSetInfo *r)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
char *command = NULL;
char *share_name = NULL;
char *comment = NULL;
}
pathname = lp_path(ctx, snum);
- comment = lp_comment(ctx, snum);
+ comment = lp_comment(ctx, lp_sub, snum);
type = STYPE_DISKTREE;
break;
case 1006:
return WERR_ACCESS_DENIED;
case 1501:
pathname = lp_path(ctx, snum);
- comment = lp_comment(ctx, snum);
+ comment = lp_comment(ctx, lp_sub, snum);
psd = info->info1501->sd;
map_generic_share_sd_bits(psd);
type = STYPE_DISKTREE;
/* Only call modify function if something changed. */
- if (strcmp(path, lp_path(talloc_tos(), snum)) || strcmp(comment, lp_comment(talloc_tos(), snum))
+ if (strcmp(path, lp_path(talloc_tos(), snum))
+ || strcmp(comment, lp_comment(talloc_tos(), lp_sub, snum))
|| (lp_max_connections(snum) != max_connections)
|| csc_policy_changed) {
char** buf, int* buflen,
char** stringbuf, int* stringspace, char* baseaddr)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
int struct_len;
char* p;
char* p2;
len = 0;
if (uLevel > 0) {
- len += StrlenExpanded(conn,snum,lp_comment(talloc_tos(), snum));
+ len += StrlenExpanded(conn,snum,lp_comment(talloc_tos(), lp_sub, snum));
}
if (uLevel > 1) {
len += strlen(lp_path(talloc_tos(), snum)) + 1;
}
SSVAL(p,14,type); /* device type */
SIVAL(p,16,PTR_DIFF(p2,baseaddr));
- len += CopyExpanded(conn,snum,&p2,lp_comment(talloc_tos(),snum),&l2);
+ len += CopyExpanded(conn,snum,&p2,lp_comment(talloc_tos(), lp_sub, snum),&l2);
}
if (uLevel > 1) {