Skip to content

Commit

Permalink
posix_acls: Make try_chown and unpack_nt_owners static
Browse files Browse the repository at this point in the history
These functions are now only called from check_chown in posix_acls.c

Signed-off-by: Christof Schmitt <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
  • Loading branch information
chs authored and vlendec committed Dec 2, 2022
1 parent bfb4b36 commit 154a061
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions source3/smbd/posix_acls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion source3/smbd/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 154a061

Please sign in to comment.