From: Michael Adam Date: Tue, 17 Jun 2008 22:02:28 +0000 (+0200) Subject: smbd/dir.c: remove unneeded stat buf parameter from user_can_read_file() X-Git-Tag: samba-3.3.0pre1~858 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c349f773a52e3de693d3bb79f5060c9f1e01e41;p=thirdparty%2Fsamba.git smbd/dir.c: remove unneeded stat buf parameter from user_can_read_file() This is not needed anymore since user_can_access_file_acl() ist used. Michael --- diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 2d9e7e75275..74cd63ddda1 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -921,7 +921,7 @@ bool get_dir_entry(TALLOC_CTX *ctx, use it for anything security sensitive. ********************************************************************/ -static bool user_can_read_file(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst) +static bool user_can_read_file(connection_struct *conn, char *name) { /* * If user is a member of the Admin group @@ -932,8 +932,6 @@ static bool user_can_read_file(connection_struct *conn, char *name, SMB_STRUCT_S return True; } - SMB_ASSERT(VALID_STAT(*pst)); - return can_access_file_acl(conn, name, FILE_READ_DATA); } @@ -1037,7 +1035,7 @@ bool is_visible_file(connection_struct *conn, const char *dir_path, const char * } /* Honour _hide unreadable_ option */ - if (hide_unreadable && !user_can_read_file(conn, entry, pst)) { + if (hide_unreadable && !user_can_read_file(conn, entry)) { DEBUG(10,("is_visible_file: file %s is unreadable.\n", entry )); SAFE_FREE(entry); return False;