const char *sharename,
struct messaging_context *msg_ctx)
{
- char *cmd = lp_deleteprinter_cmd(talloc_tos());
+ char *cmd = lp_deleteprinter_command(talloc_tos());
char *command = NULL;
int ret;
bool is_print_op = false;
#define SETUP_SPOOLSS_NOTIFY_DATA_DEVMODE(_data, _devmode) \
_data->data.devmode.devmode = _devmode;
-#define SETUP_SPOOLSS_NOTIFY_DATA_SECDESC(_data, _sd) \
- _data->data.sd.sd = dup_sec_desc(mem_ctx, _sd); \
- if (!_data->data.sd.sd) { \
- _data->data.sd.sd_size = 0; \
- } \
- _data->data.sd.sd_size = \
- ndr_size_security_descriptor(_data->data.sd.sd, 0);
-
static void init_systemtime_buffer(TALLOC_CTX *mem_ctx,
struct tm *t,
const char **pp,
/**********************************************************************
callback to receive a MSG_PRINTER_DRVUPGRADE message and interate
over all printers, upgrading ones as necessary
+ This is now *ONLY* called inside the background lpq updater. JRA.
**********************************************************************/
void do_drv_upgrade_printer(struct messaging_context *msg,
if ( r->in.access_mask & SERVER_ACCESS_ADMINISTER )
{
- if (!lp_ms_add_printer_wizard()) {
+ if (!lp_show_add_printer_wizard()) {
close_printer_handle(p, r->out.handle);
ZERO_STRUCTP(r->out.handle);
return WERR_ACCESS_DENIED;
struct spoolss_PrinterInfo2 *pinfo2,
TALLOC_CTX *mem_ctx)
{
- SETUP_SPOOLSS_NOTIFY_DATA_SECDESC(data, pinfo2->secdesc);
+ data->data.sd.sd = dup_sec_desc(mem_ctx, pinfo2->secdesc);
+ data->data.sd.sd_size = ndr_size_security_descriptor(data->data.sd.sd,
+ 0);
}
/*******************************************************************
static WERROR add_port_hook(TALLOC_CTX *ctx, struct security_token *token, const char *portname, const char *uri)
{
- char *cmd = lp_addport_cmd(talloc_tos());
+ char *cmd = lp_addport_command(talloc_tos());
char *command = NULL;
int ret;
bool is_print_op = false;
const char *remote_machine,
struct messaging_context *msg_ctx)
{
- char *cmd = lp_addprinter_cmd(talloc_tos());
+ char *cmd = lp_addprinter_command(talloc_tos());
char **qlines;
char *command = NULL;
int numlines;
/* Call addprinter hook */
/* Check changes to see if this is really needed */
- if (*lp_addprinter_cmd(talloc_tos()) &&
+ if (*lp_addprinter_command(talloc_tos()) &&
(!strequal(printer->drivername, old_printer->drivername) ||
!strequal(printer->comment, old_printer->comment) ||
!strequal(printer->portname, old_printer->portname) ||
static WERROR enumports_hook(TALLOC_CTX *ctx, int *count, char ***lines)
{
- char *cmd = lp_enumports_cmd(talloc_tos());
+ char *cmd = lp_enumports_command(talloc_tos());
char **qlines = NULL;
char *command = NULL;
int numlines;
/* FIXME!!! smbd should check to see if the driver is installed before
trying to add a printer like this --jerry */
- if (*lp_addprinter_cmd(talloc_tos()) ) {
+ if (*lp_addprinter_command(talloc_tos()) ) {
char *raddr;
raddr = tsocket_address_inet_addr_string(p->remote_address,