summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-19 18:03:43 +0200
committerStefan Metzmacher <metze@samba.org>2009-08-19 19:28:24 +0200
commitb70ae644edf0f28437aab61c68c755028094f79b (patch)
tree2fcd571b7e31c89f6b6a77b5070cd738ae385eac /source3/smbd
parentf1434665048a7c16c702da03c32e6174b4bff5bc (diff)
downloadsamba-b70ae644edf0f28437aab61c68c755028094f79b.tar.gz
samba-b70ae644edf0f28437aab61c68c755028094f79b.tar.bz2
samba-b70ae644edf0f28437aab61c68c755028094f79b.zip
s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2
metze
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/globals.h5
-rw-r--r--source3/smbd/open.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 4fa85a9fdb..fd92c22e72 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -234,6 +234,11 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
uint32_t *_mode,
long *_prev_offset);
+NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
+ const struct smb_filename *smb_fname,
+ uint32_t access_mask,
+ uint32_t *access_granted);
+
void smbd_notify_cancel_by_smbreq(struct smbd_server_connection *sconn,
const struct smb_request *smbreq);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 63982341ac..045635535f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -64,7 +64,7 @@ NTSTATUS smb1_file_se_access_check(const struct security_descriptor *sd,
Check if we have open rights.
****************************************************************************/
-static NTSTATUS check_open_rights(struct connection_struct *conn,
+NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
const struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t *access_granted)
@@ -90,7 +90,7 @@ static NTSTATUS check_open_rights(struct connection_struct *conn,
DACL_SECURITY_INFORMATION),&sd);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("check_open_rights: Could not get acl "
+ DEBUG(10, ("smbd_check_open_rights: Could not get acl "
"on %s: %s\n",
smb_fname_str_dbg(smb_fname),
nt_errstr(status)));
@@ -105,7 +105,7 @@ static NTSTATUS check_open_rights(struct connection_struct *conn,
TALLOC_FREE(sd);
- DEBUG(10,("check_open_rights: file %s requesting "
+ DEBUG(10,("smbd_check_open_rights: file %s requesting "
"0x%x returning 0x%x (%s)\n",
smb_fname_str_dbg(smb_fname),
(unsigned int)access_mask,
@@ -477,7 +477,7 @@ static NTSTATUS open_file(files_struct *fsp,
if (file_existed) {
uint32_t access_granted = 0;
- status = check_open_rights(conn,
+ status = smbd_check_open_rights(conn,
smb_fname,
access_mask,
&access_granted);
@@ -547,7 +547,7 @@ static NTSTATUS open_file(files_struct *fsp,
smb_fname)));
} else {
DEBUG(10,("open_file: "
- "check_open_rights on file "
+ "smbd_check_open_rights on file "
"%s returned %s\n",
smb_fname_str_dbg(smb_fname),
nt_errstr(status) ));
@@ -2545,8 +2545,8 @@ static NTSTATUS open_directory(connection_struct *conn,
if (info == FILE_WAS_OPENED) {
uint32_t access_granted = 0;
- status = check_open_rights(conn, smb_dname, access_mask,
- &access_granted);
+ status = smbd_check_open_rights(conn, smb_dname, access_mask,
+ &access_granted);
/* Were we trying to do a directory open
* for delete and didn't get DELETE
@@ -2567,7 +2567,7 @@ static NTSTATUS open_directory(connection_struct *conn,
}
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("open_directory: check_open_rights on "
+ DEBUG(10, ("open_directory: smbd_check_open_rights on "
"file %s failed with %s\n",
smb_fname_str_dbg(smb_dname),
nt_errstr(status)));