summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_gpfs.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()Ralph Wuerthner2014-05-151-2/+9
| | | | | | | | | Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 15 02:19:41 CEST 2014 on sn-devel-104
* vfs_gpfs: Avoid warnings in developer buildChristof Schmitt2014-04-181-5/+4
| | | | | | | | | | Remove an unused variable and use discard_const_p. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Apr 18 22:25:25 CEST 2014 on sn-devel-104
* vfs: Store ACL control flags in gpfs vfs module.Alexander Werth2014-04-051-23/+114
| | | | | | | | Use literals to allow a compile and execution on gpfs 3.4. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:modules/vfs_gpfs add gpfs:recalls optionChristian Ambach2014-03-141-0/+13
| | | | | | | | | | When this option is set to no, an attempt to open an offline file will be rejected with access denied. This helps preventing recall storms triggered by careless applications like Finder and Explorer. Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* param: rename lp function and variable from "fake_dir_create_times" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "fake_directory_create_times" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Avoid oplock break by storing timestamps with gpfs_set_timesChristof Schmitt2014-01-091-6/+22
| | | | | | | | | | | | | | | | The gpfs_set_times API call allows setting timestamps directly in GPFS without going through the utime() call. Using this API call fixes an unecessary oplock break when a client sends a SET_FILE_ALLOCATION_INFO request and no other client has opened the file. The call to utime() triggers the oplock break through the Linux kernel. Using the gpfs_set_times call for updating the timestamp avoids the call to utime() and the oplock break. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu Jan 9 00:04:48 CET 2014 on sn-devel-104
* s3: Handle stat call with capability in vfs_gpfsAbhidnya Joshi2013-12-161-0/+56
| | | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Mon Dec 16 20:05:23 CET 2013 on sn-devel-104
* Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.Ralph Wuerthner2013-08-011-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
* vfs_gpfs: slightly simplify connect()Volker Lendecke2013-05-141-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
* Fix missing TALLOC_FREE of stackframes.Jeremy Allison2013-05-091-1/+3
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* vfs: Fix compile of vfs_gpfs.c.Alexander Werth2013-05-091-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>
* vfs: Allocate SMB4ACL_T on an explict memory contextAndrew Bartlett2013-05-091-8/+20
| | | | | | | | | | | | 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>
* vfs: Add vfs_handle_struct argument to smb_set_nt_acl_nfs4 and the callbackAndrew Bartlett2013-05-091-4/+4
| | | | | | | | This allows the callback to call xattr based storage functions that need this argument. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Convert vfs_gpfs_chmod to synthetic_smb_fnameVolker Lendecke2013-04-171-3/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs: Convert gpfsacl_emu_chmod to synthetic_smb_fnameVolker Lendecke2013-04-171-4/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_gpfs: Fix typos in comments.Karolin Seeger2013-02-181-2/+2
| | | | Signed-off-by: Karolin Seeger <kseeger@samba.org>
* s3:modules remove gpfs_getacl_allocChristian Ambach2013-02-041-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
* s3:modules use vfs_gpfs_getacl in gpfsacl_get_posix_aclChristian Ambach2013-02-041-3/+3
| | | | | | | as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:modules use vfs_gpfs_getacl in gpfsacl_set_nt_acl_internalChristian Ambach2013-02-041-5/+9
| | | | | | | as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:modules use vfs_gpfs_getacl in gpfs_get_nfs4_aclChristian Ambach2013-02-041-2/+5
| | | | | | | as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:vfs_gpfs use non_posix_sys_acl_blob_get_*_helperChristian Ambach2013-02-041-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>
* s3:vfs_gpfs add a generic vfs_gpfs_getacl functionChristian Ambach2013-02-041-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>
* s3:vfs_gpfs: add no memory check in gpfs2smb_acl()Stefan Metzmacher2012-11-281-0/+5
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Nov 28 14:06:27 CET 2012 on sn-devel-104
* s3:vfs_gpfs: make sure we return the correct errno in gpfs2smb_acl()Stefan Metzmacher2012-11-281-1/+1
| | | | | | | TALLOC_FREE() could overwrite errno. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:vfs_gpfs fix a memory leak in gpfsacl_get_posix_aclChristian Ambach2012-11-161-0/+3
| | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:vfs_gpfs fix memory corruption in gpfs2smb_aclChristian Ambach2012-11-161-0/+2
| | | | | | | | | | | sys_acl_init returns a SMB_ACL_T with zero entries in the acl array reallocate the array to proper size before filling it, otherwise we overwrite memory This one is a result of a improper fixing in 7a6182962966e5edb42728c8 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:vfs_gpfs fix memory leak in gpfs_get_nfs4_aclChristian Ambach2012-11-161-0/+1
| | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:vfs_gpfs fix memory leaks in gpfs_getacl_allocChristian Ambach2012-11-161-2/+4
| | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:vfs_gpfs re-indent run-away linesChristian Ambach2012-10-121-4/+10
| | | | some lines added by the acl_blob additions were longer than 80 chars
* s3:vfs_gpfs fix the buildChristian Ambach2012-10-121-5/+11
| | | | make it compile again after the recent (untested) additions of the acl_blob functions
* s3:vfs_gpfs remove a trailing spaceChristian Ambach2012-10-121-1/+1
|
* s3:vfs_gpfs skip local flock when gpfs sharemodes are disabledChristian Ambach2012-10-121-2/+5
| | | | no sense in calling local flock when clustered sharemodes should be disabled
* vfs: Use posix_sys_acl_blob_get_file in vfs_gpfs for posix ACLsAndrew Bartlett2012-10-111-0/+58
|
* smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett2012-10-111-5/+9
| | | | | | | | | | | 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
* smbd: Add mem_ctx to sys_acl_init() and all callersAndrew Bartlett2012-10-111-10/+14
| | | | | | | | | | 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
* s3:vfs_gpfs: fix buildChristian Ambach2012-09-161-5/+5
| | | | after recent VFS changes
* s3:vfs_gpfs: Use directory not file to get fileset idChristof Schmitt2012-08-291-2/+22
| | | | | | | | | | | | | | | The query of the fileset quota needs to determine the file set id first. With the currently available interface, this requires opening the file to get a file descriptor. For files, this open can fail when a share mode is set. Workaround this by querying the fileset id on the directory instead. The proper solution would be getting an interface for getting the fileset id that does not require opening the file. Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Aug 29 18:58:34 CEST 2012 on sn-devel-104
* s3: Merge vfs_gpfs_hsm_notify into vfs_gpfs.cVolker Lendecke2012-08-171-0/+190
| | | | | | | | It was separated out because formerly our async I/O was not properly stackable. aio_fork could for example catch aio and not get aio_return get through to vfs_gpfs Signed-off-by: Christian Ambach <ambi@samba.org>
* s3:vfs_gpfs: make sure parameters are set correctly for leasesChristian Ambach2012-08-161-0/+25
| | | | | | | gpfs:leases requires kernel oplocks = yes and level2 oplocks = no to work properly make sure those are set correctly for a share
* s3-smbd: Change allocation of smb_acl_t to talloc()Andrew Bartlett2012-08-151-2/+2
| | | | | | | | | The acl element is changed to be a talloc child, and is no longer one element longer than requested by virtue of the acl[1] base pointer. This also avoids one of the few remaining cases of over-allocation of a structure. Andrew Bartlett
* s3:vfs_gpfs: fix ACL length calculationRalph Wuerthner2012-07-111-9/+4
| | | | | | | | | | GPFS 3.5 introduces ACL enhancements which are breaking our ACL length calculations. Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Jul 11 21:28:23 CEST 2012 on sn-devel-104
* s3:vfs_gpfs: Check softquota before gracetimeChristof Schmitt2012-07-111-1/+2
| | | | | | | gpfs_quotactl can return a non-zero softquota gracetime even when no softquota has been set. This could lead to "disk full" being reported to a client. The easiest fix is to check for a valid softquota before checking the softquota gracetime.
* s3-vfs_gpfs: Fix bug #9003, posix acl on gpfsVolker Lendecke2012-06-221-2/+2
| | | | | | | | | | | | | gpfs2smb_acl can leave errno!=0 around even if it returned a correct result!=NULL. We can only rely on errno being set if another error condition (in this case result==NULL) indicates an error. If result!=NULL, errno is undefined and can be anything. This leads to SAFE_FREE(result) further down even in the success case. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104
* s3:vfs_gpfs: add "gpfs:acl" optionBjörn Baumbach2012-06-151-0/+81
| | | | | | | | With "gpfs:acl=no" you can pass the acl calls to the next SMB_VFS module. Based on a patch from Hans-Dieter Schuster <hans-dieter.schuster@ts.fujitsu.com> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:vfs/gpfs: Have inherited deny ACE's show up in ACLsAlexander Werth2012-05-081-2/+2
| | | | | | Don't use the mode for the get_acl call that surpresses inherited deny ACE's. This is now possible since the inherited ACE flag exists now in GPFS and Samba.
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-061-3/+3
| | | | | | | | | 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
* s3:vfs_gpfs: fix some compiler warningsChristian Ambach2012-03-221-3/+3
| | | | | Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Thu Mar 22 20:14:34 CET 2012 on sn-devel-104
* s3:vfs_gpfs: remove fallback to linux_setleaseChristian Ambach2012-03-221-6/+0
| | | | | | if setting the lease in GPFS failed, there is not much sense in trying to set a lease just locally that would not inform us of openers on other cluster nodes
* s3:vfs_gpfs: correct use of profiling macrosChristian Ambach2012-03-221-4/+5
| | | | under certain conditions START_PROFILE could have been called, but no END_PROFILE
* s3:vfs_gpfs: Implement fallocate callback for GPFSChristof Schmitt2012-03-221-0/+41
| | | | | | | GPFS provides the gpfs_prealloc call. Implement the fallocate callback with mode VFS_FALLOCATE_EXTEND_SIZE using this call. There is no support for VFS_FALLOCATE_KEEP_SIZE, so report this mode as not available.