summaryrefslogtreecommitdiff
path: root/source3/modules
AgeCommit message (Collapse)AuthorFilesLines
2013-09-24build: get rid of vars=locals() in source3/modules/wscript_buildMichael Adam1-2/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-24build: get rid of source file variables in source3/modules/wscript_buildMichael Adam1-116/+59
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2013-09-23s3:modules: vfs_afsacl has the afs_syscall prototype via proto.hMichael Adam1-2/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-11smbd: Add brl_fsp access functionVolker Lendecke2-6/+9
2013-09-10s3:smb2_find: Return that timestamps do not exist as directoriesChristof Schmitt1-3/+0
When a Windows client receives a large directory listing while querying snapshots, it sends a find request asking for the timestamp as a directory. A Windows server returns NO_SUCH_FILE, so make sure Samba returns the same. Otherwise the client will get confused and display timestamps in the 'previous versions' dialog. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Sep 10 22:38:51 CEST 2013 on sn-devel-104
2013-08-30vfs_glusterfs: Fix excessive debug output from vfs_gluster_open().Christopher R. Hertel1-3/+0
The vfs_gluster_open() function generates a debug message (at level 0) for every failed attempt to open a pathname. This includes cases in which attempts are made to open a directory as a file (those attempts are retried calling vfs_gluster_opendir()). The result is that the log file fills with messages about failed attempts to open directories, just because they are directories. This latest version, of the patch completely removes logging from the vfs_gluster_open() function. The error code returned is handled in upper layers, and the open function in the default VFS module does not log any errors. Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-by: susant palai <spalai@redhat.com> Reviewed-by: raghavendra talur <rtalur@redhat.com> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 30 02:43:48 CEST 2013 on sn-devel-104
2013-08-28s3: fix missing braces in nfs4_acls.cAbhidnya Joshi1-1/+2
Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 28 20:25:56 CEST 2013 on sn-devel-104
2013-08-16vfs_glusterfs: Implement proper mashalling/unmarshalling of ACLsAnand Avati1-42/+111
Use the primitives available in Samba byteorder.h for implementing proper (un)marshalling of ACL xattrs. - Incorporated Raghavendra Talur's comments on v3 Signed-off-by: Anand Avati <avati@redhat.com> Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christopher R. Hertel <crh@samba.org> Tested-by: Jose A. Rivera <jarrpa@redhat.com> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Aug 16 20:34:51 CEST 2013 on sn-devel-104
2013-08-12smbd: Fix nonblank line endingsVolker Lendecke1-6/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09VFS plugin was sending the actual size of the volume instead of the total ↵Susant Kumar Palai1-7/+4
number of block units because of which windows was getting the wrong volume capacity. Signed-off-by: Susant Kumar Palai <spalai@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christopher R. Hertel <crh@samba.org>
2013-08-06FSCTL_GET_SHADOW_COPY_DATA: Don't return 4 extra bytes at endChristof Schmitt1-2/+2
labels_data_count already accounts for the unicode null character at the end of the array. There is no need in adding space for it again. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 6 04:03:17 CEST 2013 on sn-devel-104
2013-08-05FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zeroChristof Schmitt1-1/+1
Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-01Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.Ralph Wuerthner1-0/+6
Ensures correct lease owner for signal delivery. Signed-off-by: Ralph Wuerthner <ralphw@de.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 1 03:57:11 CEST 2013 on sn-devel-104
2013-07-16s3: Remove old mode special substitution.Alexander Werth1-13/+2
The mode special substitution now happens in a separate function. The substitution at this point is unnecessary. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Tue Jul 16 00:52:26 CEST 2013 on sn-devel-104
2013-06-24Use existing "acl map full control" parameter to control the adding of the ↵Jeremy Allison1-2/+17
DELETE_CHILD parameter on NFSv4/ZFS/GPFS file ACE's. Windows maps an open request of GENERIC_ALL on files to 0x1FF specific bits, which includes DELETE_CHILD even though this has no meaning on file ACE's. If a returned NFSv4 ACE entry for a file has all other specific bits set except for DELETE (which comes from the containing directory) and DELETE_CHILD (which has no meaning) then optionally add it into the returned ACE entry. This is using the same parameter in the same way as it is currently used in smbd/posix_acls.c. Note that as this parameter is on by default, it is already being tested in the existing raw.acl tests. Fixes issue with Microsoft SMB2 torture test suite found at the interop event in Redmond, WA. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2013-06-21Fix glusterfs backend crash found at the Microsoft interop event.Jeremy Allison1-2/+4
Based on a fix originally from Raghavendra Talur <rtalur@redhat.com>. When a new document is created in explorer, a check for file_exist is made. vfs_gluster_get_real_filename was returning 0 even when the file did not exist. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Christopher R. Hertel" <crh@ubiqx.mn.org>
2013-06-19build: Build with system md5.h on OpenIndianaAndrew Bartlett1-1/+1
This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
2013-06-17vfs_catia: use translate direction enum instead of intDavid Disseldorp1-1/+1
Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-17vfs_streams_xattr: Do not attempt to write empty attribute twiceChristof Schmitt1-31/+11
The create disposition FILE_OVERWRITE_IF is mapped to the flags O_CREAT|O_TRUNC. In vfs_streams_xattr, this triggers two calls to SMB_VFS_SETXATTR. The second can fail if O_EXCL is also set, resulting in an unnecessary error. Merge the identical code to handle O_CREAT and O_TRUNC to avoid setting an empty attribute twice. Also add the flags parameter to the debug message. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-06-13Initialize the file descriptor in the files_struct before trying to close ↵Christof Schmitt1-0/+1
it. Otherwise, if one of the SETXATTR calls had failed, the close() call will return EBADF. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <rsharpe@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 13 01:43:18 CEST 2013 on sn-devel-104
2013-06-10Optimization on POSIX platforms that have fstatat.Jeremy Allison1-4/+23
Tests show significant speedup in directory listings by using fstatat instead of a full pathname walk. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jun 10 20:14:12 CEST 2013 on sn-devel-104
2013-05-30vfs_glusterfs: Samba VFS module for glusterfsAnand Avati2-0/+1503
Implement a Samba VFS plugin for glusterfs based on gluster's gfapi. This is a "bottom" vfs plugin (not something to be stacked on top of another module), and translates (most) calls into closest actions on gfapi. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Signed-off-by: Anand Avati <avati@redhat.com>
2013-05-18smbd: Fix a ISO C90 forbids mixed declarations and code warningVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Sat May 18 01:40:04 CEST 2013 on sn-devel-104
2013-05-15source3/modules/vfs_catia.c: Fix typo in comment.Karolin Seeger1-1/+1
Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-14vfs_gpfs: slightly simplify connect()Volker Lendecke1-7/+7
DISCONNECT can be arbitrarily complex, TALLOC_FREE of a simple struct is easier. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue May 14 18:11:29 CEST 2013 on sn-devel-104
2013-05-14build: Add missing dep from vfs_nfs4acl_xattr to NDR_NFS4ACLAndrew Bartlett1-1/+1
Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue May 14 01:23:17 CEST 2013 on sn-devel-104
2013-05-09s3:modules/vfs_aixacl2 fix compile errorsChristian Ambach1-9/+8
fix various compile errors that were introduced with latest ACL changes Signed-off-by: Christian Ambach <ambi@samba.org> Pair-Programmed-With: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09Fix missing TALLOC_FREE of stackframes.Jeremy Allison2-2/+6
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-05-09Tidy up old bool usage. False -> false, True -> true.Jeremy Allison1-13/+13
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Allow CREATOR GROUP to be used with vfs_zfsaclAndrew Bartlett1-1/+1
The solaris acl() code requires that both ACE_GROUP|ACE_IDENTIFIER_GROUP be set to indicate the @group permissions. Otherwise, it would return Invalid Paramter to clients. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Update README.nfs4acls.txtAlexander Werth1-8/+15
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Use mode bits in some cases in mode simple.Alexander Werth1-0/+46
Non inheriting ACL entries will show mode bits. With this an file owner change does affect the effective ACL because the special owner acl will now refer to the new owner. This could be fixed by updating the ACL on a file owner change. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Add changes that keep nfs4:mode special behavior.Alexander Werth1-1/+41
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Mapping of cifs creator owner to nfs owner@ ace.Alexander Werth1-0/+24
This is ignored in nfs4mode special for compatibility. Also ensure that we drop non inheriting creator owner aces since these don't contribute to who can access a file. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Mapping of special entries to creator owner in mode simple.Alexander Werth1-6/+60
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Add params parameter to smbacl4_nfs42win function.Alexander Werth1-12/+27
Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Change smbacl4_get_vfs_params to use connection_struct instead of fsp.Alexander Werth1-5/+6
Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09s3: Move up declaration of params struct and related function.Alexander Werth1-49/+49
We need the parameters earlier in the code so we move up the declaration of the params struct. Since reading the parameters is closely related the definition of the function smbacl4_get_vfs_params has also been moved up. Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Add inheritance emulation to vfs_nfs4acl_xattr.Alexander Werth1-29/+263
Recursively inherit ACL from parent directory if no acl xattr is found on the current file. Use a default ACL if a non-inheriting ACL is encountered. With this the nfs4acl_xattr.dynamic test passes. But the nfs4acl_xattr.inheritance test results in an error because of warnings that cause the test to pass a failed result. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Add new VFS module vfs_nfs4acl_xattr to use nfs4acl.idlAndrew Bartlett2-0/+423
This uses the xattr format used by the patches at http://users.suse.com/~agruen/nfs4acl/ Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Remove unused security_info argument in vfz_zfsacl.cAndrew Bartlett1-3/+1
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Fix compile of vfs_gpfs.c.Alexander Werth1-18/+33
Since the smb4acl is now correctly allocated on mem_ctx and not the talloc stack frame we can free the stack frame correctly. And the chmod emulation code now needs the vfs handle since that is now required by the callback function to set the smb4acl. Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Allocate SMB4ACL_T on an explict memory contextAndrew Bartlett5-33/+78
This ensures the caller knows exactly what the memory lifetime of this returned object is. This makes the NFSv4 ACL code consistent with the POSIX and NT ACL code, to avoid supprising developers who have worked on those other parts of the ACL code. Most of this patch is adding a memory context to the callers and passing it in. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09vfs: Add vfs_handle_struct argument to smb_set_nt_acl_nfs4 and the callbackAndrew Bartlett5-15/+16
This allows the callback to call xattr based storage functions that need this argument. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-05Fix warnings and one compile error caused by newer gcc 4.7.Jeremy Allison1-3/+5
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): Sun May 5 19:01:38 CEST 2013 on sn-devel-104
2013-04-24Implements a vfs module for cephfs, a distributed file systemSam Lang2-0/+1271
with posix semantics, built on the ceph distributed object storage layer. The ceph vfs module interfaces to the libcephfs userspace API, and is primarily a lightweight wrapper around libcephfs, translating error codes and parameters as necessary. Signed-off-by: Sam Lang <sam.lang@inktank.com> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfs: Convert dirsort_opendir to synthetic_smb_fnameVolker Lendecke1-7/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfs: Convert vfs_scannedonly to synthetic_smb_fnameVolker Lendecke1-16/+12
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfs: Convert non_posix_sys_acl_blob_get_file_helper to synthetic_smb_fnameVolker Lendecke1-6/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfs: Convert vfswrap_fs_capabilities to synthetic_smb_fnameVolker Lendecke1-7/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>