posix_acls: Make try_chown and unpack_nt_owners static
authorChristof Schmitt <cs@samba.org>
Tue, 12 Jul 2022 23:35:37 +0000 (16:35 -0700)
committerVolker Lendecke <vl@samba.org>
Fri, 2 Dec 2022 07:00:31 +0000 (07:00 +0000)
These functions are now only called from check_chown in posix_acls.c

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/posix_acls.c
source3/smbd/proto.h

index a01177bc4edc377606f09263a4c9742e34d4daf6..15c7f14062e21e239daa6576ea189d4ad24ada0b 100644 (file)
@@ -1081,10 +1081,10 @@ static mode_t map_nt_perms( uint32_t *mask, int type)
  Unpack a struct security_descriptor into a UNIX owner and group.
 ****************************************************************************/
 
-NTSTATUS unpack_nt_owners(struct connection_struct *conn,
-                       uid_t *puser, gid_t *pgrp,
-                       uint32_t security_info_sent, const struct
-                       security_descriptor *psd)
+static NTSTATUS unpack_nt_owners(struct connection_struct *conn,
+                                uid_t *puser, gid_t *pgrp,
+                                uint32_t security_info_sent,
+                                const struct security_descriptor *psd)
 {
        *puser = (uid_t)-1;
        *pgrp = (gid_t)-1;
@@ -3388,7 +3388,7 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
      then allow chown to the currently authenticated user.
 ****************************************************************************/
 
-NTSTATUS try_chown(files_struct *fsp, uid_t uid, gid_t gid)
+static NTSTATUS try_chown(files_struct *fsp, uid_t uid, gid_t gid)
 {
        NTSTATUS status;
        int ret;
index 04cab7f10ef43446c42389cca92e15654a6926ac..9335ae476f7d3ab309fac07e4834878e0d257103 100644 (file)
@@ -819,7 +819,6 @@ uint32_t map_canon_ace_perms(int snum,
                                 enum security_ace_type *pacl_type,
                                 mode_t perms,
                                 bool directory_ace);
-NTSTATUS unpack_nt_owners(connection_struct *conn, uid_t *puser, gid_t *pgrp, uint32_t security_info_sent, const struct security_descriptor *psd);
 bool current_user_in_group(connection_struct *conn, gid_t gid);
 SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,