1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

123 Commits

Author SHA1 Message Date
Christian Ambach
4c1527b1ce s3:modules remove gpfs_getacl_alloc
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-04 14:10:06 +01:00
Christian Ambach
18bfcac810 s3:modules use vfs_gpfs_getacl in gpfsacl_get_posix_acl
as preparation to remove gpfs_getacl_alloc()

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Christian Ambach
5388773d4b s3:modules use vfs_gpfs_getacl in gpfsacl_set_nt_acl_internal
as preparation to remove gpfs_getacl_alloc()

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Christian Ambach
16940d8a8e s3:modules use vfs_gpfs_getacl in gpfs_get_nfs4_acl
as preparation to remove gpfs_getacl_alloc()

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Christian Ambach
06219913ab s3:vfs_gpfs use non_posix_sys_acl_blob_get_*_helper
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-04 12:19:30 +01:00
Christian Ambach
f1ff845720 s3:vfs_gpfs add a generic vfs_gpfs_getacl function
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-04 12:19:30 +01:00
Stefan Metzmacher
bc6bceec65 s3:vfs_gpfs: add no memory check in gpfs2smb_acl()
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
2012-11-28 14:06:26 +01:00
Stefan Metzmacher
0f630abb3f s3:vfs_gpfs: make sure we return the correct errno in gpfs2smb_acl()
TALLOC_FREE() could overwrite errno.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-28 12:22:10 +01:00
Christian Ambach
775d0a78c4 s3:vfs_gpfs fix a memory leak in gpfsacl_get_posix_acl
Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-16 23:28:21 +01:00
Christian Ambach
1a71f07cee s3:vfs_gpfs fix memory corruption in gpfs2smb_acl
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 7a61829629

Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-16 23:28:21 +01:00
Christian Ambach
3dab1ef8a5 s3:vfs_gpfs fix memory leak in gpfs_get_nfs4_acl
Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-16 23:28:21 +01:00
Christian Ambach
3925a7114c s3:vfs_gpfs fix memory leaks in gpfs_getacl_alloc
Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-16 23:28:21 +01:00
Christian Ambach
6d1be1caf9 s3:vfs_gpfs re-indent run-away lines
some lines added by the acl_blob additions were longer than 80 chars
2012-10-12 11:49:32 +02:00
Christian Ambach
fa728d1c0b s3:vfs_gpfs fix the build
make it compile again after the recent (untested) additions of the acl_blob functions
2012-10-12 11:49:32 +02:00
Christian Ambach
e4946cf10c s3:vfs_gpfs remove a trailing space 2012-10-12 11:49:32 +02:00
Christian Ambach
12ae1812d0 s3:vfs_gpfs skip local flock when gpfs sharemodes are disabled
no sense in calling local flock when clustered sharemodes should be disabled
2012-10-12 11:49:31 +02:00
Andrew Bartlett
abee79f99d vfs: Use posix_sys_acl_blob_get_file in vfs_gpfs for posix ACLs 2012-10-11 12:25:12 +11:00
Andrew Bartlett
c8ade07760 smbd: Add mem_ctx to {f,}get_nt_acl VFS call
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-11 12:25:11 +11:00
Andrew Bartlett
9158974540 smbd: Add mem_ctx to sys_acl_init() and all callers
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-10-11 12:25:11 +11:00
Christian Ambach
7a61829629 s3:vfs_gpfs: fix build
after recent VFS changes
2012-09-16 11:50:12 -07:00
Christof Schmitt
6678907fae s3:vfs_gpfs: Use directory not file to get fileset id
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
2012-08-29 18:58:33 +02:00
Volker Lendecke
2c3a58db9e s3: Merge vfs_gpfs_hsm_notify into vfs_gpfs.c
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>
2012-08-17 18:25:53 +02:00
Christian Ambach
6e3901194b s3:vfs_gpfs: make sure parameters are set correctly for leases
gpfs:leases requires kernel oplocks = yes and level2 oplocks = no
to work properly

