summaryrefslogtreecommitdiff
path: root/source3/smbd/vfs.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-20Ensure the RECVFILE path in vfs_pwrite_data() operates on a blocking socket.Jeremy Allison1-1/+12
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 20 01:04:05 CEST 2013 on sn-devel-104
2013-04-19Ensure the RECVFILE path in vfs_write_data() operates on a blocking socket.Jeremy Allison1-1/+12
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-17smbd: Convert vfs_lstat_smb_fname to synthetic_smb_fnameVolker Lendecke1-6/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert vfs_stat_smb_fname to synthetic_smb_fnameVolker Lendecke1-6/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert check_reduced_name_with_privilege to synthetic_smb_fnameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert vfs_GetWd to synthetic_smb_fnameVolker Lendecke1-9/+7
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-16s3-vfs: add copy_chunk vfs hooksDavid Disseldorp1-2/+24
copy_chunk copies n bytes from a source file at a specific offset to a destination file at a given offset. This interface will be used in handling smb2 FSCTL_SRV_COPYCHUNK ioctl requests. Use a pread/pwrite loop in vfs_default, so that requests referring to the same src and dest file are possible. Provide send and receive hooks for copy chunk VFS interface, allowing asynchronous behaviour. Check whether the request source offset + length exceeds the current size. Return STATUS_INVALID_VIEW_SIZE under such a condition, matching Windows server behaviour. Reviewed by: Jeremy Allison <jra@samba.org>
2012-10-11vfs: Remove type parameter from sys_acl_blob_get_{fd,file}Andrew Bartlett1-2/+1
This interface actually needs to match the get_nt_acl interface in that the system ACL implmenetation may not be posix ACLs, and the blob is not meant to be enforced to be of a particular system ACL structure. Andrew Bartlett
2012-10-11smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett1-2/+4
This makes it clear which context the returned SD is allocated on, as a number of callers do not want it on talloc_tos(). As the ACL transformation allocates and then no longer needs a great deal of memory, a talloc_stackframe() call is used to contain the memory that is not returned further up the stack. Andrew Bartlett
2012-10-11smbd: Add mem_ctx to sys_acl_init() and all callersAndrew Bartlett1-4/+6
This changes from allocation on NULL to allocation on the supplied memory context. Currently that supplied context is talloc_tos() at the the final consumer of the ACL. Andrew Bartlett
2012-09-13Sigh :-(. Removing optimization prematurely is the root of all evil :-(.Jeremy Allison1-0/+13
Sorry for the mistake, but the LastDir singleton cache in vfs_ChDir() actually plays an important role. When we're processing a stream of SMB1/SMB2/SMB3 requests we don't want to add a chdir()/getcwd() system call pair on every request if they're all on the same connection and dealing with the same base path. I did some testing with a program that times 1,000,000 chdir() requests vs. 1,000,000 strcmp requests and it's a penalty of 10x doing the system calls. Just because it's old code, doesn't mean it's bad :-(. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 13 21:31:42 CEST 2012 on sn-devel-104
2012-09-12Move cached cwd onto conn struct.Jeremy Allison1-1/+9
This enables us to make VFS modules safe for use in root called code when we've changed directory under conn->connectpath.
2012-09-12Remove ancient "optimization" global LastDir.Jeremy Allison1-16/+3
2012-09-12smbd: Add extra VFS hooks to get the posix ACL as a blobAndrew Bartlett1-0/+21
This will allow us to hash this, rather than the NT ACL it maps to. This will in turn allow us to know if the NT ACL is valid even if we have to change the mapping code. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 12 07:06:01 CEST 2012 on sn-devel-104
2012-09-08s3:vfs: add durable VFS operationsMichael Adam1-0/+34
This allows a VFS module to implement durable handles in different ways. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-08-28s3-vfs: Indicate the symlink destination when failing check_reduced_nameAndrew Bartlett1-2/+2
2012-08-15s3-smbd: Remove sys_acl_*() VFS wrapper functionsAndrew Bartlett1-129/+0
We no longer do struct smb_acl_t manipuations via the VFS layer, which is now reduced to handling the get/set functions. The only backend that implemented these functions (aside from audit) was the vfs_default module calling the sys_acl code. The various ACL implementation modules either worked on the fully initilaised smb_acl_t object or on NT ACLs. This not only makes the operation of the posix ACL code more efficient (as allocation and free is not put via the VFS), it makes it easier to test and removes the fantasy that a module could safely redefine this structure or the behaviour here. The smb_acls.idl now defines the structure, and it is now allocated with talloc. These operations were originally added to the VFS in commit 3bb219161a270f12c27c3bc7e1220829c6e9f284. Andrew Bartlett
2012-08-12s3: skip loading vfs modules for printer connectionsBjörn Jacke1-0/+6
Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Sun Aug 12 23:40:23 CEST 2012 on sn-devel-104
2012-07-31s3: Fix Coverity ID 710827 Resource leakVolker Lendecke1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-18s3-vfs: async fsyncVolker Lendecke1-0/+62
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-aio: Remove unused VFS functions and moreVolker Lendecke1-54/+0
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-vfs: async preadVolker Lendecke1-0/+64
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-vfs: async pwriteVolker Lendecke1-0/+65
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11s3: Fix Coverity ID 703869 Logically dead codeVolker Lendecke1-10/+6
We "TALLOC_FREE(curr)" and assign prev=curr in the for-loop header. This will lead to "prev"==NULL always. In this loop, we do not need to correctly re-shuffle the linked list, we delete all from the beginning anyway. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jun 11 17:26:53 CEST 2012 on sn-devel-104
2012-06-06s3:smbd: make struct vfs_fsp_data private to vfs.cStefan Metzmacher1-0/+10
metze
2012-06-06s3:smbd: add vfs_remove_all_fsp_extensions()Stefan Metzmacher1-0/+21
metze
2012-04-28Add an audit file VFS routine so we can handle auditing with SACLs.Richard Sharpe1-0/+14
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Sat Apr 28 08:05:00 CEST 2012 on sn-devel-104
2012-04-24s3: Simplify check_reduced_name a bitVolker Lendecke1-9/+5
It's pointless to do a talloc_asprintf with a SMB_STRDUP on the result. Use asprintf directly. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Apr 24 18:18:05 CEST 2012 on sn-devel-104
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett1-19/+19
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
2012-04-05s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configureAndrew Bartlett1-7/+0
If this is ever needed again, it would be more appropriate as an options argument to removexattr. Andrew Bartlett
2012-04-05s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configureAndrew Bartlett1-9/+0
If this is ever needed again, it would be more appropriate as an options argument to listxattr. Andrew Bartlett
2012-04-05s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configureAndrew Bartlett1-7/+0
If this is ever needed again, it would be more appropriate as an options argument to listxattr. Andrew Bartlett
2012-04-05s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configureAndrew Bartlett1-8/+0
2012-04-05build: Remove SMB_STRUCT_DIR defineAndrew Bartlett1-9/+9
2012-04-05build: Remove SMB_STRUCT_DIRENT defineAndrew Bartlett1-2/+2
2012-04-03s3-vfs: Use new smb_load_module for better diagnosticsAndrew Bartlett1-1/+1
2012-03-26s3: Pass filters explicitly through vfs notify watchVolker Lendecke1-2/+4
This removes a dependency on "struct notify_entry" and makes the nature of the API more explicit. We depend upon the VFS module to mask out elements from e->filter and e->subdir_filter that it took over to handle. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104
2012-03-21s3: Pass "path" through vfs_notify_watchVolker Lendecke1-1/+2
2012-02-29Add the implementation of check_reduced_name_with_privilege(). Now to plumb intoJeremy Allison1-3/+157
SMB1 requests.
2012-02-29Add check_reduced_name_with_privilege(), filename_convert_with_privilege() ↵Jeremy Allison1-0/+15
(currently unimplemented) in order to prepare for adding SeBackup/SeRestore code to the main fileserver. Not yet plumbed into the main SMB1/SMB2 code.
2011-12-12vfs: Make function pointer names consistent. They all end in _fnRichard Sharpe1-136/+141
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-10-17First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.Frank Lahm1-0/+15
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104
2011-10-08s3:vfs: add SMB_VFS_GET_DFS_REFERRAL() hooksStefan Metzmacher1-0/+7
metze
2011-10-01Move FSCTL handling into the VFS. Initial code changes. Passes smbtorture ↵Richard Sharpe1-0/+17
NTTRANS-FSCTL. Test added to selftests.
2011-08-19Fix bug #8370 - vfs_chown_fsp broken -- returns in the wrong directoryJeremy Allison1-3/+7
Ensure we always use vfs_ChDir() to keep the singleton cache coherent. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Aug 19 00:43:05 CEST 2011 on sn-devel-104
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