From: Volker Lendecke Date: Tue, 4 Feb 2020 13:28:16 +0000 (+0200) Subject: smbd: Make unix_perms_from_wire() public X-Git-Tag: ldb-2.1.1~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4776456ce4e99c26e5aecd2519ed69b984eca505;p=thirdparty%2Fsamba.git smbd: Make unix_perms_from_wire() public Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index d325f7d56e0..02a8c9873c3 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1197,6 +1197,19 @@ void reply_findnclose(struct smb_request *req); void reply_trans2(struct smb_request *req); void reply_transs2(struct smb_request *req); +enum perm_type { + PERM_NEW_FILE, + PERM_NEW_DIR, + PERM_EXISTING_FILE, + PERM_EXISTING_DIR +}; + +NTSTATUS unix_perms_from_wire(connection_struct *conn, + const SMB_STRUCT_STAT *psbuf, + uint32_t perms, + enum perm_type ptype, + mode_t *ret_perms); + /* The following definitions come from smbd/uid.c */ bool change_to_guest(void); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 2cf669f4b4d..d263c8834f7 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1583,13 +1583,11 @@ static uint32_t unix_filetype(mode_t mode) Map wire perms onto standard UNIX permissions. Obey share restrictions. ****************************************************************************/ -enum perm_type { PERM_NEW_FILE, PERM_NEW_DIR, PERM_EXISTING_FILE, PERM_EXISTING_DIR}; - -static NTSTATUS unix_perms_from_wire( connection_struct *conn, - const SMB_STRUCT_STAT *psbuf, - uint32_t perms, - enum perm_type ptype, - mode_t *ret_perms) +NTSTATUS unix_perms_from_wire(connection_struct *conn, + const SMB_STRUCT_STAT *psbuf, + uint32_t perms, + enum perm_type ptype, + mode_t *ret_perms) { mode_t ret = 0;