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

110623 Commits

Author SHA1 Message Date
Stefan Metzmacher
b0bc3f6008 dbcheck: remove ldb.FLAG_MOD_REPLACE when replacing search results for forward links
Search results don't have an ldb.FLAG_MOD_* flags set.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
ec433f8531 dbcheck: rename err_duplicate_links() to err_recover_forward_links() and adjust the output message
It's really a fatal error to have duplicate values as it's very likely that
some forward links got lost.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
dc43d31cd2 dbcheck: add link direction to error message for duplicate links
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
a651cc79d6 dbcheck: rename err_duplicate_links arguments
In preperation of adding more arguments.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Stefan Metzmacher
9f47fe6c4a dbcheck: only pass obj_dn to err_orphaned_backlink()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
6f77503871 dbcheck: add forward_syntax argument to err_orphaned_backlink
Will be used in a subsequent commit.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
4a71394c6a dbcheck: rename and reorder err_orphaned_backlink arguments
In preperation of adding more arguments.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
52bd0b0980 selftest/dbcheck: add a test for corrupt forward links restoration
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Ralph Boehme
8c01acd562 Revert "dbcheck: disable fixing duplicate linked attributes until we can recover lost forward links"
This reverts commit 43e3f79d54c5aeaea820865d298d4249cf47af99.

The real fix will follow in the next commits.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2018-02-05 13:49:12 +01:00
Stefan Metzmacher
55d466549a python/common: add __cmp__ function to dsdb_Dn similar to parsed_dn_compare()
Linked attribute values are sorted by objectGUID of the link target.
For C code we have parsed_dn_compare() to implement the logic,
the same is now available on python dsdb_Dn objects.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:12 +01:00
Stefan Metzmacher
c56eb49119 python:tests: add test_dsdb_Dn_sorted() to "samba.tests.common"
Failing until dsdb_Dn implements the correct __cmp__() function.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:11 +01:00
Stefan Metzmacher
1341780dcf python:tests: remove test_dsdb_Dn() to test_dsdb_Dn_binary()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:11 +01:00
Stefan Metzmacher
681e0a1745 python:tests: use TestCaseInTempDir for "samba.tests.common"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:11 +01:00
Stefan Metzmacher
28fcf631c8 python/netcmd: implement __repr__ for class CommandError
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-05 13:49:11 +01:00
Ralph Boehme
84f07a8dcb s3/smbd: fix handling of delete-on-close on directories
This implements a check to test the delete-on-close flag of a directory
for requests to create files in this directory.

Windows server implement this check, Samba doesn't as it has performance
implications.

