summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-03-13 14:34:35 +0100
committerJeremy Allison <jra@samba.org>2021-03-16 17:09:31 +0000
commit46cc9b512200fcd435be313e915c1b1fc0deb428 (patch)
tree62ee756bf8bd3bc85b5283be2204e8f2c4aa44de /source3/printing/printing.c
parente09f29eedd718f4e02fd0de55e69af877713b46d (diff)
downloadsamba-46cc9b512200fcd435be313e915c1b1fc0deb428.tar.gz
printing: Introduce printer_list_printername_exists()
Replace pcap_printername_ok(). Slightly different semantics: If the printer list db has a corrupted record, this is not detected. Why this patch? pcap_printername_ok() is a simple wrapper around the tdb accessing function, and this reduces a dependency on pcap.c Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 70a891b89be..15a8bc7846c 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -2731,7 +2731,8 @@ static WERROR print_job_checks(const struct auth_session_info *server_info,
}
/* for autoloaded printers, check that the printcap entry still exists */
- if (lp_autoloaded(snum) && !pcap_printername_ok(sharename)) {
+ if (lp_autoloaded(snum) &&
+ !printer_list_printername_exists(sharename)) {
DEBUG(3, ("print_job_checks: printer name %s check failed.\n",
sharename));
return WERR_ACCESS_DENIED;