diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/param/loadparm.c | 12 | ||||
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index f944b2a58d..9edbfc5902 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -3199,6 +3199,7 @@ bool lp_guest_ok(int ); bool lp_guest_only(int ); bool lp_administrative_share(int ); bool lp_print_ok(int ); +bool lp_print_notify_backchannel(int ); bool lp_map_hidden(int ); bool lp_map_archive(int ); bool lp_store_dos_attributes(int ); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 3314ad26ca..f9b8f70670 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -474,6 +474,7 @@ struct service { bool bAdministrative_share; bool bGuest_ok; bool bPrint_ok; + bool bPrintNotifyBackchannel; bool bMap_system; bool bMap_hidden; bool bMap_archive; @@ -618,6 +619,7 @@ static struct service sDefault = { False, /* bAdministrative_share */ False, /* bGuest_ok */ False, /* bPrint_ok */ + True, /* bPrintNotifyBackchannel */ False, /* bMap_system */ False, /* bMap_hidden */ True, /* bMap_archive */ @@ -2713,6 +2715,15 @@ static struct parm_struct parm_table[] = { .flags = FLAG_ADVANCED | FLAG_PRINT, }, { + .label = "print notify backchannel", + .type = P_BOOL, + .p_class = P_LOCAL, + .ptr = &sDefault.bPrintNotifyBackchannel, + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED, + }, + { .label = "print ok", .type = P_BOOL, .p_class = P_LOCAL, @@ -5918,6 +5929,7 @@ FN_LOCAL_BOOL(lp_guest_ok, bGuest_ok) FN_LOCAL_BOOL(lp_guest_only, bGuest_only) FN_LOCAL_BOOL(lp_administrative_share, bAdministrative_share) FN_LOCAL_BOOL(lp_print_ok, bPrint_ok) +FN_LOCAL_BOOL(lp_print_notify_backchannel, bPrintNotifyBackchannel) FN_LOCAL_BOOL(lp_map_hidden, bMap_hidden) FN_LOCAL_BOOL(lp_map_archive, bMap_archive) FN_LOCAL_BOOL(lp_store_dos_attributes, bStoreDosAttributes) diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 3026a889e6..030324c085 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -2736,6 +2736,12 @@ WERROR _spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct pipes_struct *p, DEBUG(10,("_spoolss_RemoteFindFirstPrinterChangeNotifyEx: " "client_address is %s\n", p->client_id->addr)); + if (!lp_print_notify_backchannel(snum)) { + DEBUG(10, ("_spoolss_RemoteFindFirstPrinterChangeNotifyEx: " + "backchannel disabled\n")); + return WERR_SERVER_UNAVAILABLE; + } + if (!interpret_string_addr(&client_ss, p->client_id->addr, AI_NUMERICHOST)) { return WERR_SERVER_UNAVAILABLE; |