char *szPostExec;
char *szRootPreExec;
char *szRootPostExec;
+ char *szCupsOptions;
char *szPrintcommand;
char *szLpqcommand;
char *szLprmcommand;
NULL, /* szPostExec */
NULL, /* szRootPreExec */
NULL, /* szRootPostExec */
+ NULL, /* szCupsOptions */
NULL, /* szPrintcommand */
NULL, /* szLpqcommand */
NULL, /* szLprmcommand */
{"printable", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT},
{"print ok", P_BOOL, P_LOCAL, &sDefault.bPrint_ok, NULL, NULL, FLAG_HIDE},
{"printing", P_ENUM, P_LOCAL, &sDefault.iPrinting, handle_printing, enum_printing, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
+ {"cups options", P_STRING, P_LOCAL, &sDefault.szCupsOptions, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"print command", P_STRING, P_LOCAL, &sDefault.szPrintcommand, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"disable spoolss", P_BOOL, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"lpq command", P_STRING, P_LOCAL, &sDefault.szLpqcommand, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
FN_LOCAL_LIST(lp_invalid_users, szInvalidUsers)
FN_LOCAL_LIST(lp_valid_users, szValidUsers)
FN_LOCAL_LIST(lp_admin_users, szAdminUsers)
+FN_LOCAL_STRING(lp_cups_options, szCupsOptions)
FN_LOCAL_STRING(lp_printcommand, szPrintcommand)
FN_LOCAL_STRING(lp_lpqcommand, szLpqcommand)
FN_LOCAL_STRING(lp_lprmcommand, szLprmcommand)
char uri[HTTP_MAX_URI]; /* printer-uri attribute */
char *clientname; /* hostname of client for job-originating-host attribute */
pstring new_jobname;
+ int num_options = 0;
+ cups_option_t *options;
DEBUG(5,("cups_job_submit(%d, %p (%d))\n", snum, pjob, pjob->sysjob));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
new_jobname);
+ /*
+ * add any options defined in smb.conf
+ */
+
+ num_options = 0;
+ options = NULL;
+ num_options = cupsParseOptions(lp_cups_options(snum), num_options, &options);
+
+ if ( num_options )
+ cupsEncodeOptions(request, num_options, options);
+
/*
* Do the request and get back a response...
*/
return (ret);
}
-
/*
* 'cups_queue_get()' - Get all the jobs in the print queue.
*/