1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

101706 Commits

Author SHA1 Message Date
Michael Adam
b59ff11731 torture:smb2:replay: extend CHECK_CREATE_OUT() to know leases
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 6eac2ae984c244d9e92876bf29a18a3807352277)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:14 +01:00
Michael Adam
1efc89da06 torture:smb2: split rename2 into multiple tests and extend these
- replay-regular
- replay-dhv2-oplock1
- replay-dhv2-oplock2
- replay-dhv2-oplock3

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9ac9d286b4584388b10d2c6247094aed8b0e68a6)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:14 +01:00
Michael Adam
d601af8a7c torture:smb2: rename replay1 -> replay-commands
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9ebf079b00b642c5df47fecffc3ff1fc96525235)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:14 +01:00
Michael Adam
26577dbbaa 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

(cherry picked from commit f24567e9fd6ad5925691df2ebc23cfd8a127c5a8)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:14 +01:00
Michael Adam
2d82282164 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>
(cherry picked from commit 04265199b389a7b38c3047985da68e8442a0b746)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:14 +01:00
Michael Adam
5782344a57 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>
(cherry picked from commit bebd35f439229b9363dfc2f4ae5744103ba80740)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
5b439f51f0 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>
(cherry picked from commit 8f158bab9f8dbdbdb460258a08a15d0d6c41cbac)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
c0fc2c38fc 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>
(cherry picked from commit 366b51a8ff30132185ff126e2cdd51801b07e6f4)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
a5a7947edf 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>
(cherry picked from commit d4408c495be851c684e7b4b5ff56e5eb82f16c06)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
b882ed1abe 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>
(cherry picked from commit 6d008556722a5bca73e5881345497ec8f97595dd)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
d019891529 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>
(cherry picked from commit cd3ee2a2aa46cb49e14c451ea8ee64039e5b8fa6)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
d3a024a4f0 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>
(cherry picked from commit 95835b9280f8b191245786305b43ae802886ee01)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
d3206e9cbe 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

(cherry picked from commit abd8b182447fce6dc1436e8ff3907b871705d7e0)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
d0db200bc3 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>
(cherry picked from commit 0fe29f66326e9a39254fdc2fd255075e5055eeb6)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
8d8e111c93 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>
(cherry picked from commit aaddde12d997c7d35b1e76709afd310990dc9cdb)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
7bbdd9ac57 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>
(cherry picked from commit 37eba9006e95235785d851f4d4c8110bf77e2b64)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
3eec659bd6 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>
(cherry picked from commit a9dcbd09801ab19c2abdb803c730120bd20d8175)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
d5d58b902f 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>
(cherry picked from commit a5e4f14c3b132c886cda2ab4cc14f1f764ff04eb)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
6c78c8d496 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

(cherry picked from commit bba426dbbbe0e4aebd99b78cff037eac754aa282)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
c3fcfadf02 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>
(cherry picked from commit 7b8cfa1cbc2738f798fad748ea40c029d99814a0)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:13 +01:00
Michael Adam
0b6c3b5050 torture:smb2: improve torture_comments in connect test
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb 23 04:50:53 CET 2016 on sn-devel-144

(cherry picked from commit fb0d6244278baa97c35101480b18640796f86bf1)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Michael Adam
141605e5ea torture:smb2: fix memory leak in connect test.
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 78d7b23f2f55ebdc3ed2a2abdd68a294a8ef99f7)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Michael Adam
cf7a4e1b5e torture:smb2: rewrite connect test to use torture_asserts for create errors
let torture_smb2_createfile propagate errors

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 4d9484e7c40cb3c3517538348fda521dafcd2f9a)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Michael Adam
2dd63e5beb torture:smb2: rewrite connect test to use torture_asserts
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 358c09b899f62b6f9ac9693b9101639c0cde8d3f)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Günther Deschner
95c7f0f6fa s4-torture: let smb2.replay.replay4 test deal with scale out shares.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 32e545ecea4f217c8b723fbea5d9131573a50488)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Günther Deschner
d20a4c2ef2 s4-torture: let smb2.replay.replay3 test deal with scale out shares.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 757ade67e6830ed66eeeb4954d1fd24d83effb13)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Günther Deschner
d194ce0bda s4-torture: let smb2.replay.replay2 test deal with scale out shares.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9c23f43f9edd8cfbfdd56e397748e2f74b1ef29b)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11779
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
19c381c62c s4:libcli/ldap: add support for LDB_CONTROL_DIRSYNC_EX_OID
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit d104d6e04ff8ad8274db1a63f53a5c2b93e3e10b)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
2a1ceb85c2 ldb: version 1.1.26
* let a timeout of -1 indicate no timeout for a given request
* fix memory leaks in pyldb ldb.search()
* build fixes
* improve pyldb ldb.search() help message
* add pyldb ldb.search_iterator() api
* add LDB_ATTR_FLAG_FORCE_BASE64_LDIF as optional argument
  to ldb_schema_attribute_add()
