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

1615 Commits

Author SHA1 Message Date
Volker Lendecke
7d57b8adf2 vfs: Convert xattr_tdb_get_file_id to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:58 -07:00
Volker Lendecke
c1ad69556c vfs: Convert hpuxacl_sys_acl_set_file to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:57 -07:00
Volker Lendecke
855ca77f82 vfs: Convert afsacl_get_nt_acl to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:57 -07:00
Volker Lendecke
fecf225068 vfs: Convert cap_ntimes to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:56 -07:00
Volker Lendecke
acf70b9e06 vfs: Convert cap_unlink to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:56 -07:00
Volker Lendecke
4d3184e96c vfs: Convert cap_rename to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:56 -07:00
Volker Lendecke
fb7afce2d3 vfs: Convert alloc_get_client_smb_fname to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:56 -07:00
Volker Lendecke
e49718111e vfs: Convert catia_ntimes to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:56 -07:00
Volker Lendecke
7d27464172 vfs: Convert catia_unlink to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:56 -07:00
Volker Lendecke
db4bbc0c4f vfs: Convert catia_rename to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
6fffea81ac vfs: Convert recycle_do_touch to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
79e005072e vfs: Convert recycle_get_file_size to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
36bfe54c3b vfs: Convert recycle_file_exists to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
9b875f6244 vfs: Convert streams_xattr_unlink to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
2c733b2ffb vfs: Convert xattr_tdb_unlink to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
e0e5953494 vfs: Convert shadow_copy2_ntimes to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
33037d80d5 vfs: Convert shadow_copy2_unlink to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
19ee070853 vfs: Convert posix_eadb_unlink to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Volker Lendecke
0221f8bb90 vfs: Convert unlink_acl_tdb to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:49:55 -07:00
Jeremy Allison
33478058c7 Remove unneeded initializations (we already talloc_zero).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11 09:49:42 -07:00
Jeremy Allison
353718c3f9 Remove the use of dirfd inside the vfs_dirsort.c.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11 09:49:41 -07:00
Jeremy Allison
6ae58dd153 Convert mtime from a time_t to a struct timespec.
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-11 09:49:41 -07:00
Jeremy Allison
770512e3bd Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11 09:49:41 -07:00
Jeremy Allison
7e437a39ab Clean error paths in opendir and fd_opendir by only setting handle data on 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-11 09:49:41 -07:00
Jeremy Allison
cdcb631912 Protect open_and_sort_dir() from the directory changing size.
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-11 09:49:41 -07:00
Jeremy Allison
53d980bb0e Use an index i rather than re-using a state variable.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11 09:49:41 -07:00
Jeremy Allison
b30697f638 Protect against early error in SMB_VFS_NEXT_READDIR.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11 09:49:41 -07:00
Jeremy Allison
c55eb37114 Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-04-11 09:49:41 -07:00
Volker Lendecke
69b3d19445 vfs_fake_perms: Fix bug 9775, segfault for "artificial" conn_structs
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-10 00:12:06 +02:00
Volker Lendecke
ce2fb2d019 vfs_fake_perms: Slightly streamline code
Don't initialize a variable directly set

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-09 22:20:35 +02:00
Volker Lendecke
60c2953a9d vfs_fake_perms: Slightly streamline code
Do an early error return

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-09 22:20:35 +02:00
Stefan Metzmacher
0d75c90225 s3:modules: fix the build of vfs_notify_fam (bug #9545)
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-04-03 09:53:08 +02:00
Andrew Bartlett
d27f00cd4c vfs-btrfs: Fix build on 32 bit platforms by using long long types
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-24 06:17:55 +01:00
Rusty Russell
c202dc9705 Revert "vfs_btrfs: fix compile on 32-bit platforms."
This reverts commit fd6d0361d6.

Unreviewed, and Andrew has a better fix.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-03-24 13:58:46 +10:30
Rusty Russell
fd6d0361d6 vfs_btrfs: fix compile on 32-bit platforms.
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-23 17:26:57 +10:30
Stefan Metzmacher
1f139ae2d1 s3:waf fix build on AIX
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-21 16:31:19 +01:00
Andrew Bartlett
1ccfaa413a vfs_smb_traffic_analyzer: Cast mode_t to unsigned int for GNU/Solaris build
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-15 10:38:58 -07:00
David Disseldorp
15ce3a9c2f s3-vfs: add vfs_btrfs module
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-09 06:30:21 +01:00
Guenter Kukkukk
93d57dfbaf vfs_catia: add my copyright
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-07 22:24:47 +01:00
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
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
1722074a9b vfs: Remove irixacl module (all the fucntions in it are unimplemented) 2012-10-11 14:52:27 +11:00
Andrew Bartlett
a0588fdea8 vfs: Fix alternative posix and no-op sys acl implementations to take a mem_ctx
These were missed with the initial conversion to use a talloc context.

Andrew Bartlett
2012-10-11 14:45:03 +11:00
Andrew Bartlett
547a260a28 vfs: Improve formatting of vfs_fake_acls
This avoids this bad style being copied into new modules.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Oct 11 05:10:16 CEST 2012 on sn-devel-104
2012-10-11 05:10:16 +02:00
Andrew Bartlett
d07d888ce1 vfs: Improve formatting of vfs_default
This avoids this bad style being copied into new modules.

Andrew Bartlett
2012-10-11 12:25:14 +11:00
Andrew Bartlett
38416ccac3 vfs: Use a blocking function in vfs_zfsacl for system ACL blobs
This is so we do not query some other module for the ACL blob, as zfs
ACLs are not posix ACLs.  We may add a linearisation later.

Andrew Bartlett
2012-10-11 12:25:13 +11:00
Andrew Bartlett
bac3ed2696 vfs: Use posix_sys_acl_blob_get_file in vfs_tru64acl for posix ACLs 2012-10-11 12:25:13 +11:00
Andrew Bartlett
998bdd516a vfs: Use posix_sys_acl_blob_get_file in vfs_solarisacl for posix ACLs 2012-10-11 12:25:13 +11:00
Andrew Bartlett
010e589c29 vfs: Use posix_sys_acl_blob_get_file in vfs_posixacl for posix ACLs 2012-10-11 12:25:13 +11:00
Andrew Bartlett
598b565c63 vfs: Use posix_sys_acl_blob_get_file in vfs_irix for posix ACLs 2012-10-11 12:25:13 +11:00
Andrew Bartlett
4eb0e406f1 vfs: Use posix_sys_acl_blob_get_file in vfs_hpux for posix ACLs 2012-10-11 12:25:13 +11: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
5dddd9429e vfs: Use posix_sys_acl_blob_get_file in vfs_fake_acls for posix ACLs 2012-10-11 12:25:12 +11:00
Andrew Bartlett
76b38f75e9 vfs: Use posix_sys_acl_blob_get_file in vfs_default for posix ACLs 2012-10-11 12:25:12 +11:00
Andrew Bartlett
274ace37fd vfs: Use posix_sys_acl_blob_get_file in vfs_aixacl2 for posix ACLs 2012-10-11 12:25:12 +11:00
Andrew Bartlett
79edc54a94 vfs: Use posix_sys_acl_blob_get_file in vfs_aixacl 2012-10-11 12:25:12 +11:00
Andrew Bartlett
c960a49f42 vfs: Use a blocking function in vfs_afsacl for system ACL blobs
This is important, as we need to avoid asking any lower module for a
possible libear ACL blob.  We may implement a linearisation in the
future.

Andrew Bartlett
2012-10-11 12:25:12 +11:00
Andrew Bartlett
1f36ec1293 vfs: Remove type parameter from sys_acl_blob_get_{fd,file}
This interface actually needs to match the get_nt_acl interface in
that the system ACL implmenetation may not be posix ACLs, and the blob
is not meant to be enforced to be of a particular system ACL
structure.

Andrew Bartlett
2012-10-11 12:25:11 +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
Andrew Bartlett
a4d1f2223a build: Add vfs_media_harmony to the waf build 2012-10-11 12:25:11 +11:00
Volker Lendecke
1c35c22e62 s3: Pass down smb_filename to smbacl4_fill_ace4
A full fsp is a bit overkill here

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct  9 13:38:49 CEST 2012 on sn-devel-104
2012-10-09 13:38:49 +02:00
Björn Baumbach
8da8a2289e s3: vfs_streams_depot: add delete_lost option
With this option lost stream directories will be removed
instead of renamed.

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Oct  1 18:47:30 CEST 2012 on sn-devel-104
2012-10-01 18:47:30 +02:00
David Disseldorp
0d7a2af908 vfs: check full_audit enum->str mapping on startup
Signed-off-by: Jim McDonough <jmcd@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Sep 28 19:28:49 CEST 2012 on sn-devel-104
2012-09-28 19:28:49 +02:00
David Disseldorp
e8e91fbbab vfs: add missing pwrite ops to full_audit
The op enum is used by audit_opname() as an index into the vfs_op_names
array, so any decrepencies cause bogus audit log entries.

Signed-off-by: Jim McDonough <jmcd@samba.org>
2012-09-28 17:44:55 +02:00
Christian Ambach
1947164feb s3:nfs4acls filter away inheritance flags on files
While it is possible to define inheritance flags on files on Windows, this will
be denied by GPFS and UFS (and potentially others).

So it will be better to strip of these bits when being set for files instead of
failing to set the ACL completely (this is current behavior).

Users that want to retain the full SD will have to use acl_xattr (acl_tdb), as
other pieces of the SD are also lost when translating to NFSv4. So this should
not be a too intrusive change, but allow users to migrate data with such flags
instead of failing to migrate the ACL completely.
2012-09-27 04:36:52 +02:00
Christian Ambach
19631e8e7e s3:nfs4acls pass down fsp instead of just the filename 2012-09-27 04:36:52 +02:00
Christian Ambach
0319903b31 s3:vfs_fake_acls fix a compiler warning
about acl being potentially uninitialized

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Sun Sep 23 01:08:39 CEST 2012 on sn-devel-104
2012-09-23 01:08:39 +02:00
David Disseldorp
a125ea7419 vfs: fix acl_blob_get* in vfs_full_audit
Plumb-in functions and use correct return types.

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Sep 20 20:42:09 CEST 2012 on sn-devel-104
2012-09-20 20:42:09 +02:00
David Disseldorp
47becf6e20 vfs: fix lock logging in vfs_full_audit 2012-09-20 19:02:53 +02:00
Christian Ambach
7a61829629 s3:vfs_gpfs: fix build
after recent VFS changes
2012-09-16 11:50:12 -07:00
Björn Jacke
1aa281ecb0 s3: fix the hpux acl module
This was not adopted to the recent VFS acl structure changes.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Sep 14 12:23:23 CEST 2012 on sn-devel-104
2012-09-14 12:23:23 +02:00
Björn Jacke
9222f0f928 s3: fix the tru64 acl module
This was not adopted to the recent VFS acl structure changes.
2012-09-14 10:42:17 +02:00
Björn Jacke
35632eec8e s3: fix the aix acl module
This was not adopted to the recent VFS acl structure changes.
2012-09-14 10:42:17 +02:00
Ira Cooper
5e51f63e86 s3: Fix the vfs_solarisacl module to compile.
This got broken with the recent VFS acl structure changes.

Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Fri Sep 14 05:21:29 CEST 2012 on sn-devel-104
2012-09-14 05:21:29 +02:00
Jeremy Allison
f5a2379794 In vfs modules, don't use 'conn->origpath' when we really mean 'conn->cwd'.
This allows VFS modules to work even when we've changed directory
under the connect path in order to do root-safe calls.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 12 23:45:23 CEST 2012 on sn-devel-104
2012-09-12 23:45:22 +02:00
Andrew Bartlett
e8375ddf2d smbd: Add extra VFS hooks to get the posix ACL as a blob
This will allow us to hash this, rather than the NT ACL it maps to.
This will in turn allow us to know if the NT ACL is valid even if we
have to change the mapping code.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep 12 07:06:01 CEST 2012 on sn-devel-104
2012-09-12 07:06:01 +02:00
Andrew Bartlett
6638d10366 smbd: Remove pre-allocation of ACL array in sys_acl_init()
Instead, this is just handled with realloc in sys_acl_create_entry()

This allows us to remove the size element from the SMB_ACL_T.

Andrew Bartlett
2012-09-12 05:26:16 +02:00
Andrew Bartlett
ac804f0d7f smbd-posix_acls: Use a IDL union to store the ACL entry
This is a clearer, long-term-stable structure we can hash without
risking it changing.

Andrew Bartlett
2012-09-12 05:26:16 +02:00
Andrew Bartlett
33d9a22dcb smbd: Print ACL used to create hash in vfs_xattr_common
This should help us understand why sometimes an ACL set won't stick.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Sep 11 18:19:53 CEST 2012 on sn-devel-104
2012-09-11 18:19:53 +02:00
Christof Schmitt
5765d73f72 s3:vfs/time_audit: Add back pointer for sys_acl_delete_def_file_fn
Commit e25830dcd8 removed the function
pointer from the time_audit module, although the VFS function still
exists. Add the function pointer again in time_audit as this seems
to be an accidentally deletion.

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-09-10 17:58:19 +02:00
Ralph Wuerthner
dc9b622d75 s3:vfs/time_audit: add path names to log messages
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-09-10 17:58:19 +02:00
Björn Jacke
b89d9887e8 s3: fix wrong invocations of talloc_realloc 2012-09-09 15:43:51 +02:00
Michael Adam
eabe4c8fc4 s3:vfs_default: add basic support for durable handle request and reconnect
We only grant durable handles for CIFS/SMB2 only access,
that means "kernel oplocks", "kernel share modes" and "posix locking"
need to be set to "no".

For now we also don't grant durable handles if delete on close
is active on the handle.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
2012-09-08 19:48:20 +02:00
Michael Adam
35260ae89e s3:vfs: add durable VFS operations
This allows a VFS module to implement durable handles in different ways.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-09-08 03:39:06 +02:00
Volker Lendecke
82cffc2bdb s3: Fix 64-bit warnings in vfs_media_harmony 2012-09-06 09:08:57 +02:00
Andrew Bartlett
15e3991b39 build: Remove unused deps from vfs modules
Both these modules are just implemented in terms of other modules.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  5 03:34:08 CEST 2012 on sn-devel-104
2012-09-05 03:34:08 +02:00
Andrew Bartlett
a566404362 build: Remove references to charset modules - we no longer have these 2012-09-04 20:16:49 +10:00
Andrew Bartlett
cac1ebfff6 build: vfs_fake_acls does not need the acl lib 2012-09-04 20:16:49 +10:00
Volker Lendecke
f0a9180ae9 s3: Fix warnings in aio_fork.c 2012-09-01 03:33:21 +02:00
Volker Lendecke
85706c4e16 s3: Fix a few "warning: ISO C90 forbids mixed declarations and code"
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 31 19:24:47 CEST 2012 on sn-devel-104
2012-08-31 19:24:47 +02: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
Björn Jacke
f31d0d0e30 vfs_media_harmony: fix some compile warnings with llvm
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Aug 29 16:05:10 CEST 2012 on sn-devel-104
2012-08-29 16:05:09 +02:00
Andrew Bartlett
f2ccff7b06 s3-vfs: Try to be consistent about localtime vs GMT handling in vfs_shadow_copy2
With the ability to handle times a abolute time_t values since 1970
this becomes more important to get absolutly correct.

Andrew Bartlett
2012-08-28 15:47:37 +10:00
Andrew Bartlett
de209587f9 s3-vfs_shadow_copy2: Also accept a sscanf result 2012-08-28 15:47:03 +10:00
Andrew Bartlett
450fcd79c7 s3-vfs: Remove extra calls to SMB_VFS_HANDLE_GET_DATA
Found by the talloc_stackframe() out of order checker!

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
e79ed4fe72 s3-vfs: Make vfs_aio_fork erratic timing behaviour a run-time option
This will allow this to be tested as part of a normal selftest.

Andrew Bartlett
2012-08-21 11:35:20 +02:00
Andrew Bartlett
4d5471f1c6 build: Remove special case for the build farm
Except in the formatting of the selftest output, this removes the special case
of the build farm, so that an autobuild, a manual make test and the build farm
are more similar.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 06:39:04 CEST 2012 on sn-devel-104
2012-08-21 06:39:04 +02:00
Andrew Bartlett
ae4195dd40 s3-vfs: Add lstat and lchown hooks to the vfs_fake_acls module 2012-08-20 21:58:05 +10:00
Andrew Bartlett
cbe758cfbb s3-vfs: Correct the implementation of fake_acls_sys_acl_delete_def_file() 2012-08-20 21:57:47 +10:00
Andrew Bartlett
6c0bef1756 s3-vfs: Use the system. namespace for fake ACLs
By using the system. namespace, we make sure this is only run on top of a TDB
based ACL store (ie in make test).

Andrew Bartlett
2012-08-20 21:57:47 +10:00
Andrew Bartlett
9699c335fd s3-vfs: Allow vfs_xattr_tdb to work without a connected share
This is needed to that get_nt_acl_no_snum() can work.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Christian Ambach
f46c4dfe28 s3:vfs_tsmsm only send notifications when file was offline before
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Aug 17 20:05:30 CEST 2012 on sn-devel-104
2012-08-17 20:05:30 +02:00
Volker Lendecke
dda4c5d794 s3: Adapt the tsmsm module to the new aio routines
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +02:00
Volker Lendecke
d1e1f8224f s3-vfs: Fix calls of lp_parm_talloc_string
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +02:00
Volker Lendecke
3755a418cc s3: Remove the gpfs_hsm_notify module
The functionality has been merged into vfs_gpfs

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-17 18:25:53 +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
Christof Schmitt
a8b583089b s3:vfs_gpfs: Fix compile error in gpfs module
Fix this compile error by adding fcntl.h as a include that defines F_RDLCK
and F_WRLCK:

modules/gpfs.c: In function ‘set_gpfs_lease’:
modules/gpfs.c:102: error: ‘F_RDLCK’ undeclared (first use in this function)
modules/gpfs.c:102: error: (Each undeclared identifier is reported only once
modules/gpfs.c:102: error: for each function it appears in.)
modules/gpfs.c:105: error: ‘F_WRLCK’ undeclared (first use in this function)
2012-08-16 18:05:21 +02:00
Andrew Bartlett
820d1795d7 s3-vfs: Continue to make vfs_xattr_tdb non-recursive
We now always use _NEXT_ VFS calls, even to build the file id.

Andrew Bartlett
2012-08-16 15:25:38 +10:00
Andrew Bartlett
843e19eff4 s3-vfs: Add new VFS module to fake setting an ACL
The purpose of this module is to remove the relience on the system having ACL support
to test NT ACLs.

Andrew Bartlett
2012-08-16 15:19:17 +10:00
Andrew Bartlett
65976d680a s3-vfs: Set errno in xattr emulation
The caller may check this errno.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 15 18:05:33 CEST 2012 on sn-devel-104
2012-08-15 18:05:33 +02:00
Andrew Bartlett
cc3bdaaf0a s3-vfs: Avoid loops in VFS modules: call _NEXT functions in xattr emulation
We need to call the next module in the stack otherwise we will loop if
the stat call is in turn implemented in terms of extended attribute
lookup.

Andrew Bartlett
2012-08-15 16:28:03 +02:00
Andrew Bartlett
898c5e140d s3-vfs: ensure we strictly free the talloc_stackframe
We must do this when leaving the function or else in development, we
will panic.

Andrew Bartlett
2012-08-15 16:28:03 +02:00
Andrew Bartlett
fd42bc1846 librpc/idl: Make smb_acl_t public so we can pull/push it as a blob 2012-08-15 16:28:03 +02:00
Andrew Bartlett
e25830dcd8 s3-smbd: Remove sys_acl_*() VFS wrapper functions
We no longer do struct smb_acl_t manipuations via the VFS layer,
which is now reduced to handling the get/set functions.

The only backend that implemented these functions (aside from audit)
was the vfs_default module calling the sys_acl code.  The various ACL
implementation modules either worked on the fully initilaised
smb_acl_t object or on NT ACLs.

This not only makes the operation of the posix ACL code more efficient
(as allocation and free is not put via the VFS), it makes it easier to
test and removes the fantasy that a module could safely redefine this
structure or the behaviour here.

The smb_acls.idl now defines the structure, and it is now allocated
with talloc.

These operations were originally added to the VFS in commit
3bb219161a.

Andrew Bartlett
2012-08-15 11:44:50 +10: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
Andrew Bartlett
fe295358df s3-vfs: Put vfs_aixacl_util.c helper functions into a header file
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 14 02:16:11 CEST 2012 on sn-devel-104
2012-08-14 02:16:11 +02:00
Andrew Bartlett
f36e28d131 s3-nfs4acls: Remove lookup_sid and sidmap from NFSv4 ACL mapping and check gid first
By checking just the IDMAP, and by removing the sidmap and lookup_sid calls, we support
IDMAP_BOTH.  This is because by checking for a mapping to a GID first, we can rely on
the fact that IDMAP_BOTH will resolve to a GID.

If the sidmap idea is valued - it allows multiple SIDs to map to a single unix ID, this should
be done in the IDMAP layer.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 11 01:17:36 CEST 2012 on sn-devel-104
2012-08-11 01:17:36 +02:00
Jeremy Allison
b70f23c2b5 Correctly check for errors in strlower_m() returns. 2012-08-09 12:08:18 -07:00
Jeremy Allison
c13887defc Check error returns on strnorm(). 2012-08-09 12:07:32 -07:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Björn Jacke
c2dee12d67 vfs_dirsort: Remove unnecessary return; statement
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Aug  8 02:17:13 CEST 2012 on sn-devel-104
2012-08-08 02:17:13 +02:00
Björn Jacke
375ba1b483 vfs_afsacl.c: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Björn Jacke
ebc92d0715 vfs_full_audit: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Björn Jacke
dab8fe5dea vfs_time_audit: Remove unnecessary return; statement 2012-08-08 00:21:26 +02:00
Björn Jacke
3f9b2cc682 vfs_time_audit: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Volker Lendecke
9adf6a061a vfs-mediaharmony: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Björn Jacke
da4057fdca vfs_media_harmony: fix return of void
caught by the Studio Compiler

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Aug  7 22:22:48 CEST 2012 on sn-devel-104
2012-08-07 22:22:48 +02:00
Andrew Klaassen
9b7b736e5b media_harmony VFS module: Add and build by default.
- Supersedes previous patch.
 - Added various fixes for fake mtime functionality.
 - Now requires lp_cache_locked_write_times patch (bug 8912).
 - Removed various xattr functions to comply with recent VFS changes.
 - Changed SMB_STRUCT_DIR to DIR and SMB_STRUCT_DIRENT to struct dirent to comply with recent VFS changes.
 - Added manpage.
 - Added sample trigger_avid_update.py script.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Aug  7 15:16:39 CEST 2012 on sn-devel-104
2012-08-07 15:16:39 +02:00
Volker Lendecke
4a9b5cce92 config: The AIO engine is indepent of HAVE_AIO now
Compile the basic aio engine always, it works via libasys/pthreadpool_sync
in a sync fashion even if no pthreads are around. Everything else (linux
aio, posix aio, aio fork) is now compiled as modules based on specific
system capabilities

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:53:28 -07:00
Volker Lendecke
d948b1bfee s3: Add aio_fsync to the aio_linux module
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:52:52 -07:00
Volker Lendecke
d6cb302988 s3: Add aio_fsync to the aio_fork module
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:52:16 -07:00
Volker Lendecke
38dd5b24bb s3-aio-fork: make "read_cmd" an enum
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:51:53 -07:00
Volker Lendecke
e3f3c09504 s3: Add aio_fsync to the aio_posix module
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:51:43 -07:00
Volker Lendecke
5d09cec6fe s3-vfs: async fsync
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:48:04 -07:00
Volker Lendecke
c4efaabbd9 s3: Move the aio_pthread read/write functionality to vfs_default
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:46:29 -07:00
Volker Lendecke
9dc78c90f3 s3-aio: Remove unused VFS functions and more
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:58 -07:00
Volker Lendecke
be05dad399 s3-vfs: Add pwrite_send/recv to vfs modules
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:14 -07:00
Volker Lendecke
90461aa023 s3-vfs: Add pread_send/recv to vfs modules
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:44:53 -07:00
Volker Lendecke
466839878a s3: Convert aio_linux to pread/pwrite_send/recv
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:43:17 -07:00
Volker Lendecke
9e1c873a9e s3: Convert aio_fork to pread/pwrite_send/recv
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:42:22 -07:00
Volker Lendecke
bf8696fe5d s3-aio_fork: Convert get_idle_child from NTSTATUS to errno
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:42:11 -07:00
Volker Lendecke
b65ab9d5a3 s3-aio_fork: Convert create_aio_child from NTSTATUS to errno
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:42:00 -07:00
Volker Lendecke
ff701ceae2 s3: Add vfs_aio_posix
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:41:36 -07:00
Volker Lendecke
f9df073a31 s3: Make smbd/aio.c not depend on aio.h anymore
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:40:35 -07:00
Volker Lendecke
715653a335 s3:vfs_aio_pthread: Convert to libasys
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:40:01 -07:00
Volker Lendecke
e24aed15fa s3-vfs: async pread
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:11:56 -07:00
Volker Lendecke
c6e456d9c0 s3-vfs: async pwrite
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 13:49:21 -07:00
Alexander Werth
24f7085e4f s3:Really ignore unknown special ids in NFSv4 ACLs.
Signed-off-by: Christian Ambach <ambi@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Jul 18 17:45:05 CEST 2012 on sn-devel-104
2012-07-18 17:45:05 +02:00
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Rusty Russell
bdc59fb538 source3/modules/vfs_xattr_tdb.c: fix stackframe leak
xattr_tdb_getxattr() doesn't free its stackframe.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:03:31 +09:30
Volker Lendecke
d1a5a5bc80 s3-linux-aio: Fix error handling
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 17 21:22:31 CEST 2012 on sn-devel-104
2012-07-17 21:22:31 +02:00
Jeremy Allison
254e8c46c4 Add debug message when SD hash doesn't match. 2012-07-17 10:04:03 -07:00
Jeremy Allison
5a9ce8b94a Use HAVE_FSYNC, we bothered to test for it.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 13 04:44:42 CEST 2012 on sn-devel-104
2012-07-13 04:44:42 +02:00
Jeremy Allison
e454681276 Linux-specific optimization in aio_open code.
Use initial_allocation_size to allocate on disk if sent. Ignore
failures (upper level will cope).

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 13 00:35:48 CEST 2012 on sn-devel-104
2012-07-13 00:35:47 +02:00
Jeremy Allison
cb405947ca Add an optimization to pthread aio writes to also do fsync if requested.
Should help by ensuring complete writes done in sub-thread, not in
the main thread.
2012-07-12 22:46:07 +02:00
Björn Jacke
b865cddee7 s3: make log message of FSCTL_IS_VOLUME_DIRTY more clear 2012-07-12 12:47:30 +02: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
Jeremy Allison
8ee30be431 Add in the threaded async open engine.
Fixes all issues raised originally. This code
will only do threaded opens with thread-specific
credentials (Linux for now) and changes credentials
before doing the call. Also only fires on O_CREAT|O_EXCL
so will only create new files, never open old ones
async.

Volker, this is isolated enough that it shouldn't
prevent you from refactoring it into a new module
when the aio pread/pwrite code is moved into the
default aio path.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 11 08:04:56 CEST 2012 on sn-devel-104
2012-07-11 08:04:56 +02:00
Jeremy Allison
ed8525265d Allow init_aio_threadpool() to be setup for different threadpool handles with different completion functions. 2012-07-03 15:34:22 -07:00
Andrew Bartlett
666dba3353 s3-param: Rename loadparm_s3_context -> loadparm_s3_helpers
This helps clarify the role of this structure and wrapper function.

The purpose here is to provide helper functions to the lib/param
loadparm_context that point back at the s3 lp_ functions.  This allows
a struct loadparm_context to be passed to any point in the code, and
always refer to the correct loadparm system.  If this has not been
set, the variables loaded in the lib/param code will be returned.

As requested by Michael Adam.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
2012-06-27 17:11:16 +02:00
Volker Lendecke
754b925ccd s3: Fix a typo
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 25 17:13:59 CEST 2012 on sn-devel-104
2012-06-25 17:13:59 +02:00
Volker Lendecke
c0936663a8 s3: Avoid a call to server_event_context()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-25 15:28:16 +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
Jeremy Allison
dd763d6d8e Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
Based on a fix from "Etienne Dechamps " <e-t172@akegroup.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 21 21:53:58 CEST 2012 on sn-devel-104
2012-06-21 21:53:58 +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
Michael Adam
eae8740ebe s3:vfs_default: use fsp_fnum_dbg() for fsp->fnum logging.
Note: it is actually wrong to access the fsp->fnum at all here,
since the fnum is part of the smb layer that should not be used
in the vfs layer. But this is subject be separated more cleanly
in later commits. This change only unifies the logging of fsp->fnum.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15 03:28:14 +02:00
Michael Adam
21a36aa2e8 s3:vfs:scannedonly: fix use of non-existent word (existant) 2012-06-12 07:21:43 +02:00
Volker Lendecke
fac6191f3c s3: Make vfswrap_audit_file static
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun 12 02:26:31 CEST 2012 on sn-devel-104
2012-06-12 02:26:30 +02:00
Volker Lendecke
2e77833641 s3: Fix Coverity ID 703870 Uninitialized scalar variable
According to man 2 recvmsg this might be unnecessary, but it does
not hurt either

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11 14:54:38 -07:00
Volker Lendecke
386be83cbd s3: Save errno around a TALLOC_FREE
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11 14:54:37 -07:00
Volker Lendecke
100421844c s3: Fix Coverity ID 703871 Unused pointer value
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11 14:54:37 -07:00
Stefan Metzmacher
7bc328dcb0 s3:modules: we don't need smbd/proto.h in vfs_shadow_copy2.c
metze
2012-06-06 10:18:39 +02:00
Andrew Bartlett
c290cdb934 lib/replace: xattr wrappers in lib/replace rather than source3/lib/system.c
This also moves all the still-used configure tests etc.  The unused OSF API
is also removed at this time.

Andrew Bartlett
2012-06-02 02:13:49 +02:00
Volker Lendecke
97a4901d6c s3: Same fix as 8576256, this time for fgetxattr
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jun  2 02:12:31 CEST 2012 on sn-devel-104
2012-06-02 02:12:31 +02:00
Stefan Metzmacher
2ea963b260 s3:vfs_hpuxacl: remove unused file_find_fd() calls
metze
2012-05-31 14:18:05 +02:00
Stefan Metzmacher
758d61201f s3:smbd/msdfs: pass 'allow_broken_path' to get_referred_path()
Note the DCERPC code should not be smb2 specific!

I wonder why this is at all smb2 specific...

metze
2012-05-24 14:12:32 +02:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Volker Lendecke
8576256738 s3: Fix vfs_xattr_tdb.c
"size" is the maximum buffer, only copy what we actually got. For me, this
fixes valgrind errors in the DIR1 test that might potentially make DIR1
non-flaky again.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon May 21 22:10:15 CEST 2012 on sn-devel-104
2012-05-21 22:10:15 +02:00
Richard Sharpe
632af66453 Check the return from create_acl_blob
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Thu May 17 07:17:29 CEST 2012 on sn-devel-104
2012-05-17 07:17:29 +02:00
Stefan Metzmacher
70be41c772 s3:onefs: remove all onefs related code as it not maintained anymore
See https://lists.samba.org/archive/samba-technical/2012-May/083631.html
for the discussion.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 16 11:23:05 CEST 2012 on sn-devel-104
2012-05-16 11:23:04 +02:00
Richard Sharpe
bfe4a2baee Fix the overwriting of errno before use in a DEBUG statement and use the return value from store_acl_blob_fsp rather than ignoring it.
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Wed May 16 03:43:41 CEST 2012 on sn-devel-104
2012-05-16 03:43:40 +02:00
Andrew Bartlett
9ef47b8fe3 s3-vfs: Show the invalid ACL when we say it is invalid for set 2012-05-09 04:21:05 +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
Christian Ambach
2ae02efabd s3:vfs/shadow_copy2 fix some compiler warnings
about unused variables

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue May  8 11:15:07 CEST 2012 on sn-devel-104
2012-05-08 11:15:07 +02:00
Christian Ambach
617b63658b s3:vfs/shadow_copy2 make descending sort order the default
otherwise Explorer won't work correctly when trying to restore a folder
2012-05-08 09:26:07 +02:00
Richard Sharpe
0dc3f423d2 Add an audit file VFS routine so we can handle auditing with SACLs.
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Sat Apr 28 08:05:00 CEST 2012 on sn-devel-104
2012-04-28 08:05:00 +02:00
Volker Lendecke
0b1f3aea27 s3: Fix Coverity ID 2682: NULL_RETURNS 2012-04-19 17:37:39 +02:00
Andrew Bartlett
84ad848c86 s3-xattr_tdb: Remove dead code: talloc_stackframe() cannot fail
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 19 14:15:42 CEST 2012 on sn-devel-104
2012-04-19 14:15:41 +02:00
Andrew Bartlett
492942a66a s3-xattr_tdb: Be nice to xattr_tdb_getxattr callers, return the full blob
In this case, the blob is already in memory, so it is easier to return the full
blob to the caller, and let the caller decide if some interface restriction
stops the full blob from being passed all the way up the stack.

This allows us to quickly write a python wrapper for this xattr storage
mechanism.

Andrew Bartlett
2012-04-18 12:05:00 +10:00
Andrew Bartlett
351c78fc67 s3-xattr_tdb: make xattr_tdb a private library, for use outside vfs_xattr_tdb 2012-04-18 12:05:00 +10:00
Jeremy Allison
fd38486364 Fix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED. 2012-04-12 15:06:59 -07:00
Jeremy Allison
80a4e38d64 Fix the same bug reported by Kirill Malkin <kirill.malkin@starboardstorage.com> and
fixed by Volker for vfs_aio_fork as ref 0aacdbfada.

From that change:

    aio_suspend does not signal the main process with a signal, it just waits. The
    aio_fork module does not use the signal at all, it directly calls back into the
    main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction
    violation, but the alternative would have been to use signals where they are
    not needed. However, in wait_for_aio_completion this bites us: With aio_fork we
    call handle_aio_completed twice on the same aio_ex struct: Once from the call
    to handle_aio_completion within the aio_fork module and once from the code in
    wait_for_aio_completion.

Fix this differently here by not calling directly back into smbd,
but using a new function aio_linux_setup_returns() to setup the
return values that wait_for_aio_completion() in the main smbd
will pick up by calling handle_aio_completd().
2012-04-12 15:06:58 -07:00
Volker Lendecke
f6328b14c8 s3: Fix a typo
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 12 23:38:24 CEST 2012 on sn-devel-104
2012-04-12 23:38:23 +02:00
Jeremy Allison
e02a788f60 Simplify the logic around doing an immediate event reschedule.
We don't need to do a talloc here, we already have a long-lived
pointer we can pass in as the private data.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 11 08:05:47 CEST 2012 on sn-devel-104
2012-04-11 08:05:47 +02:00
Andrew Bartlett
f7d60899d6 build: Add tevent deps for users of tevent calls
This isn't strictly required - this isn't a build break at the moment,
but is a good practice to directly depend on the major libraries we
use, and helps us to have more fine-grained rather than global
dependencies.

Andrew Bartlett
2012-04-11 02:30:39 +02:00
Jeremy Allison
fe707f6549 Add a new module, aio_linux which implements Linux kernel aio support. Docs to follow.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 11 02:29:04 CEST 2012 on sn-devel-104
2012-04-11 02:29:04 +02:00