summaryrefslogtreecommitdiff
path: root/source3/smbd/file_access.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-09-13 16:11:31 -0700
committerJeremy Allison <jra@samba.org>2012-09-14 22:54:29 +0200
commitaa0a7cf51a8b4ed2f188c2c38c4d5d47688de9ad (patch)
tree406b0b33ee5ba049988501e4451221943a2ac36d /source3/smbd/file_access.c
parent1e34d584393c09a43bf0226bebc0ae0f675e57ae (diff)
downloadsamba-aa0a7cf51a8b4ed2f188c2c38c4d5d47688de9ad.tar.gz
samba-aa0a7cf51a8b4ed2f188c2c38c4d5d47688de9ad.tar.bz2
samba-aa0a7cf51a8b4ed2f188c2c38c4d5d47688de9ad.zip
Add bool use_privs parameter to smbd_check_access_rights()
If this is set we should use it in preference to blindly assuming root can do anything. Currently set to 'false' in (most) callers.
Diffstat (limited to 'source3/smbd/file_access.c')
-rw-r--r--source3/smbd/file_access.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c
index 6ced6a6255..015679deb0 100644
--- a/source3/smbd/file_access.c
+++ b/source3/smbd/file_access.c
@@ -124,6 +124,7 @@ bool can_delete_file_in_directory(connection_struct *conn,
ret = NT_STATUS_IS_OK(smbd_check_access_rights(conn,
smb_fname_parent,
+ false,
FILE_DELETE_CHILD));
out:
TALLOC_FREE(dname);
@@ -140,6 +141,7 @@ bool can_write_to_file(connection_struct *conn,
{
return NT_STATUS_IS_OK(smbd_check_access_rights(conn,
smb_fname,
+ false,
FILE_WRITE_DATA));
}