if (lp_ctx->s3_fns) {
if (service == NULL) {
s = lp_ctx->sDefault;
- lp_ctx->s3_fns->init_printer_values(lp_ctx->globals->ctx, s);
+ lp_ctx->s3_fns->init_printer_values(lp_ctx, lp_ctx->globals->ctx, s);
} else {
s = service;
- lp_ctx->s3_fns->init_printer_values(s, s);
+ lp_ctx->s3_fns->init_printer_values(lp_ctx, s, s);
}
}
int getservicebyname(const char *, struct loadparm_service *);
bool lp_include(struct loadparm_context *, struct loadparm_service *,
const char *, char **);
-void init_printer_values(TALLOC_CTX *, struct loadparm_service *);
+void init_printer_values(struct loadparm_context *, TALLOC_CTX *, struct loadparm_service *);
bool lp_do_section(const char *pszSectionName, void *userdata);
bool store_lp_set_cmdline(const char *pszParmName, const char *pszParmValue);
char * (*lp_string)(TALLOC_CTX *ctx, const char *in);
bool (*lp_include)(struct loadparm_context*, struct loadparm_service *,
const char *, char **);
- void (*init_printer_values)(TALLOC_CTX *, struct loadparm_service *);
+ void (*init_printer_values)(struct loadparm_context *, TALLOC_CTX *,
+ struct loadparm_service *);
void (*init_ldap_debugging)(void);
bool (*set_netbios_aliases)(const char **);
bool (*lp_do_parameter)(int, const char *, const char *);
Initialise the sDefault parameter structure for the printer values.
***************************************************************************/
-void init_printer_values(TALLOC_CTX *ctx, struct loadparm_service *pService)
+void init_printer_values(struct loadparm_context *lp_ctx, TALLOC_CTX *ctx,
+ struct loadparm_service *pService)
{
/* choose defaults depending on the type of printing */
switch (pService->printing) {
case PRINT_VLP: {
const char *tdbfile;
TALLOC_CTX *tmp_ctx = talloc_new(ctx);
- char *tmp;
+ const char *tmp;
- tdbfile = talloc_asprintf(
- tmp_ctx, "tdbfile=%s",
- lp_parm_const_string(-1, "vlp", "tdbfile",
- "/tmp/vlp.tdb"));
+ tmp = lpcfg_parm_string(lp_ctx, NULL, "vlp", "tdbfile");
+ if (tmp == NULL) {
+ tmp = "/tmp/vlp.tdb";
+ }
+
+ tdbfile = talloc_asprintf(tmp_ctx, "tdbfile=%s", tmp);
if (tdbfile == NULL) {
tdbfile="tdbfile=/tmp/vlp.tdb";
}
string_set(Globals.ctx, &sDefault.fstype, FSTYPE_STRING);
string_set(Globals.ctx, &sDefault.printjob_username, "%U");
- init_printer_values(Globals.ctx, &sDefault);
+ init_printer_values(lp_ctx, Globals.ctx, &sDefault);
sDefault.ntvfs_handler = (const char **)str_list_make_v3(NULL, "unixuid default", NULL);