summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/rpc_spoolss.h5
-rw-r--r--source3/printing/nt_printing.c12
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
-rw-r--r--source3/smbd/server.c2
-rw-r--r--source3/utils/net_rpc_printer.c20
5 files changed, 19 insertions, 24 deletions
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index a26a315224..798bbf922c 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -428,11 +428,6 @@ typedef struct printer_info_6
}
PRINTER_INFO_6;
-#define SPOOL_DS_PUBLISH 1
-#define SPOOL_DS_UPDATE 2
-#define SPOOL_DS_UNPUBLISH 4
-#define SPOOL_DS_PENDING 0x80000000
-
typedef struct printer_info_7
{
UNISTR guid; /* text form of printer guid */
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index b254ce0b95..d8658e9280 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3425,8 +3425,8 @@ WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
goto done;
switch (action) {
- case SPOOL_DS_PUBLISH:
- case SPOOL_DS_UPDATE:
+ case DSPRINT_PUBLISH:
+ case DSPRINT_UPDATE:
/* set the DsSpooler info and attributes */
if (!(map_nt_printer_info2_to_dsspooler(printer->info_2))) {
win_rc = WERR_NOMEM;
@@ -3435,7 +3435,7 @@ WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
printer->info_2->attributes |= PRINTER_ATTRIBUTE_PUBLISHED;
break;
- case SPOOL_DS_UNPUBLISH:
+ case DSPRINT_UNPUBLISH:
printer->info_2->attributes ^= PRINTER_ATTRIBUTE_PUBLISHED;
break;
default:
@@ -3469,11 +3469,11 @@ WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action)
}
switch (action) {
- case SPOOL_DS_PUBLISH:
- case SPOOL_DS_UPDATE:
+ case DSPRINT_PUBLISH:
+ case DSPRINT_UPDATE:
win_rc = nt_printer_publish_ads(ads, printer);
break;
- case SPOOL_DS_UNPUBLISH:
+ case DSPRINT_UNPUBLISH:
win_rc = nt_printer_unpublish_ads(ads, printer);
break;
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 7a580517d3..814f406e87 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4353,10 +4353,10 @@ static bool construct_printer_info_7(Printer_entry *print_hnd, PRINTER_INFO_7 *p
strupper_m(guid_str);
init_unistr(&printer->guid, guid_str);
SAFE_FREE(guid_str);
- printer->action = SPOOL_DS_PUBLISH;
+ printer->action = DSPRINT_PUBLISH;
} else {
init_unistr(&printer->guid, "");
- printer->action = SPOOL_DS_UNPUBLISH;
+ printer->action = DSPRINT_UNPUBLISH;
}
return True;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 346e8973de..538e04938e 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -730,7 +730,7 @@ void reload_printers(void)
DEBUG(3, ("removing stale printer %s\n", pname));
if (is_printer_published(NULL, snum, NULL))
- nt_printer_publish(NULL, snum, SPOOL_DS_UNPUBLISH);
+ nt_printer_publish(NULL, snum, DSPRINT_UNPUBLISH);
del_a_printer(pname);
lp_killservice(snum);
}
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 99012ddf2d..8116764d9b 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1313,13 +1313,13 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_
/* check action and set string */
switch (action) {
- case SPOOL_DS_PUBLISH:
+ case DSPRINT_PUBLISH:
action_str = "published";
break;
- case SPOOL_DS_UPDATE:
+ case DSPRINT_UPDATE:
action_str = "updated";
break;
- case SPOOL_DS_UNPUBLISH:
+ case DSPRINT_UNPUBLISH:
action_str = "unpublished";
break;
default:
@@ -1369,7 +1369,7 @@ NTSTATUS rpc_printer_publish_publish_internals(struct net_context *c,
int argc,
const char **argv)
{
- return rpc_printer_publish_internals_args(pipe_hnd, mem_ctx, argc, argv, SPOOL_DS_PUBLISH);
+ return rpc_printer_publish_internals_args(pipe_hnd, mem_ctx, argc, argv, DSPRINT_PUBLISH);
}
NTSTATUS rpc_printer_publish_unpublish_internals(struct net_context *c,
@@ -1381,7 +1381,7 @@ NTSTATUS rpc_printer_publish_unpublish_internals(struct net_context *c,
int argc,
const char **argv)
{
- return rpc_printer_publish_internals_args(pipe_hnd, mem_ctx, argc, argv, SPOOL_DS_UNPUBLISH);
+ return rpc_printer_publish_internals_args(pipe_hnd, mem_ctx, argc, argv, DSPRINT_UNPUBLISH);
}
NTSTATUS rpc_printer_publish_update_internals(struct net_context *c,
@@ -1393,7 +1393,7 @@ NTSTATUS rpc_printer_publish_update_internals(struct net_context *c,
int argc,
const char **argv)
{
- return rpc_printer_publish_internals_args(pipe_hnd, mem_ctx, argc, argv, SPOOL_DS_UPDATE);
+ return rpc_printer_publish_internals_args(pipe_hnd, mem_ctx, argc, argv, DSPRINT_UPDATE);
}
/**
@@ -1466,16 +1466,16 @@ NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
}
state = info.info7.action;
switch (state) {
- case SPOOL_DS_PUBLISH:
+ case DSPRINT_PUBLISH:
printf("printer [%s] is published", sharename);
if (c->opt_verbose)
printf(", guid: %s", info.info7.guid);
printf("\n");
break;
- case SPOOL_DS_UNPUBLISH:
+ case DSPRINT_UNPUBLISH:
printf("printer [%s] is unpublished\n", sharename);
break;
- case SPOOL_DS_UPDATE:
+ case DSPRINT_UPDATE:
printf("printer [%s] is currently updating\n", sharename);
break;
default:
@@ -2348,7 +2348,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
if (!net_spoolss_getprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, 7, &info_dst_publish))
goto done;
- info_dst_publish.info7.action = SPOOL_DS_PUBLISH;
+ info_dst_publish.info7.action = DSPRINT_PUBLISH;
/* ignore false from setprinter due to WERR_IO_PENDING */
net_spoolss_setprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, 7, &info_dst_publish);