summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-05s3:smbd fix a compile warning on AIX 5.3Christian Ambach1-1/+1
use the correct alias instead of FD directly Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Tue Jul 5 19:51:42 CEST 2011 on sn-devel-104
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-01Remove the char * argument from the SMB_VFS_GETWD() call. Now alwaysJeremy Allison1-8/+9
returns malloc'ed memory. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jun 1 04:06:12 CEST 2011 on sn-devel-104
2011-05-31s3: Remove SHADOW_COPY_DATA typedefVolker Lendecke1-1/+1
2011-05-05Fix many const compiler warnings.Jeremy Allison1-1/+1
2011-04-26s3: Fix a typoVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Apr 26 13:31:08 CEST 2011 on sn-devel-104
2011-04-25No longer need to call SMB_VFS_LSTAT - check name hasn't changed above is ↵Jeremy Allison1-23/+0
sufficient. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Apr 25 23:35:37 CEST 2011 on sn-devel-104
2011-04-25Correctly detect and deny symlinks anywhere in a path (not just the last ↵Jeremy Allison1-27/+60
component) if "follow symlinks = no".
2011-04-22Cosmetic. Fix bad indentation.Jeremy Allison1-18/+18
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Apr 22 03:16:43 CEST 2011 on sn-devel-104
2011-04-21Remove duplicate code - move to parent_dirname() as a common function.Jeremy Allison1-25/+14
2011-04-21s3-vfs: rename open function to open_fn.Günther Deschner1-5/+2
This should finally fix the AIX build and allow to remove AIX specific ifdefs. Guenther Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Apr 21 02:01:20 CEST 2011 on sn-devel-104
2011-04-20s3-smbd: fix the AIX 5.3 build.Günther Deschner1-0/+3
(AIX defines open to be open64) Guenther
2011-04-15Ensure vfs_chown_fsp() is safe against races.Jeremy Allison1-5/+71
2011-03-30s3: only include ntioctl.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-build: only include transfer_file.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2011-03-02s3: Pass smb_filename through the set_offline vfs opVolker Lendecke1-2/+2
2011-03-02s3: Pass smb_filename through the is_offline vfs opVolker Lendecke1-2/+3
2011-02-09Add fdopendir to the VFS. We will use this to reuse a directory fd already ↵Jeremy Allison1-0/+9
open by NtCreateX. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104
2011-02-08If possible (O_DIRECTORY exists) open an fd for a directory open.Jeremy Allison1-2/+2
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 <jra@samba.org> Autobuild-Date: Tue Feb 8 06:34:41 CET 2011 on sn-devel-104
2011-02-05Fix try_chown code. Use new vfs_chown_fsp() which always trys fd first.Jeremy Allison1-0/+30
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 03:33:59 CET 2011 on sn-devel-104
2010-12-21Added call out to a Linux-compatible fallocate() when we need to extend a fileJeremy Allison1-1/+12
allocation extent without changing end-of-file size. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 21 02:41:24 CET 2010 on sn-devel-104
2010-12-19s3: re-add some debugs to check_reduced_nameVolker Lendecke1-0/+2
2010-12-19s3: Fix some typosVolker Lendecke1-1/+1
2010-12-18Rename vfs operation posix_fallocate to just fallocate and add the ↵Jeremy Allison1-9/+12
vfs_fallocate_mode parameter. It turns out we need the fallocate operations to be able to both allocate and extend filesize, and to allocate and not extend filesize, and posix_fallocate can only do the former. So by defining the vfs op as posix_fallocate we lose the opportunity to use any underlying syscalls (like Linux fallocate) that can do the latter as well. We don't currently use the non-extending filesize call, but now I've changed the vfs op definition we can in the future. For the moment simply map the fallocate op onto posix_fallocate for the VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the VFS_FALLOCATE_KEEP_SIZE case. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
2010-12-14Ensure we use vfs_fsp_stat(), not VFS_STAT directly, and store into ↵Jeremy Allison1-19/+20
fsp->fsp_name->st instead of a SMB_STRUCT_STAT on the stack. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 14 05:05:50 CET 2010 on sn-devel-104
2010-12-03Merge the two conflicting allocation codes into one function, ↵Jeremy Allison1-34/+45
vfs_slow_fallocate() and use that from both the truncate and fill_sparse functions. Jeremy.
2010-12-02Move posix_fallocate into the VFS where it belongs.Jeremy Allison1-2/+11
Jeremy.
2010-12-02Fix bug #7835 - vfs_fill_sparse() doesn't use posix_fallocate when strict ↵Jeremy Allison1-2/+30
allocate is on Tries posix_fallocate() and then falls back to old code. Jeremy.
2010-11-20Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_defaultJeremy Allison1-42/+10
module, change the signature of VFS_REALPATH to always return a malloc'ed string. Needed to make some privileges work I plan on doing shortly easier to code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Nov 20 02:15:50 CET 2010 on sn-devel-104
2010-09-13Fix bug 7409 - Thousands of reduce_name: couldn't get realpath.Jeremy Allison1-1/+1
Don't log this at level 1 - every EACCES will generate one. Thanks to muehlfeld@medizinische-genetik.de for pointing this out. Jeremy.
2010-08-26s3-build: only include memcache.h where needed.Günther Deschner1-0/+1
Guenther
2010-08-16s3: Remove smbd_server_fd from vfs_pwrite_dataVolker Lendecke1-1/+1
2010-08-16s3: Remove smbd_server_fd from vfs_write_dataVolker Lendecke1-1/+1
2010-07-13Revert "Remove the global char *LastDir."Jeremy Allison1-1/+20
Volker pointed out I'd missed the "last directory" cache part of this code. Return us to caching the directory we're in (reduces sys call load). Mea maxima culpa. Jeremy. This reverts commit 2f30aea3324f32f9b8555e961256fc1280da2871.
2010-03-28s3: Fix typos in a debug message in vfs_init_customVolker Lendecke1-1/+2
2010-03-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison1-1/+3
Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
2010-02-11Remove lp_safe_widelinks() -> convert to just lp_widelinks. Suggestion from ↵Jeremy Allison1-1/+1
Volker. Create widelinks_warning(int snum) to cover the message needed in make_connection. Jeremy.
2010-02-11Introduce lp_safe_widelinks()Simo Sorce1-1/+1
This way we avoid any chance that a configuration reload may turn back on wide links when unix extensions are enabled.
2010-02-05Fix bug 7104 - "wide links" and "unix extensions" are incompatible.Jeremy Allison1-1/+1
Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow that link anyway. Correct DEBUG message in check_reduced_name() to add missing "\n" so it's really clear when a path is being denied as it's outside the enclosing share path. Jeremy.
2010-01-12Remove the global char *LastDir.Jeremy Allison1-20/+1
This is no longer used for anything.
2009-11-24Allow us to pass RAW-CHKPATH with FILE_FLAG_POSIX_SEMANTICS set or withJeremy Allison1-3/+11
wide links = no. Jeremy.
2009-11-18s3: Do not talloc in readdirVolker Lendecke1-18/+24
This is a hot codepath (called from the stat cache)
2009-11-12s3: Fix debug messages in check_reduced_nameVolker Lendecke1-13/+24
2009-10-06s3: Add access_mask to the flock VFS callAbhidnya P Chirmule1-2/+4
2009-10-02Remove lots of duplicate code and move it into oneJeremy Allison1-0/+25
function vfs_stat_fsp(). Stops code looking at fsp->posix_open except for exceptional circumstances. Jeremy.
2009-10-02Fix more use of VFS_STAT when posix pathnames selected.Jeremy Allison1-1/+6
Jeremy.
2009-09-24vfs catia: Fix the double translation that was happening with createfile and ↵Aravind Srinivasan1-3/+5
open. Since the catia translation is implemented for open, it should not also be done in createfile. By removing createfile from catia, translation is now done correctly for the primary open path. In order to support systems that have custom createfile implementations that don't eventually call SMB_VFS_OPEN, SMB_VFS_TRANSLATE_NAME has been expanded to take an additional argument that specifies direction. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAMEAravind Srinivasan1-2/+19
This vop is designed to work in tandem with SMB_VFS_READDIR to allow vfs modules to make modifications to arbitrary filenames before they're consumed by callers. Subsequently the core directory enumeration code in smbd is now changed to free the memory that may be allocated in a module. This vop enables the new version of catia in the following patch. Signed-off-by: Tim Prouty <tprouty@samba.org>