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

97071 Commits

Author SHA1 Message Date
Jeremy Allison
a199214dfb s3: leases: libsmbsharemodes no longer works with SMB2 leases inside our locking.tdb.
Remove it until a maintainer can be found.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:09 +01:00
Volker Lendecke
498e7220c5 s3:smb2_server: add smbd_smb2_send_lease_break() helper function
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:09 +01:00
Stefan Metzmacher
a9a39953c7 s3:smb2_server: allow smbd_smb2_send_break() with session == NULL and tcon == NULL
In future we want to use this for lease breaks and they're not attached
to a session.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-04 05:45:09 +01:00
Jeremy Allison
c22d521d26 s3:smbd: Add fsp_client_guid() utility function to return the connected client guid.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:09 +01:00
Volker Lendecke
e761c80f65 s3:smbd: factor out a send_break_to_none() helper function
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:09 +01:00
Stefan Metzmacher
8c323f20dc s4:torture:smb2: let smb2.lease.[v2_]complex1 check the R->NONE breaks
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-04 05:45:09 +01:00
Jeremy Allison
99f9eee657 s4:torture:smb2: Add smb2.lease.v2_breaking3 test.
This verifies the epoch handling in the multi step break.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:09 +01:00
Jeremy Allison
c5b481a8d5 s4:torture:smb2: Add test that shows the client can respond to a lease break over a different connection.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:09 +01:00
Günther Deschner
78b7db1814 pam_winbind: fix warn_pwd_expire implementation.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9056

warn_pwd_expire parameter is not working as documented in pam_winbind manual
page. This patch adds missing bit and allows disabling warning message fully,
i.e. setting warn time to zero days.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec  3 21:36:49 CET 2014 on sn-devel-104
2014-12-03 21:36:49 +01:00
Stefan Metzmacher
816751a3a8 s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()
Change-Id: I40bcfacb812b0dac7917533c9baf82a79f598efd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Dec  3 06:44:29 CET 2014 on sn-devel-104
2014-12-03 06:44:29 +01:00
Garming Sam
3b76b705f0 pdb: Increase version number to fix ABI
In the process, we can also rename pdb to avoid conflicts with libpdb.

We don't depend directly on pdb to avoid duplicate symbols.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10355
Change-Id: I4df6ba2f4ce35d3718dc4198b527cca46a139efe
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-03 04:21:09 +01:00
Garming Sam
58b343be47 idmap: return the correct id type to *id_to_sid methods
We have a pointer to a unixid which is sent down instead of a uid or
gid. We can use this as an in-out variable so that pdb_samba_dsdb can be
returned ID_TYPE_BOTH to cache correctly instead of leaving it as
ID_TYPE_UID or ID_TYPE_GID.

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

Change-Id: I0cef2e419cbb337531244b7b41c708cf2ab883e3
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-03 04:21:09 +01:00
Garming Sam
7979c6cc50 idmap: unify passdb *id_to_sid methods
Instead of passing down gid or uid, a pointer to a unixid is now sent
down. This acts as an in-out variable so that the idmap functions can
correctly receive ID_TYPE_BOTH, filling in cache details correctly
rather than forcing the cache to store ID_TYPE_UID or ID_TYPE_GID.

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

Change-Id: I11409a0f498e61a3c0a6ae606dd7af1135e6b066
Pair-programmed-with: Andrew Bartlett <abarlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-03 04:21:09 +01:00
Christian Ambach
3b90bfb108 s3:utils/profiles fix a use after free
path is a talloc-child of subkeys, so subkeys should not be freed before calling
verbose_output

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Dec  3 00:43:19 CET 2014 on sn-devel-104
2014-12-03 00:43:19 +01:00
Christian Ambach
4b41489901 s3:registry/regfio fix some valgrind warnings
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-02 22:21:06 +01:00
Christian Ambach
217a0189c1 s3:registry/regfio read SD from the correct location
try to find the security descriptor at the data pointer, not at the beginning of the hbin

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9629

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-02 22:21:06 +01:00
Andreas Schneider
8c41795c81 s3-libsmb: Duplicate the memory before we free it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Dec  2 21:46:53 CET 2014 on sn-devel-104
2014-12-02 21:46:53 +01:00
Andreas Schneider
206f25d815 s3-libsmb: Set the netbios_name in use_ccache case too.
If we do not set the netbios_name we are not able to connect to a
Windows DC.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-12-02 19:23:05 +01:00
Andreas Schneider
1e148a91fd s3-lib: Do not require a password with --use-ccache.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-12-02 19:23:05 +01:00
Stefan Metzmacher
1e32ada8ec tdb: version 1.3.3
This fixes the tdb1-run-mutex-openflags2 test when robust mutexes are available.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec  2 11:54:28 CET 2014 on sn-devel-104
2014-12-02 11:54:28 +01:00
Stefan Metzmacher
6244346c11 tdb/test: TDB_CLEAR_IF_FIRST | TDB_MUTEX_LOCKING, O_RDONLY is a valid combination
This used to be invalid in the early developement code, but now we're
able to open a tdb with mutex area and TDB_NOLOCK without problems.
O_RDONLY implies TDB_NOLOCK...

