From: Christof Schmitt Date: Tue, 12 Jul 2022 23:35:37 +0000 (-0700) Subject: posix_acls: Make try_chown and unpack_nt_owners static X-Git-Tag: talloc-2.4.0~421 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=154a0613f89a84becd6461e36d61a80509b9a9ef;p=thirdparty%2Fsamba.git posix_acls: Make try_chown and unpack_nt_owners static These functions are now only called from check_chown in posix_acls.c Signed-off-by: Christof Schmitt Reviewed-by: Volker Lendecke --- diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index a01177bc4ed..15c7f14062e 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -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; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 04cab7f10ef..9335ae476f7 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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,