summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-08-28 17:01:17 +0000
committerSimo Sorce <idra@samba.org>2002-08-28 17:01:17 +0000
commit0a771a4f0be14070613d252717c1b4707270f5dc (patch)
tree415046c75ff1493b520e70133a26559f3fc92ecc /source3
parent05876f8bcd05959e36255f8f379be0e744cfa11e (diff)
downloadsamba-0a771a4f0be14070613d252717c1b4707270f5dc.tar.gz
samba-0a771a4f0be14070613d252717c1b4707270f5dc.tar.bz2
samba-0a771a4f0be14070613d252717c1b4707270f5dc.zip
fix file_is_special test, was wrong.
(This used to be commit 850d6573aedea6499b2f2fe9d1426083aebd9fd1)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/dir.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 0e68d89aa7..bdcb4b0461 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -775,9 +775,17 @@ static BOOL user_can_write_file(connection_struct *conn, char *name, SMB_STRUCT_
static BOOL file_is_special(connection_struct *conn, char *name, SMB_STRUCT_STAT *pst)
{
+ /*
+ * If user is a member of the Admin group
+ * we never hide files from them.
+ */
+
+ if (conn->admin_user)
+ return True;
+
/* If we can't stat it does not show it */
if (!VALID_STAT(*pst) && (vfs_stat(conn, name, pst) != 0))
- return False;
+ return True;
if (S_ISREG(pst->st_mode) || S_ISDIR(pst->st_mode) || S_ISLNK(pst->st_mode))
return False;
@@ -868,7 +876,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto)
if (entry || asprintf(&entry, "%s/%s/%s", conn->origpath, name, n) > 0) {
ret = file_is_special(conn, entry, &st);
}
- if (!ret) {
+ if (ret) {
SAFE_FREE(entry);
continue;
}