]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
printing: Inline oneliners used just once
authorVolker Lendecke <vl@samba.org>
Sun, 4 Jan 2026 12:05:49 +0000 (13:05 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 20 Jan 2026 11:53:34 +0000 (11:53 +0000)
This patch and the 2 previous ones could be squashed, but it's the way those
unfolded :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/include/nt_printing.h
source3/printing/nt_printing.c

index b89c3bd60e52b95367c0a41a157117fe0ceaad55..15d23d381d07142d67c73631591e8400147b0aac 100644 (file)
@@ -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);
index 8937d7725959a2637566a39e1b57ab05e516b80f..092712250c6e3b048aa01ef8b1e65045dd075c86 100644 (file)
@@ -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 */