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

101993 Commits

Author SHA1 Message Date
Alberto Maria Fiaschi
5036a0922b access based share enum: handle permission set in configuration files
change function is_enumeration_allowed to check  permissions set by
fields: valid users, invalid users, only user.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=8093

Signed-off-by: Alberto Maria Fiaschi <alberto.fiaschi@estar.toscana.it>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-03-02 20:39:24 +01:00
Michael Adam
f24567e9fd torture:smb2: skip replay4 if server does not support multi-channel
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Mar  2 20:38:49 CET 2016 on sn-devel-144
2016-03-02 20:38:49 +01:00
Michael Adam
04265199b3 smbd: fix crash in smbXsrv_client_global_remove()
Probably copy-n-paste error.
Uncovered by the multi-channel-related tests we're
currently writing to exercise this code more.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-03-02 17:26:09 +01:00
Jeremy Allison
a5f441dc71 vfs:zfs fix build after get_nt_acl_fn signature change.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Mar  2 10:50:58 CET 2016 on sn-devel-144
2016-03-02 10:50:58 +01:00
Michael Adam
ae2083e1cc vfs:glusterfs: fix build after opendir signature change
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar  2 04:34:15 CET 2016 on sn-devel-144
2016-03-02 04:34:14 +01:00
Michael Adam
55405871b9 vfs:ceph: fix build after opendir signature change.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
7054217a79 vfs/time_audit: use duration we get from the async backend
Finally! The previous commits changed the VFS and the async backend to
pass the duration of an aync operation up the stack.

We now can use this value instead of doing our own sampling which avoids
the following problem:

1. SMB2 read request received, added to the async queue

2. SMB2 create_file request comes in, is processed and blocks for N
   seconds in open()

3. async read completes in the dispatcher thread, completion callback
   will be called when we enter the main tevent loop

4. open() completes after N seconds

5. main tevent event loop is entered, async results are processed

6. async read result is processed, time sampling will include the N
   seconds blocked in open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
d8f71a43c3 vfs/glusterfs: measure libglusterfs aio function call duration
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
1e2d8d2c37 vfs/aio_linux: measure libaio aio function call duration
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
c3892aa705 vfs/aio_fork: measure async request syscall duration
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
fd85ee43e7 vfs/default: store async VFS op duration we got from libasys
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
0ea6a070c4 s3:lib/asys: measure async request syscall duration
This uses time functions from lib/util/ which requires pulling in
samba-util. This sucks, but there's just no way of rewrapping a minimal
time utility library without modifying the public samba-util.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:14 +01:00
Ralph Boehme
9892809233 s3/vfs: add duration to vfs_aio_state
This will be used in the aio backends to pass the competion time of the
async request in the backend.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:13 +01:00
Ralph Boehme
3884a66e17 s3/vfs: wrap async io function args inside struct vfs_aio_state
Subsequent commits that are going to track aio request duration in the
aio backends will use this.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-03-02 01:22:13 +01:00
Volker Lendecke
6af7ebf336 passdb: Avoid a "ret == true"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Mar  2 01:04:14 CET 2016 on sn-devel-144
2016-03-02 01:04:14 +01:00
Michael Adam
bebd35f439 netlogon_creds_cli: use dbwrap_purge instead of dbwrap_delete where appropriate
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-03-01 21:50:24 +01:00
Michael Adam
8f158bab9f s3:registry: use dbwrap_purge_bystring instead of dbwrap_delete_bystring
where appropriate

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-03-01 21:50:24 +01:00
Michael Adam
366b51a8ff dbwrap: add dbwrap_purge[_bystring]
Variants of dbrwap_delete[_bysrting] that treats NOT FOUND
as success.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-03-01 21:50:24 +01:00
Michael Adam
d4408c495b dbwrap_util: improve a debug message in dbwrap_delete_action()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-03-01 21:50:23 +01:00
Volker Lendecke
1570ae0761 lib: Fix 1354521 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Mar  1 21:49:44 CET 2016 on sn-devel-144
2016-03-01 21:49:44 +01:00
Volker Lendecke
801b1ada51 ntvfs: Fix CID 1354522 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-01 18:35:20 +01:00
Jeremy Allison
247481c12c s3: smbd: Change dptr_create() to take a const struct smb_filename * instead of const char *.
Also internally change path storage inside struct dptr_struct
to a struct smb_filename *.

This allows me to remove several of the synthetic_smb_fname()
calls I had to add in the previous patches, as we're now
dealing with struct smb_filename * throughout the dptr and
OpenDir code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Mar  1 18:34:24 CET 2016 on sn-devel-144
2016-03-01 18:34:24 +01:00
Jeremy Allison
66ce80c6d9 s3: smbd: In call_trans2findfirst() all use of ctx is really talloc_tos().
Use talloc_tos() explicitly to make this clear. Will help make the next
commit clearer.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-01 15:25:22 +01:00
Jeremy Allison
3203eb66d9 s3: smbd: Change OpenDir() to take a struct smb_filename *, not a char *.
Enhances plumbing to remove lp_posix_pathnames() later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-01 15:25:22 +01:00
Jeremy Allison
852cce9930 s3: smbd: Change the internals of the private struct smb_Dir.
Store a struct smb_filename *, not a char *. This will
allow us to change the interface to OpenDir() in the next
commit to pass in a struct smb_filename *, not a char *.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-01 15:25:22 +01:00
Jeremy Allison
c74ae37fe6 VFS: Modify opendir to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().

