summaryrefslogtreecommitdiff
path: root/source3/smbd/file_access.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-05-02 17:22:10 -0700
committerJeremy Allison <jra@samba.org>2008-05-02 17:22:10 -0700
commitb430b382202858a6c52c1cacbb91910b2dd7e16c (patch)
tree4d2e2900d03a5abde1e7dd24b5c23404972a3712 /source3/smbd/file_access.c
parent85dc0ad7beb50dbab6d98a22b114f20537425268 (diff)
downloadsamba-b430b382202858a6c52c1cacbb91910b2dd7e16c.tar.gz
samba-b430b382202858a6c52c1cacbb91910b2dd7e16c.tar.bz2
samba-b430b382202858a6c52c1cacbb91910b2dd7e16c.zip
Remove the "stat_open()" function, flag, and all associated code. It was only
being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable and this is more properly done using the functions in smbd/file_access.c. Preparing to do NT access checks on all file access. Jeremy. (This used to be commit 6bfb06ad95963ae2acb67c4694a98282d3b29faa)
Diffstat (limited to 'source3/smbd/file_access.c')
-rw-r--r--source3/smbd/file_access.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c
index 4c07bc5a61..71f3291b9b 100644
--- a/source3/smbd/file_access.c
+++ b/source3/smbd/file_access.c
@@ -25,7 +25,7 @@ extern struct current_user current_user;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_ACLS
-static bool can_access_file_acl(struct connection_struct *conn,
+bool can_access_file_acl(struct connection_struct *conn,
const char * fname, SMB_STRUCT_STAT *psbuf,
uint32_t access_mask)
{
@@ -125,7 +125,7 @@ bool can_delete_file_in_directory(connection_struct *conn, const char *fname)
Note this doesn't take into account share write permissions.
****************************************************************************/
-bool can_access_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask)
+bool can_access_file_data(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask)
{
if (!(access_mask & (FILE_READ_DATA|FILE_WRITE_DATA))) {
return False;
@@ -134,7 +134,7 @@ bool can_access_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT
/* some fast paths first */
- DEBUG(10,("can_access_file: requesting 0x%x on file %s\n",
+ DEBUG(10,("can_access_file_data: requesting 0x%x on file %s\n",
(unsigned int)access_mask, fname ));
if (current_user.ut.uid == 0 || conn->admin_user) {
@@ -180,7 +180,7 @@ bool can_access_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT
bool can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf)
{
- return can_access_file(conn, fname, psbuf, FILE_WRITE_DATA);
+ return can_access_file_data(conn, fname, psbuf, FILE_WRITE_DATA);
}
/****************************************************************************