make sure those are set correctly for a share
2012-08-16 18:05:29 +02:00
Andrew Bartlett
dcfb6aad16 s3-smbd: Change allocation of smb_acl_t to talloc()
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
2012-08-15 11:44:43 +10:00
Ralph Wuerthner
73ede3241e s3:vfs_gpfs: fix ACL length calculation
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
2012-07-11 21:28:23 +02:00
Christof Schmitt
35ab9bea0f s3:vfs_gpfs: Check softquota before gracetime
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.
2012-07-11 19:38:47 +02:00
Volker Lendecke
e7b58146d8 s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
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
2012-06-22 19:27:39 +02:00
Björn Baumbach
289255ce73 s3:vfs_gpfs: add "gpfs:acl" option
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>
2012-06-15 18:32:21 +02:00
Alexander Werth
e8c2f81ef3 s3:vfs/gpfs: Have inherited deny ACE's show up in ACLs
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.
2012-05-08 22:37:05 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
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-06 01:47:43 +02:00
Christian Ambach
8718c7b88d s3:vfs_gpfs: fix some compiler warnings
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Mar 22 20:14:34 CET 2012 on sn-devel-104
2012-03-22 20:14:34 +01:00
Christian Ambach
0a37ca5210 s3:vfs_gpfs: remove fallback to linux_setlease
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
2012-03-22 18:41:22 +01:00
Christian Ambach
a551ee5f22 s3:vfs_gpfs: correct use of profiling macros
under certain conditions START_PROFILE could have been called, but no END_PROFILE
2012-03-22 18:41:22 +01:00
Christof Schmitt
0a896094c6 s3:vfs_gpfs: Implement fallocate callback for GPFS
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.
2012-03-22 18:41:22 +01:00
Christof Schmitt
62616784ae s3:vfs_gpfs: Report disk space and usage on GPFS share according to quotas
When a client requests the information about free space and space used,
adjust the reported values according to quotas in the GPFS file system:

- Retrieve quotas for the current user, current group and fileset for
  the top level of the share.
- If the soft block quota grace time has expired, report disk as full.
- If a hard block quota has been exceeded, report disk as full.
- If none of the hard block quotas been exceeded, report
  share size and free space according to the lowest limits found in
  the quotas.
- If no applicable hard block quota has been set, report the
  information from the statfs call.

This feature is disabled by default and has to be enabled by setting the
option gpfs:dfreequota.
2012-03-22 18:41:22 +01:00
Christian Ambach
e87d98c0fc s3:vfs_gpfs:quieten an expectable warning message
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Feb 10 20:14:12 CET 2012 on sn-devel-104
2012-02-10 20:14:12 +01:00
Christian Ambach
4a11be3fb4 s3:vfs_gpfs: fix a compiler warning 2012-02-10 18:11:30 +01:00
Christof Schmitt
8ce9982be9 s3:vfs_gpfs:Fix query of creation time from GPFS
Setting the creation time through SetFileTime on a GPFS file system and
querying it with GetFileTime shows a mismatch.

The vfs_gpfs module first retrieves the information from the operating
system and the flag st_ex_calculated_birthtime is set to false. When
vfs_gpfs retrieves the birthtime from GPFS the flag
st_ex_calculated_birthtime has to be set to true. Otherwise the birth
time will get overwritten by a call to update_stat_ex_mtime, reporting
the wrong time to a client system.

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 18:10:43 +01:00
Stefan Metzmacher
318346a937 s3:vfs_gpfs: make "gpfs:getrealfilename" a per share option
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 18:08:01 +01:00
Stefan Metzmacher
8ad2b6a55e s3:vfs_gpfs: make "gpfs:ftruncate" a per share option
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 17:54:10 +01:00
Stefan Metzmacher
89a4f66826 s3:vfs_gpfs: make "gpfs:winattr" a per share option
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 17:54:10 +01:00
Stefan Metzmacher
2e95d8048b s3:vfs_gpfs: be less verbose in get/set_xattr functions
metze

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-02-10 17:54:10 +01:00
Volker Lendecke
17986097a3 s3: Split a line with 1 statements
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan 12 13:10:19 CET 2012 on sn-devel-104
2012-01-12 13:10:19 +01:00
Christian Ambach
851b9e9183 s3:vfs fix up vfs_gpfs after function pointer renames
In 422494a8e6, vfs_gpfs.c was forgotten

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Dec 15 21:08:02 CET 2011 on sn-devel-104
2011-12-15 21:08:02 +01:00
Christian Ambach
6753656c74 s3:vfs:gpfs fix some compiler warnings 2011-11-24 17:24:58 +01:00
Christian Ambach
db1abd4d2d s3:vfs:gpfs convert syncio parameter
convert syncio parameter to be stored in the VFS handle data
this removes the need to go through lp_parm_bool() on each open
2011-11-24 15:52:09 +01:00
Gregor Beck
2ddfbbbdba gpfs.so: Add gpfs:syncio option
This enables optimizations for shared file access on gpfs
2011-05-16 13:58:24 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Volker Lendecke
41bde55821 vfs_gpfs: Block sendfile for offline files 2011-05-04 16:11:30 +02:00
Volker Lendecke
2329fb56a7 vfs_gpfs: Store the winattrs in st.vfs_private
This avoids a considerable amount of gpfs_winattr calls
2011-05-04 16:11:30 +02:00