This should have been part of commit c8d05e934e.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-12-02 09:31:08 +01:00
Daniel Cotton
87d39a8204 Minor spelling correction in samba-tool domain
Signed-Off-By: Daniel Cotton <danielcotton.patches at gmail.com>
Reviewed-By: Michael Adam <obnox@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Tue Dec  2 01:18:53 CET 2014 on sn-devel-104
2014-12-02 01:18:53 +01:00
Jelmer Vernooij
7dbc58f524 Reduce number of places where sys.path is (possibly) updated for external module paths.
Change-Id: I69d060f27ea090d14405e884d1ce271975358c56
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sun Nov 30 20:54:04 CET 2014 on sn-devel-104
2014-11-30 20:54:03 +01:00
Jelmer Vernooij
4323504921 Don't assume st/subunit being present means it was generated by the current process.
This fixes --list.

Change-Id: I75fc765757e06861cf3bb489246e0845564a1123
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 18:31:08 +01:00
Jelmer Vernooij
02e063bd5b Be consistent about what functions add $LISTOPT and $LOADLIST to the command-line.
Change-Id: Ife86624b53a99d48ce9f00d146b14f798c9bdb24
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sun Nov 30 16:43:52 CET 2014 on sn-devel-104
2014-11-30 16:43:52 +01:00
Jelmer Vernooij
0f408599f8 selftest: Add separate command line for listing tests, allowing us of subunit-filter (which doesn't support subunit v2).
Change-Id: Icb877214a422c63fd38ef92425c7b4fe7ee19ad5
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Jelmer Vernooij
c3855dae71 selftest/tests.py: Remove testsuite samba.tests.samdb which does not have any tests.
Change-Id: I8edcf73aa4a9b61c6e5c7cfb592a4692d4030a29
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Jelmer Vernooij
afe94aa535 Re-use add_prefix function.
Change-Id: I6e91bc9fc6714c147427e920ca0e3e22cb9a076b
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Jelmer Vernooij
f6e3cd7f03 selftest: Drop support for TESTSUITE-IDLIST, and remove its last user.
Change-Id: Ic616676bb770fa4769195d73c4309915646caae0
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-11-30 14:22:05 +01:00
Stefan Metzmacher
13a1406fa1 ldb: version 1.1.18
This release contains:

- fixes for segfaults in pyldb
- documentation fixes
- build system improvements

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Nov 29 14:45:56 CET 2014 on sn-devel-104
2014-11-29 14:45:56 +01:00
Stefan Metzmacher
e6c766848c tdb: version 1.3.2
The following bugs are fixed with this release:

- Bug 10625 - tdb.h missing include of stdbool.h
- Bug 10781 - smbstatus: locking.tdb - TDB_MUTEX_LOCKING requires TDB_CLEAR_IF_FIRST
- Bug 10968 - tdb mutex runtime test clobbers stdout

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10625
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10968

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-11-29 12:24:05 +01:00
Günther Deschner
373d58c91d s3-libads: remove unused dn from ads_get_service_principal_names().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Nov 28 16:46:20 CET 2014 on sn-devel-104
2014-11-28 16:46:20 +01:00
Andreas Schneider
8ce7904abd ntdb: Fix control reaches end of non-void function.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-11-28 14:24:07 +01:00
Volker Lendecke
574750777a torture: Fix raw.open.chained-openx
sizeof(buf) is 5. On FreeBSD10/clang this overwrites "ret". Not good.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Nov 28 13:30:18 CET 2014 on sn-devel-104
2014-11-28 13:30:18 +01:00
Volker Lendecke
3121d6adea test: Fix samba3.blackbox.net.registry.check
On FreeBSD, "wc -l" returns whitespace. Cope with that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Nov 28 10:24:06 CET 2014 on sn-devel-104
2014-11-28 10:24:05 +01:00
Garming Sam
907094c7fa param: fix testparm to show hidden share defaults
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10864
Change-Id: I16710f70a3cbaeadf7adf139441dd2b017ef81ee
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Fri Nov 28 07:54:54 CET 2014 on sn-devel-104
2014-11-28 07:54:54 +01:00
Volker Lendecke
f9acb949cc messaging4: Fix types
According to python docs, PyArg_ParseTuple takes "int" and "unsigned
long long". With pointers down to functions, in particular with
varargs, there is no automatic conversion. So we need to be very
strict about types. Automatic conversion to for example uint64_t
happes only with assignment.

This fixes a crash on FreeBSD10/clang.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov 27 21:32:18 CET 2014 on sn-devel-104
2014-11-27 21:32:18 +01:00
Jeremy Allison
c6a5eab369 s4: torture: leases - Add test for leases and blocking locks.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Nov 27 19:08:24 CET 2014 on sn-devel-104
2014-11-27 19:08:24 +01:00
Jeremy Allison
62c6c79011 s4: smb2 : torture: Add new dynamic_share leases test.
Depends on new share "dynamic_share" being set up containing an %R
in the path= statement.

Shows we will break leases and fail to grant new ones
if we get a lease_key+client guid pair match on files
with different fileid's, as can happen on dynamic shares.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-11-27 16:45:06 +01:00
Jeremy Allison
f76c7c7404 s3: leases - torture test for timeout of responding to lease break request.
Passes against W2K12.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
ea25f0d32a s4:torture/smb2: smb2.lease.breaking6 test
The client is allowed to downgrade a lease to a lower value
than required.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
6494597c04 s4:torture/smb2: smb2.lease.breaking5 test
This is like breaking4, but with an initial "R" lease instead
of "RH".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
b3a985ab66 s4:torture/smb2: smb2.lease.breaking4 test
This demonstrates that a confliciting open with NTCREATEX_DISP_OVERWRITE
isn't delayed by a "RH" lease, even if a lease is in 'breaking' mode.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
8d16a2e367 s4:torture/smb2: smb2.lease.breaking3 test
This demonstrates a race case where the client reuses a lease,
while the server already sent a break.

The open succeeds with SMB2_LEASE_FLAG_BREAK_IN_PROGRESS being set.

This is more complex that smb2.lease.breaking[1-2] as it generates breaks
from RWH => RH => R => NONE.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
5a652dbb92 s4:torture/smb2: smb2.lease.breaking2 test
This demonstrates that a conflicting open with NTCREATEX_DISP_OVERWRITE
breaks a lease to NONE.

It also shows which error codes are generated for unexpected lease break acks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
a7a59b16a4 s4:torture/smb2: smb2.lease.breaking1 test
This demonstrates a race case where the client reuses a lease,
while the server already sent a break.

The open succeeds with SMB2_LEASE_FLAG_BREAK_IN_PROGRESS being set.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
0c239d3209 s4:torture/smb2: make it possible to skip the automatic ack of lease breaks.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:06 +01:00
Stefan Metzmacher
c18c84ca6c s4:torture/smb2: add smb2.lease.v2_epoch[2|3] tests
They demonstrate that the lease version (v1 or v2) is selected
by the first open. All following opens using the other version
still get the lease version of the first open.

This implies that the server has to remember the lease version
more globaly.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:05 +01:00
Stefan Metzmacher
45c98b8069 s4:torture/smb2: add smb2.lease.[v2_]complex1 tests
These tests verify the lease state is consistent between two connections
with the same client_guid.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:05 +01:00
Stefan Metzmacher
90c886e965 s4:torture/smb2: pass the expected flags to CHECK_LEASE()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:05 +01:00