summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2012-02-07 11:41:54 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-02-09 16:39:04 +0100
commit5ec12732c3092d248a374ae7af155a409c7ee88e (patch)
tree6c9cd193ebcd0c7e6bc9225c6075010f656b388b /source3/printing
parent2464a7b0ddb556bed86a845c9400e26c4d7f584a (diff)
downloadsamba-5ec12732c3092d248a374ae7af155a409c7ee88e.tar.gz
samba-5ec12732c3092d248a374ae7af155a409c7ee88e.tar.bz2
samba-5ec12732c3092d248a374ae7af155a409c7ee88e.zip
s3-printing: Add new printers to registry.
This fixes bug #8554, #8612 and #8748. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Feb 9 16:39:04 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 7fc55c3098..92aa320b71 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1845,7 +1845,22 @@ void nt_printer_remove(TALLOC_CTX *mem_ctx,
result = winreg_delete_printer_key_internal(mem_ctx, session_info, msg_ctx,
printer, "");
if (!W_ERROR_IS_OK(result)) {
- DEBUG(0, ("nt_printer_remove: failed to remove printer %s",
- printer));
+ DEBUG(0, ("nt_printer_remove: failed to remove printer %s: "
+ "%s\n", printer, win_errstr(result)));
+ }
+}
+
+void nt_printer_add(TALLOC_CTX *mem_ctx,
+ const struct auth_session_info *session_info,
+ struct messaging_context *msg_ctx,
+ const char *printer)
+{
+ WERROR result;
+
+ result = winreg_create_printer_internal(mem_ctx, session_info, msg_ctx,
+ printer);
+ if (!W_ERROR_IS_OK(result)) {
+ DEBUG(0, ("nt_printer_add: failed to add printer %s: %s\n",
+ printer, win_errstr(result)));
}
}