From: Volker Lendecke Date: Sun, 4 Jan 2026 12:05:49 +0000 (+0100) Subject: printing: Inline oneliners used just once X-Git-Tag: tdb-1.4.15~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47c523afb1ae3fe049f3d918930fa8edbdb715f9;p=thirdparty%2Fsamba.git printing: Inline oneliners used just once This patch and the 2 previous ones could be squashed, but it's the way those unfolded :-) Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index b89c3bd60e5..15d23d381d0 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -173,10 +173,6 @@ WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx, uint32_t flags, const char **driver_directory); -void map_printer_permissions(struct security_descriptor *sd); - -void map_job_permissions(struct security_descriptor *sd); - bool print_time_access_check(const struct auth_session_info *server_info, struct messaging_context *msg_ctx, const char *servicename); diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 8937d772595..092712250c6 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2185,21 +2185,6 @@ jfm: I should use this comment for the text file to explain */ -/* Convert generic access rights to printer object specific access rights. - It turns out that NT4 security descriptors use generic access rights and - NT5 the object specific ones. */ - -void map_printer_permissions(struct security_descriptor *sd) -{ - security_acl_map_generic(sd->dacl, &printer_generic_mapping); -} - -void map_job_permissions(struct security_descriptor *sd) -{ - security_acl_map_generic(sd->dacl, &job_generic_mapping); -} - - /**************************************************************************** Check a user has permissions to perform the given operation. We use the permission constants defined in include/rpc_spoolss.h to check the various @@ -2289,9 +2274,10 @@ WERROR print_access_check(const struct auth_session_info *session_info, return ntstatus_to_werror(status); } - map_job_permissions(secdesc); + security_acl_map_generic(secdesc->dacl, &job_generic_mapping); } else { - map_printer_permissions(secdesc); + security_acl_map_generic(secdesc->dacl, + &printer_generic_mapping); } /* Check access */