summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-11-03 11:49:22 -0700
committerJeremy Allison <jra@samba.org>2011-11-04 14:15:47 -0700
commit1fab17de94a38294918e9eab7d6f85b94d6db421 (patch)
treefe64e42c80dadf4a4f98b081c23eadb6a9d0a1d3
parentd433af92b9085e862b6fd3e3f4aea90051d9a2fc (diff)
downloadsamba-1fab17de94a38294918e9eab7d6f85b94d6db421.tar.gz
samba-1fab17de94a38294918e9eab7d6f85b94d6db421.tar.bz2
samba-1fab17de94a38294918e9eab7d6f85b94d6db421.zip
Revert "Change function signature of check_parent_access() to take char * instead of struct smb_filename."
This reverts commit a11c0a41a35aa2b1c14333552045a65e3e50df1e. Not needed.
-rw-r--r--source3/smbd/open.c12
-rw-r--r--source3/smbd/proto.h4
2 files changed, 6 insertions, 10 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index e8c24a0a68..42edddcaf9 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -201,8 +201,8 @@ static NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
}
}
-NTSTATUS check_parent_access(struct connection_struct *conn,
- const char *path,
+static NTSTATUS check_parent_access(struct connection_struct *conn,
+ struct smb_filename *smb_fname,
uint32_t access_mask,
char **pp_parent_dir)
{
@@ -212,7 +212,7 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
uint32_t access_granted = 0;
if (!parent_dirname(talloc_tos(),
- path,
+ smb_fname->base_name,
&parent_dir,
NULL)) {
return NT_STATUS_NO_MEMORY;
@@ -241,7 +241,7 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
"on directory %s for "
"path %s for mask 0x%x returned (0x%x) %s\n",
parent_dir,
- path,
+ smb_fname->base_name,
access_mask,
access_granted,
nt_errstr(status) ));
@@ -618,7 +618,7 @@ static NTSTATUS open_file(files_struct *fsp,
access_mask);
} else if (local_flags & O_CREAT){
status = check_parent_access(conn,
- smb_fname->base_name,
+ smb_fname,
SEC_DIR_ADD_FILE,
NULL);
} else {
@@ -2564,7 +2564,7 @@ static NTSTATUS mkdir_internal(connection_struct *conn,
}
status = check_parent_access(conn,
- smb_dname->base_name,
+ smb_dname,
access_mask,
&parent_dir);
if(!NT_STATUS_IS_OK(status)) {
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 351fc4992b..343b0b916e 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -585,10 +585,6 @@ NTSTATUS smb1_file_se_access_check(connection_struct *conn,
const struct security_token *token,
uint32_t access_desired,
uint32_t *access_granted);
-NTSTATUS check_parent_access(struct connection_struct *conn,
- const char *path,
- uint32_t access_mask,
- char **pp_parent_dir);
NTSTATUS fd_close(files_struct *fsp);
void change_file_owner_to_parent(connection_struct *conn,
const char *inherit_from_dir,