summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-10 13:00:25 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-11 21:23:08 +0200
commitce66d4e4a885add09edfa8e6d5eab0f3b5d63081 (patch)
tree5877456e65186670e3e69c41d22a0bb8ff236901 /source3/smbd
parent18f967a24881aa899b39f7676fc70a7f7aaca07b (diff)
downloadsamba-ce66d4e4a885add09edfa8e6d5eab0f3b5d63081.tar.gz
samba-ce66d4e4a885add09edfa8e6d5eab0f3b5d63081.tar.bz2
samba-ce66d4e4a885add09edfa8e6d5eab0f3b5d63081.zip
s3:smbd: make smbd_calculate_access_mask() non-static
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/globals.h5
-rw-r--r--source3/smbd/open.c29
2 files changed, 20 insertions, 14 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index b684a9231b..911a86a15f 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -224,6 +224,11 @@ bool smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
int *_last_entry_off,
struct ea_list *name_list);
+NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
+ const struct smb_filename *smb_fname,
+ bool file_existed,
+ uint32_t access_mask,
+ uint32_t *access_mask_out);
NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
const struct smb_filename *smb_fname,
uint32_t access_mask,
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index bbab9f14ef..96faf0f4b7 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1523,11 +1523,11 @@ static void schedule_defer_open(struct share_mode_lock *lck,
Work out what access_mask to use from what the client sent us.
****************************************************************************/
-static NTSTATUS calculate_access_mask(connection_struct *conn,
- const struct smb_filename *smb_fname,
- bool file_existed,
- uint32_t access_mask,
- uint32_t *access_mask_out)
+NTSTATUS smbd_calculate_access_mask(connection_struct *conn,
+ const struct smb_filename *smb_fname,
+ bool file_existed,
+ uint32_t access_mask,
+ uint32_t *access_mask_out)
{
NTSTATUS status;
@@ -1550,8 +1550,8 @@ static NTSTATUS calculate_access_mask(connection_struct *conn,
SECINFO_DACL),&sd);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("calculate_access_mask: Could not get acl "
- "on file %s: %s\n",
+ DEBUG(10,("smbd_calculate_access_mask: "
+ "Could not get acl on file %s: %s\n",
smb_fname_str_dbg(smb_fname),
nt_errstr(status)));
return NT_STATUS_ACCESS_DENIED;
@@ -1566,8 +1566,9 @@ static NTSTATUS calculate_access_mask(connection_struct *conn,
TALLOC_FREE(sd);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("calculate_access_mask: Access denied on "
- "file %s: when calculating maximum access\n",
+ DEBUG(10, ("smbd_calculate_access_mask: "
+ "Access denied on file %s: "
+ "when calculating maximum access\n",
smb_fname_str_dbg(smb_fname)));
return NT_STATUS_ACCESS_DENIED;
}
@@ -1899,11 +1900,11 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
}
}
- status = calculate_access_mask(conn, smb_fname, file_existed,
+ status = smbd_calculate_access_mask(conn, smb_fname, file_existed,
access_mask,
&access_mask);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("open_file_ntcreate: calculate_access_mask "
+ DEBUG(10, ("open_file_ntcreate: smbd_calculate_access_mask "
"on file %s returned %s\n",
smb_fname_str_dbg(smb_fname), nt_errstr(status)));
return status;
@@ -2743,10 +2744,10 @@ static NTSTATUS open_directory(connection_struct *conn,
return NT_STATUS_NOT_A_DIRECTORY;
}
- status = calculate_access_mask(conn, smb_dname, dir_existed,
- access_mask, &access_mask);
+ status = smbd_calculate_access_mask(conn, smb_dname, dir_existed,
+ access_mask, &access_mask);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("open_directory: calculate_access_mask "
+ DEBUG(10, ("open_directory: smbd_calculate_access_mask "
"on file %s returned %s\n",
smb_fname_str_dbg(smb_dname),
nt_errstr(status)));