This commit implements the check and a new option to control it. By
default the check is skipped, setting "check parent directory delete on
close = yes" enables it.

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

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Feb  3 23:42:16 CET 2018 on sn-devel-144
2018-02-03 23:42:16 +01:00
Ralph Boehme
4c857e08a0 selftest: run deltest20 against s3 as well
This marks the test as knownfail, the next commit fixes it.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-02-03 18:41:08 +01:00
Andrew Bartlett
b3673824ad WHATSNEW: Mention new option "apply group policies"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13223

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb  1 07:57:54 CET 2018 on sn-devel-144
2018-02-01 07:57:54 +01:00
David Mulder
e10de35fab gpo: Correct WHATSNEW
The WHATSNEW incorrectly explains how to enable gpo.

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

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-01 03:20:26 +01:00
David Mulder
c90cf067e6 gpo: Correct documentation
The doc still contains a reference to env var
policy (which isn't present in this release).

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

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-01 03:20:26 +01:00
Andrew Bartlett
83d42203d7 WHATSNEW: Add section for "samba-tool visualize"
(text from the commit message by Douglas adding the feature)

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2018-02-01 03:20:26 +01:00
Swen Schillig
925dc87a2a talloc_zero libnet_context on init
Zero the libnet_context on initialization
preventing an uninitalized cli_credentials struct.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb  1 00:33:34 CET 2018 on sn-devel-144
2018-02-01 00:33:34 +01:00
Volker Lendecke
21eb5169f4 vfs_virusfilter: Fix CID 1428738 Macro compares unsigned to 0
vsnprintf returns "int" and not "size_t"

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 Jan 31 05:28:48 CET 2018 on sn-devel-144
2018-01-31 05:28:48 +01:00
Volker Lendecke
734404bbe9 vfs_virusfilter: Fix CID 1428740 Macro compares unsigned to 0
vsnprintf returns "int" and not "size_t"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-31 00:40:01 +01:00
Volker Lendecke
8a4409c956 vfs_virusfilter: Fix CID 1428739 Buffer not null terminated
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-31 00:40:01 +01:00
Jeremy Allison
9fc471242f s3: librpc: Allow client to correctly report etype unsupported by KDC to caller.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13247

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 31 00:38:09 CET 2018 on sn-devel-144
2018-01-31 00:38:08 +01:00
Swen Schillig
32d867cf09 ctdb-common: Optimize sock_queue's memory managament
Make use of talloc pools for the sock_queue's memory requirements.

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

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Jan 30 18:12:32 CET 2018 on sn-devel-144
2018-01-30 18:12:32 +01:00
Swen Schillig
eae2d35fec ctdb-common: Remove sock_queue_destructor
The sock_queue_destructor is not needed.
The performed tasks will be performed automatically.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-01-30 13:28:39 +01:00
Swen Schillig
f9150c5fa0 ctdb-common: Return if packet size is zero
Prevent further processing of sock_queue_process
if the received packet size is zero.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-01-30 13:28:39 +01:00
Volker Lendecke
0766f066af libcli: Remove finddcs_nbt.c
This completes commit 06c90cb6f5

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jan 30 13:27:51 CET 2018 on sn-devel-144
2018-01-30 13:27:51 +01:00
Jeremy Allison
e7425bd524 s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed on error, we don't own it here.
Thanks to Isaac Boukris <iboukris@gmail.com> for finding the
issue and testing this fix.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 26 02:25:20 CET 2018 on sn-devel-144
2018-01-26 02:25:20 +01:00
Swen Schillig
849169a7b6 Fix wrong condition for error string assignment
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Jan 25 17:19:12 CET 2018 on sn-devel-144
2018-01-25 17:19:12 +01:00
Volker Lendecke
89c3a1ebbe libnet: Use talloc_zero instead of ZERO_STRUCTP
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2018-01-25 12:24:08 +01:00
Trever L. Adams
e320c4c9b7 Samba-VirusFilter: clean up dir check vfs_close and vfs_open
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2018-01-25 12:24:08 +01:00
Trever L. Adams
c890011a76 Samba-VirusFilter: fix virusfilter_vfs_close() crash
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2018-01-25 12:24:08 +01:00
Volker Lendecke
d4f7d9e08c libnmb: Fix CID 1428474 Incorrect expression (COPY_PASTE_ERROR)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan 25 01:53:53 CET 2018 on sn-devel-144
2018-01-25 01:53:53 +01:00
Trever L. Adams
cbf743d329 Samba-VirusFilter: clamav VFS and man page.
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-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): Wed Jan 24 15:08:59 CET 2018 on sn-devel-144
2018-01-24 15:08:59 +01:00
Trever L. Adams
5970d68bf6 Samba-VirusFilter: F-Secure AntiVirus (fsav) VFS and man page.
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-01-24 10:29:46 +01:00
Trever L. Adams
0b25089edd Samba-VirusFilter: Sophos VFS backend.
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-01-24 10:29:46 +01:00
Trever L. Adams
b1e69edd05 Samba-VirusFilter: common headers and sources.
Samba-VirusFilter Contributors:

SATOH Fumiyasu @ OSS Technology Corp., Japan
Module creator/maintainer

Luke Dixon luke.dixon@zynstra.com
Samba 4 support

Trever L. Adams
Documentation
Code contributions
Samba-master merge work

With many thanks to the Samba Team.

Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-01-24 10:29:46 +01:00
Trever L. Adams
70d7f7d03c Samba-VirusFilter: memcache changes.
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-01-24 10:29:46 +01:00
Martin Schwenke
8b82d10856 ctdb-tests: Fix a typo
This typo causes the script to be run with the default shell.  If this
is not bash then the shell will fail to parse integration.bash.

This is a regression caused by commit
c607989d91.  Clearly nobody has run this
test on Debian for a long time.  :-(

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

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jan 24 10:28:52 CET 2018 on sn-devel-144
2018-01-24 10:28:52 +01:00
Martin Schwenke
50150d7581 ctdb-tests: Add a UNIT pseudo-test-suite
This runs all of the unit tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-01-24 05:49:55 +01:00
Martin Schwenke
e17d02d403 ctdb-tests: Only use socket-wrapper for simple, local daemon tests
The run_tests.sh -S option now takes the path to the socker-wrapper
shared library.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-01-24 05:49:55 +01:00
Martin Schwenke
da3aaf972a ctdb-tests: Add timeout for individual tests, default is 10 minutes
This will cause a hung test to time out and fail rather than letting a
test run hang indefinitely.  Some tests can take 5 minutes to run, so
10 minutes should be plenty.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-01-24 05:49:55 +01:00
Volker Lendecke
7ea5d38a69 libnmb: Move "read_packet" to nmbd
It's only used there

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 Jan 24 05:48:19 CET 2018 on sn-devel-144
2018-01-24 05:48:19 +01:00
Volker Lendecke
6a60970306 libnmb: Make nb_packet_read_recv return a talloc'ed pkt
This saves a few explicit destructors only doing free_packet()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-24 00:58:17 +01:00
Volker Lendecke
45aec7d3a2 libnmb: Add "parse_packet_talloc"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-24 00:58:17 +01:00
Volker Lendecke
c57cce1b97 libcli/resolve: Make functions static
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): Tue Jan 23 06:36:36 CET 2018 on sn-devel-144
2018-01-23 06:36:36 +01:00
Volker Lendecke
30ff05c660 libcli/resolve: Make functions static
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-23 01:49:23 +01:00
Volker Lendecke
ca3745db30 libcli/resolve: Fix typos
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-01-23 01:49:23 +01:00