summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2013-04-17vfs: Convert unlink_acl_tdb to cp_smb_filenameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-11Remove unneeded initializations (we already talloc_zero).Jeremy Allison1-5/+0
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Remove the use of dirfd inside the vfs_dirsort.c.Jeremy Allison1-9/+23
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Convert mtime from a time_t to a struct timespec.Jeremy Allison1-15/+26
In preparation for removing the dirfd and using fsp_stat() and VFS_STAT functions. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Clean error paths in opendir and fd_opendir by only setting handle data on ↵Jeremy Allison1-10/+13
success. Pass extra struct dirsort_privates * to open_and_sort_dir() function to avoid it having to re-read the handle data. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Protect open_and_sort_dir() from the directory changing size.Jeremy Allison1-9/+15
Otherwise there could be an error between initial count, allocation and re-read. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Use an index i rather than re-using a state variable.Jeremy Allison1-5/+3
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Protect against early error in SMB_VFS_NEXT_READDIR.Jeremy Allison1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.Jeremy Allison1-14/+8
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-10vfs_fake_perms: Fix bug 9775, segfault for "artificial" conn_structsVolker Lendecke1-4/+29
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 10 00:12:06 CEST 2013 on sn-devel-104
2013-04-09vfs_fake_perms: Slightly streamline codeVolker Lendecke1-2/+2
Don't initialize a variable directly set Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-09vfs_fake_perms: Slightly streamline codeVolker Lendecke1-16/+21
Do an early error return Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-03s3:modules: fix the build of vfs_notify_fam (bug #9545)Stefan Metzmacher1-0/+4
This adds the --with-fam option and configure checks. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-03-24vfs-btrfs: Fix build on 32 bit platforms by using long long typesAndrew Bartlett1-6/+10
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Sun Mar 24 06:17:55 CET 2013 on sn-devel-104
2013-03-24Revert "vfs_btrfs: fix compile on 32-bit platforms."Rusty Russell1-5/+4
This reverts commit fd6d0361d6fef5f8175967ddbae4a2b1d79dfcad. Unreviewed, and Andrew has a better fix. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-23vfs_btrfs: fix compile on 32-bit platforms.Rusty Russell1-4/+5
uint64_t are not unsigned longs on 32-bit platforms: [3265/3996] Compiling source3/modules/vfs_btrfs.c ../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_send’: ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c:118:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ [-Werror=format] ../source3/modules/vfs_btrfs.c: In function ‘btrfs_copy_chunk_recv’: ../source3/modules/vfs_btrfs.c:180:2: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘off_t’ [-Werror=format] cc1: some warnings being treated as errors Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-21s3:waf fix build on AIXStefan Metzmacher1-1/+1
AIX acl code needs to be built by default on AIX, otherwise smbd will fail to start because of missing symbols This fixes Bug 9557 - build succeeds, but binaries don't run Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Thu Mar 21 16:31:19 CET 2013 on sn-devel-104
2013-03-15vfs_smb_traffic_analyzer: Cast mode_t to unsigned int for GNU/Solaris buildAndrew Bartlett1-2/+2
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-09s3-vfs: add vfs_btrfs moduleDavid Disseldorp2-0/+205
Currently it only plumbs itself into the copy_chunk call path, translating such requests into BTRFS_IOC_CLONE_RANGE calls. Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-07vfs_catia: add my copyrightGuenter Kukkukk1-0/+1
Signed-off-by: Guenter Kukkukk <kukks@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Mar 7 22:24:47 CET 2013 on sn-devel-104
2013-03-07vfs_catia: fix the translation to "vfs_translate_to_windows"Guenter Kukkukk1-4/+6
THANKS to an IRC user (Raimund ?) who asked for a char mapping possibility. I suggested vfs_catia - but it did not work! Hopefully now it will. :-) Signed-off-by: Guenter Kukkukk <kukks@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-07vfs_catia: add debug class for that moduleGuenter Kukkukk1-1/+23
Signed-off-by: Guenter Kukkukk <kukks@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-02-22s3-vfs: Don't leak file descriptor on error.Andreas Schneider1-1/+3
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22s3-vfs: Don't leak file descriptor.Andreas Schneider1-2/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-19s3:modules: s/event_add_timed/tevent_add_timerStefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:modules: s/event_add_fd/tevent_add_fd and s/EVENT_FD_/TEVENT_FD_Stefan Metzmacher3-6/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:modules: s/struct fd_event/struct tevent_fdStefan Metzmacher4-10/+10
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:modules: s/struct timed_event/struct tevent_timerStefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:modules: s/struct event_context/struct tevent_contextStefan Metzmacher5-11/+11
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-18vfs_gpfs: Fix typos in comments.Karolin Seeger1-2/+2
Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-11Fix bug #9642 - vfs_afsacl.c won't build.Jeremy Allison1-1/+2
Add missing mem_ctx argument. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Feb 11 20:24:00 CET 2013 on sn-devel-104
2013-02-04s3:modules remove gpfs_getacl_allocChristian Ambach1-46/+0
last caller has gone Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Feb 4 14:10:08 CET 2013 on sn-devel-104
2013-02-04s3:modules use vfs_gpfs_getacl in gpfsacl_get_posix_aclChristian Ambach1-3/+3
as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3:modules use vfs_gpfs_getacl in gpfsacl_set_nt_acl_internalChristian Ambach1-5/+9
as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3:modules use vfs_gpfs_getacl in gpfs_get_nfs4_aclChristian Ambach1-2/+5
as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3:vfs_gpfs use non_posix_sys_acl_blob_get_*_helperChristian Ambach1-16/+90
use the helper functions to return the blob based on the raw GPFS ACL blob (if it is a NFSv4 ACL). If not, fall back to the POSIX ACL code Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3:vfs_gpfs add a generic vfs_gpfs_getacl functionChristian Ambach1-0/+73
in contrast to gpfs_getacl_alloc which always puts the ACL on talloc_tos(), this one allows to specify the memory context and if the caller is interested in the raw ACL blob or a structured version Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3:modules/vfs_gpfs add GPFS_GETACL_NATIVE defineChristian Ambach1-0/+4
this is not in the official GPFS header file, but can be found in the GPL'd kernel module sources Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3:modules/non_posix_acls: only stat if we do not have it cachedChristian Ambach1-4/+8
most probably we already have the stat() information Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04s3-waf:modules add non_posix_acls dependency to vfs_gpfsChristian Ambach1-1/+1
Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04vfs: Add helper function for non posix ACL modulesAndrew Bartlett3-0/+136
This handles the stat, and fills in the pre-supplied blob into a wrapper sturcture that can then be returned to vfs_acl_common for hashing. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04vfs_acl_common: Do not fetch the underlying NT ACL unless we need itAndrew Bartlett1-44/+80
This avoids asking for the posix ACL on disk twice, and avoids running a good deal of mapping code if it is not needed. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04vfs: Whitespace fix only to get_nt_acl_internal indentationAndrew Bartlett1-4/+4
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04vfs: Implement an improved vfs_acl_common that uses the hash of the system ACLAndrew Bartlett1-51/+250
Where supported by the system ACL backend, this avoids hashing the result of the ACL mapping, instead hashing the original ACL, linearlised. For maximum robustness, the hash of the NT and system ACL are stored, along with the time and a description of the system ACL. This variety of extra metadata may assist some future implementation in determining which hash to validate. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04vfs: Add helper function hash_blob_sha256 to vfs_acl_common.cAndrew Bartlett1-7/+19
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-01-18Move copychunk locking to be local to the read/write calls.Jeremy Allison1-0/+42
Eliminates the need to hold locks across the entire lifetime of the call. Next commit will remove these. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-16s3-vfs: add copy_chunk vfs hooksDavid Disseldorp3-0/+234
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>
2013-01-15smbd: Fix bug 9544, part 2Volker Lendecke1-0/+80
Plug in async pwrite Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jan 15 00:55:51 CET 2013 on sn-devel-104
2013-01-14smbd: Fix bug 9544, part 1Volker Lendecke1-3/+3
Adapt the sync function names Reviewed by: Jeremy Allison <jra@samba.org>