Uses the same techniques as commit 616d068f0c
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-03-01 15:25:22 +01:00
Uri Simchoni
fb4778f4e9 passdb: add linefeed to debug message
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11763

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar  1 15:24:35 CET 2016 on sn-devel-144
2016-03-01 15:24:35 +01:00
Aurelien Aptel
f2675909d3 s3/passdb/py_passdb.c: free frame before returning
these talloc frames are freed *after* the return instruction and are
never executed. this fixes potential memory leaks.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Mar  1 12:08:40 CET 2016 on sn-devel-144
2016-03-01 12:08:40 +01:00
Martin Schwenke
27cf686bb4 ctdb-tests: Override local daemon configuration from the environment
Anything starting with CTDB_ is appended to each node's configuration
file.

This is made slightly more difficult because the "env" command doesn't
necessarily quote values for consumption by the shell.  The strategy
used here is a bit fragile (assumes double-quotes, no nested quotes)
but this is test code and only developers are expected to use this
override.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Mar  1 08:56:09 CET 2016 on sn-devel-144
2016-03-01 08:56:08 +01:00
Martin Schwenke
6e259ca01f ctdb-tests: Change local daemon startup to use ctdbd_wrapper
This uses a configuration file which can be more easily overridden
that explicit command-line options.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-03-01 05:43:19 +01:00
Martin Schwenke
c8bb1711f5 ctdb-tests: Simplify handling of public addresses for local daemons
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-03-01 05:43:19 +01:00
Martin Schwenke
6fa25f9502 ctdb-scripts: Allow configuration file to be overridden
For testing only (so not documented), set CTDBD_CONF.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-03-01 05:43:19 +01:00
Martin Schwenke
e318babace lib/util: Add strv_util.[ch] containing new function strv_split()
strv_split() adds to a strv by splitting a string on separators.

Tests included.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-03-01 05:43:19 +01:00
Steven Chamberlain
d692020c1a ctdb: Fix detection of gnukfreebsd
GNU/kFreeBSD's platform name is 'gnukfreebsd', not just 'kfreebsd'.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Mar  1 05:42:23 CET 2016 on sn-devel-144
2016-03-01 05:42:22 +01:00
Aurelien Aptel
2bd28d23fd lib/util/util.c: move null-check before use
moves a null pointer check *before* the pointer is used in
the strlen() call

- still allocate the `fname` array on the stack
- still compiles under C90 definition/code mixing rules

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar  1 02:25:22 CET 2016 on sn-devel-144
2016-03-01 02:25:22 +01:00
Michael Adam
6d00855672 torture:smb2: fix skip message if share is not CA
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-29 23:10:15 +01:00
Michael Adam
cd3ee2a2aa torture:smb2: skip replay5 test if server does not support persistent handles
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-29 23:10:14 +01:00
Michael Adam
95835b9280 torture:smb2: skip replay3 if server does not support Multi-Channel
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-29 23:10:14 +01:00
Martin Schwenke
7105e171f0 lib/util: Add tests for strv_addn()
Also some other minor test cleanups.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Feb 29 15:18:17 CET 2016 on sn-devel-144
2016-02-29 15:18:17 +01:00
Volker Lendecke
0133ed4c22 lib/util: Add strv_addn()
strv_addn() adds some number of characters from an existing string.
This is useful for parsing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-02-29 11:55:23 +01:00
Martin Schwenke
049e47b443 Revert "lib/util: Expose strv_addn() for adding string with specified length"
This reverts commit 0c61dd1513.

The intention of strv_addn() is to be able to add some number of
characters from an existing string.  This implementation carelessly
assumes that the old _strv_append() added the trailing NUL to form a
valid strv.  That's not true.

New implementation to follow.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-02-29 11:55:23 +01:00
Michael Adam
abd8b18244 smbd:smb2_creat: remove outdated TODO comments
Leases have meanwhile been implemented and the
TODO has been taken care of.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Feb 28 08:16:26 CET 2016 on sn-devel-144
2016-02-28 08:16:26 +01:00
Michael Adam
0fe29f6632 smbXsrv_client: factor fetch-locking of global record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-28 05:03:22 +01:00
Michael Adam
aaddde12d9 smbXsrv_session: factor fetch-locking of local record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-28 05:03:22 +01:00
Michael Adam
37eba9006e smbXsrv_session: factor fetch-locking of global record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-28 05:03:22 +01:00
Michael Adam
a9dcbd0980 smbXsrv_tcon: factor fetch-locking of local record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-28 05:03:22 +01:00
Michael Adam
a5e4f14c3b smbXsrv_tcon: factor fetch-locking of global record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-28 05:03:22 +01:00
Aurelien Aptel
9dfd531c19 s3/libsmb/clirap2.c: use actual buffer size
data used to be a stack allocated array but was changed to a heap
allocated buffer by commit 95a81a3. Update sizeof(data) to data_size.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 27 05:25:40 CET 2016 on sn-devel-144
2016-02-27 05:25:40 +01:00
Michael Adam
bba426dbbb smbXsrv_open: factor fetch-locking of local record into function
smbXsrv_open_local_fetch_locked()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 26 22:35:28 CET 2016 on sn-devel-144
2016-02-26 22:35:28 +01:00
Michael Adam
7b8cfa1cbc smbXsrv_open: factor fetch-locking of global record into function
smbXsrv_open_global_fetch_locked()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-02-26 19:27:08 +01:00