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

1376 Commits

Author SHA1 Message Date
Guenter Kukkukk
f7a63dc3ae vfs_catia: fix the translation to "vfs_translate_to_windows"
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-07 11:33:39 -08:00
Guenter Kukkukk
bb680efb0a vfs_catia: add debug class for that module
Signed-off-by: Guenter Kukkukk <kukks@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-07 11:33:25 -08:00
Andreas Schneider
c647169e28 s3-vfs: Don't leak file descriptor on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
aab2e176dc s3-vfs: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:13 +01:00
Stefan Metzmacher
cf1336e356 s3:modules: s/event_add_timed/tevent_add_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:48:03 +01:00
Stefan Metzmacher
64145e7958 s3:modules: s/event_add_fd/tevent_add_fd and s/EVENT_FD_/TEVENT_FD_
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:48:00 +01:00
Stefan Metzmacher
9ececaae5c s3:modules: s/struct fd_event/struct tevent_fd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:59 +01:00
Stefan Metzmacher
80421ee975 s3:modules: s/struct timed_event/struct tevent_timer
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:57 +01:00
Stefan Metzmacher
00b1ef8853 s3:modules: s/struct event_context/struct tevent_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:53 +01:00
Karolin Seeger
38cb1410f5 vfs_gpfs: Fix typos in comments.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
2013-02-18 22:07:39 +11:00
Jeremy Allison
f25debf2fb Fix bug #9642 - vfs_afsacl.c won't build.
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-11 20:24:00 +01:00
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
Christian Ambach
d9075e19ca s3:modules/vfs_gpfs add GPFS_GETACL_NATIVE define
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-04 12:19:30 +01:00
Christian Ambach
b4be8d5073 s3:modules/non_posix_acls: only stat if we do not have it cached
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-04 12:19:30 +01:00
Christian Ambach
d7ad24a3e7 s3-waf:modules add non_posix_acls dependency to vfs_gpfs
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Andrew Bartlett
2a2dbf8259 vfs: Add helper function for non posix ACL modules
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-04 12:19:30 +01:00
Andrew Bartlett
f0e49b015b vfs_acl_common: Do not fetch the underlying NT ACL unless we need it
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-04 12:19:30 +01:00
Andrew Bartlett
4e8c8952ad vfs: Whitespace fix only to get_nt_acl_internal indentation
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04 12:19:30 +01:00
Andrew Bartlett
25526ed3f5 vfs: Implement an improved vfs_acl_common that uses the hash of the system ACL
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-04 12:19:30 +01:00
Andrew Bartlett
6a5f65b0e9 vfs: Add helper function hash_blob_sha256 to vfs_acl_common.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04 12:19:29 +01:00
Jeremy Allison
f2d028ef55 Move copychunk locking to be local to the read/write calls.
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-18 00:06:52 +01:00
David Disseldorp
ef00eb90e5 s3-vfs: add copy_chunk vfs hooks
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-16 23:15:06 +01:00
Volker Lendecke
a82db92a8a smbd: Fix bug 9544, part 2
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-15 00:55:51 +01:00
Volker Lendecke
215427202a smbd: Fix bug 9544, part 1
Adapt the sync function names

Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-14 13:45:00 -08:00
Andrew Bartlett
26bae894f2 vfs: Fix compilation of solaris ACL module
Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-10 18:46:22 +11:00
Ira Cooper
0615f68096 s3: Fix vfs_zfsacl to compile.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:29:51 +11:00
Jeremy Allison
4983d5838a Add uint32_t share_access to vuid_cache_entry.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:48 +11:00
Jeremy Allison
7d90ae123a Clean up struct connection_struct, make struct vuid_cache a pointer not inline.
Change VFS ABI to 31 for 4.1.0.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 15:28:45 +11:00
Andreas Schneider
9631e5b1e4 s3-vfs: Fix a null pointer deferference in vfs_media_harmony.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:01 +01:00
Andreas Schneider
f0454ffb69 s3-vfs: Fix typo in readonly_connect().
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:01 +01:00
Andreas Schneider
4c0b4894d5 vfs: Make sure we don't call talloc_free on an uninitialized pointer.
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2012-12-12 09:42:32 +01:00
Michael Adam
4a8028a96e s3:smbd:vfs_acl: fix a PANIC when setting an ACL fails with ACCESS_DENIED
Omission to free the talloc frame causes a panic (at least in developer mode)
in the next main event loop due to "Frame not freed in order."
(Freed frame ../source3/smbd/process.c:3617, expected ../source3/modules/vfs_acl_common.c:534.)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec  4 09:03:25 CET 2012 on sn-devel-104
2012-12-04 09:03:25 +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
Stefan Metzmacher
d598704834 s3:vfs_aixacl2: make use of vfs_aixacl_util.h
This should fix the build.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-28 12:21:11 +01:00
Christian Ambach
e6a100e86b s3:modules:nfs4_acls remove unused mem_ctx parameter to smbacl4_fill_ace4
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): Sat Nov 17 01:11:07 CET 2012 on sn-devel-104
2012-11-17 01:11:07 +01:00
Christian Ambach
c9d70740e3 s3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl
the ACEs should be talloc children of the ACL itself and not be placed on talloc_tos()

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
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
Stefan Metzmacher
c2ca9e0210 s3:vfs_default: optimize vfswrap_asys_finished() and read as much as we can
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Nov  5 19:01:13 CET 2012 on sn-devel-104
2012-11-05 19:01:13 +01:00
Andrew Bartlett
60cf4cb5a6 vfs_acl_common: In add_directory_inheritable_components allocate on psd as parent
When we add a new DACL to the security descriptor, we need to use the
SD as the memory context, so we can talloc_move() it as a tree to a
new parent.

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): Fri Nov  2 22:16:14 CET 2012 on sn-devel-104
2012-11-02 22:16:14 +01:00
Andrew Bartlett
60a06ff09c vfs: Fix compilation of ACL support on solaris 2012-10-23 09:29:18 +02: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