* add client support for LDB_CONTROL_DIRSYNC_EX

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit fb705e19e8a8e727908c8913604c4cbffdb30c96)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
02e325f354 ldb: add support for LDB_CONTROL_DIRSYNC_EX
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit ad2b5fae7f9b1437e6fcf73a0be3ca5d3ba0d5dc)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
530693d25e ldb: add LDB_ATTR_FLAG_FORCE_BASE64_LDIF support
This can be used to force ldb_write_ldif() to use base64 for
a specific attribute.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit f721f27da5f9ebb41639b70986ad1acb83206ed6)
2016-03-14 10:02:12 +01:00
Michael Adam
33f4491c0d pyldb: eliminate warnings from python api test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 6c8ab59d068101caa40f9b15ed70a115b5612f47)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
f12c897ce6 pyldb: add api tests for search_iterator()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 13e981d3d822876f6f6e741606dc5a772ab2cca5)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
e5c730472d pyldb: add ldb.search_iterator()
This is able to handle async requests, e.g. with a notification control
and processes results as they arrive instead of waiting for all results
before returning.

search_handle = ldb.search_iterator(...)

for e in search_handle:
    if not isinstance(msg, ldb.Message):
        # referral
        continue

    name = e["name"][0]

result = search_handle.result()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 77ca07801c81558d95b95e9120511cb2e00f3d03)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
66112f65c2 pyldb: fix help message for ldb.search()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit e96fa7b10c5c6ee2cdd57c2aa553593c9372f87b)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
11c06aacf6 pyldb: fix memory leak in py_ldb_search()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 2c2a2540f4076debdf2993781958b546c269aa49)
2016-03-14 10:02:12 +01:00
Andrew Bartlett
f305aae9db pyldb: Free correct context when pyldb_Object_AsDn() fails
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit e7bdd30be54f3652cf060f4252f9eed3ea82078f)
2016-03-14 10:02:12 +01:00
Stefan Metzmacher
68b76dbdb5 ldb: allow a timeout of -1 result in no timeout timer at all.
This is required in order to have long running async searches,
e.g. with LDB_CONTROL_NOTIFICATION_OID.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 2b1cd4a1147a8d5ba10ddcef4c2d258df2bd5dd4)
2016-03-14 10:02:11 +01:00
Stefan Metzmacher
7a6c31d573 ldb-samba: fix the timeout setup in ildb_request_send()
We need to use the startime as reference not the current time.

We also allow timeout == -1 to indicate no timeout at all.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 5db9f865bca818da8d2334208f3141f7f5c7286d)
2016-03-14 10:02:11 +01:00
Stefan Metzmacher
f511bb3e56 s4:libcli/ldap: send AbandonRequests for cancelled requests
This happens on a local timeout of an talloc_free() of the request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit cd77b0bba434139e13db5ec2096ca99b6b3f084d)
2016-03-14 10:02:11 +01:00
Stefan Metzmacher
68dc117170 ldb:ABI: add missing pyldb-util.py3-1.1.25.sigs
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 8adf470af231718d334e282594079a67e4da9f05)
2016-03-14 10:02:11 +01:00
Volker Lendecke
2a420aabbe ldb: Avoid a "talloc_steal"
There's only one caller of "next_chunk" that does a talloc_steal right
after the call. Pass in a talloc context.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit d56e42de64af84ad839749beaa22450f71bec58a)
2016-03-14 10:02:11 +01:00
Volker Lendecke
d2e00475b0 ldb: Fix some whitespace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 11c5513bb121fd43f566eacfe7b2af64f3cb3a83)
2016-03-14 10:02:11 +01:00
Karolin Seeger
a5239be20d VERSION: Bump version up to 4.4.0rc5...
and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
2016-03-08 12:05:17 +01:00
Karolin Seeger
331c2a334e VERSION: Disable git snapshots for the Samba 4.4.0rc4 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
samba-4.4.0rc4
2016-03-08 11:58:23 +01:00
Karolin Seeger
54f95be1b1 WHATSNEW: Add release notes for Samba 4.4.0rc4.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
2016-03-08 11:57:21 +01:00
Garming Sam
38eeb06ff0 CVE-2016-0771: tests/dns: Remove dependencies on env variables
Now that it is invoked as a normal script, there should be less of them.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-08 11:55:23 +01:00
Garming Sam
f193cd955f CVE-2016-0771: tests/dns: change samba.tests.dns from being a unittest
This makes it easier to invoke, particularly against Windows.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-08 11:55:23 +01:00
Garming Sam
ee2bdcc559 CVE-2016-0771: tests: rename test getopt to get_opt
This avoids any conflicts in this directory with the original toplevel
getopt.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-08 11:55:23 +01:00
Garming Sam
44023379ab CVE-2016-0771: tests/dns: RPC => DNS roundtrip test
Make sure that TXT entries stored via RPC come out the same in DNS.

This has one caveat in that adding over RPC in Windows eats slashes,
and so fails there.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-08 11:55:23 +01:00