From e68f6adca9494166bf7c24c358ea1af718970b0d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 7 Feb 2011 20:46:36 -0800 Subject: If possible (O_DIRECTORY exists) open an fd for a directory open. Start of the move towards handle-based code for directory access. Currently makes fstat/fchown code work for directories rather than falling back to pathnames. Jeremy. Autobuild-User: Jeremy Allison Autobuild-Date: Tue Feb 8 06:34:41 CET 2011 on sn-devel-104 --- source3/smbd/vfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/smbd/vfs.c') diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 9e44d02e15c..32be699ef86 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1105,7 +1105,7 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp) { int ret; - if(fsp->is_directory || fsp->fh->fd == -1) { + if(fsp->fh->fd == -1) { if (fsp->posix_open) { ret = SMB_VFS_LSTAT(fsp->conn, fsp->fsp_name); } else { @@ -1443,7 +1443,7 @@ NTSTATUS vfs_chown_fsp(files_struct *fsp, uid_t uid, gid_t gid) { int ret; - if (!fsp->is_directory && fsp->fh->fd != -1) { + if (fsp->fh->fd != -1) { /* Try fchown. */ ret = SMB_VFS_FCHOWN(fsp, uid, gid); if (ret == 0) { -- cgit