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

103954 Commits

Author SHA1 Message Date
Garming Sam
cea4a4b9b2 tests: Allow alternative error code for backupkey test
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-12 23:24:13 +02:00
Michael Adam
cc339b0069 libads: improve debug messages in sitename_fetch()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jul 12 21:23:48 CEST 2016 on sn-devel-144
2016-07-12 21:23:48 +02:00
Michael Adam
ce8de54a68 selftest: check for smbd on a 1-second basis.
Chance to reduce the overall time spent in checking for smbd

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-12 17:49:19 +02:00
Michael Adam
25fee06e0c selftest: check for winbind on 1-second basis
There is a chance to reduce the overall time spent checking.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-12 17:49:19 +02:00
Michael Adam
e8bab7e5b2 libsmb:namequery: fix typo in comment in get_dc_list()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-12 17:49:19 +02:00
Nikolai Kondrashov
9d29593d92 tevent: Clarify apparently useless conditions
Comment on two similar conditions in tevent_standard.c, which,
otherwise, at a first glance, seem useless, i.e. always true.

The conditions checking glue->epoll_ops for being non-NULL, imply that
it *can* be NULL. A casual reader would not generally expect a "member"
function to modify its container's pointer in a container higher up, and
would assume that glue->epoll_ops could be NULL before the call,
resulting in a near-NULL pointer dereference.

However, in this case epoll_ops is indeed cleared in those "member"
functions, in the case of an epoll interface failure, to signify
fallback to poll interface.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Jul 12 13:56:41 CEST 2016 on sn-devel-144
2016-07-12 13:56:41 +02:00
Rowland Penny
792f89cdb6 Fix typo in python/samba/provision/__init__.py
Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 12 06:58:47 CEST 2016 on sn-devel-144
2016-07-12 06:58:47 +02:00
Stefan Metzmacher
a1743de74f libads: ensure the right ccache is used during spnego bind
When doing spnego sasl bind:
1. Try working without kinit only if a password is not
   provided
2. When using kinit, ensure the KRB5CCNAME env var is set
   to a private memory ccache, so that the bind is on behalf
   of the requested user.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 12 03:23:33 CEST 2016 on sn-devel-144
2016-07-12 03:23:33 +02:00
Stefan Metzmacher
2672968851 libads: ensure the right ccache is used during gssapi bind
When doing gssapi sasl bind:
1. Try working without kinit only if a password is not
   provided
2. When using kinit, ensure the KRB5CCNAME env var is set
   to a private memory ccache, so that the bind is on behalf
   of the requested user.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-07-11 23:46:17 +02:00
Ralph Boehme
a391e9202d s3-messaging: use messaging_ctdbd_reinit() in messaging_reinit()
This is the last step to fix a regression introduced by

  3fe3226daa and
  3fe3226daa8488e0fa787c40359c3401b6f05fc0^

where we pass the ctdb-messaging object conn to db_open() and add a
reference to it to the private db_ctdb_ctx for later use. Unfortunately
reinit_after_fork() destroys conn, leaving us with an invalid reference.

The previous patches added new lower level functions
messaging_ctdbd_reinit() and ctdbd_reinit_connection(), finally use them
them from messaging_reinit(). They preserve the conn object and simply
reinitialize the IPC fd.

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

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jul 11 23:45:20 CEST 2016 on sn-devel-144
2016-07-11 23:45:20 +02:00
Ralph Boehme
f991381356 s3-messaging/ctdb: add messaging_ctdbd_reinit()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-11 20:05:06 +02:00
Ralph Boehme
c6373aba00 s3-messaging/ctdb: split messaging_ctdbd_init()
Split out and internal function from messaging_ctdbd_init() that does
the connection setup. Keep the conn object allocation in
messaging_ctdbd_init().

This is in preperation of adding messaging_ctdbd_reinit() which will use
the new internal function as well.

messaging_ctdbd_init_internal() has a new reinit flag,
messaging_ctdbd_init() calls with reinit=false resulting in unmodified
behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-11 20:05:06 +02:00
Ralph Boehme
84da49f89b ctdbd_conn: add ctdbd_reinit_connection()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-11 20:05:06 +02:00
Ralph Boehme
1184931001 ctdbd_conn: split ctdbd_init_connection()
Split ctdbd_init_connection() into an internal function that does the
connection setup and only keep the conn object allocation in
ctdbd_init_connection().

This is in preperation of adding ctdbd_reinit_connection() which will
use the new internal function as well.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-11 20:05:06 +02:00
Michael Adam
2f95ada149 ctdb: fix autotest with socket-wrapper installed in the system
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Jul 11 15:53:30 CEST 2016 on sn-devel-144
2016-07-11 15:53:30 +02:00
Amitay Isaacs
c1c2a1cb9f swrap: Build socket_wrapper path relative to blddir
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-07-11 12:19:13 +02:00
Michael Adam
b32df94527 autobuild: Don't compare socket wrapper so_path for xc check
This uses the build-directory which, hence is not the same.
Achieve this by adding the path itself and the whole
defines dictionary to the exclude list.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-11 12:19:13 +02:00
Garming Sam
4c4c3e0fcf tests/dns_update: Add error message for diagnosis
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): Mon Jul 11 10:58:16 CEST 2016 on sn-devel-144
2016-07-11 10:58:15 +02:00
Ralph Boehme
6efd0af5e8 s3-rpc_server/mdssd: use smbd_reinit_after_fork()
Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures
am_parent is reset to NULL. Otherwise, when exiting for some reason, the
inherited atexit handler killkids() calls kill(0,SIGTERM) terminating
our whole process group including the main smbd.

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

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

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jul 11 02:02:33 CEST 2016 on sn-devel-144
2016-07-11 02:02:31 +02:00
Ralph Boehme
bb90a8484a smbd/notifyd: use smbd_reinit_after_fork()
Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures
am_parent is reset to NULL. Otherwise, when exiting for some reason, the
inherited atexit handler killkids() calls kill(0,SIGTERM) terminating
our whole process group including the main smbd.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-10 22:28:13 +02:00
Ralph Boehme
3a0c16b08c smbd/cleanupd: use smbd_reinit_after_fork()
Using smbd_reinit_after_fork() rather then reinit_after_fork() ensures
am_parent is reset to NULL. Otherwise, when exiting for some reason, the
inherited atexit handler killkids() calls kill(0,SIGTERM) terminating
our whole process group including the main smbd.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-07-10 22:28:13 +02:00
Andrew Bartlett
89e67e309a Revert selftest: Add knownfail entry required to disable tombstone_reanimation
This reverts e0fa42201b

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jul  9 18:41:40 CEST 2016 on sn-devel-144
2016-07-09 18:41:40 +02:00
Andrew Bartlett
fb9af9727f Revert "dsdb: Disable tombstone_reanimation module until we isolate what causes flaky tests"
This reverts commit 252b62c54e.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
7ea5ec0f28 s4:dsdb/tests: add RestoreUserPwdObjectTestCase test
This is the same as RestoreUserObjectTestCase, but we
set the password on add and reanimate.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
55932d7ecd s4:dsdb/tests: improve the RestoreUserObjectTestCase test
We verify attributes, values and their replication metadata after
each step (add, delete, reanimate).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
cf19ab651a s4:dsdb/tests: improve tombstone_reanimation varifications
We should do case sensitive checks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
16d36603e8 s4:dsdb/tests: make tombstone_reanimation.py executable
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
7bfefa9ae2 s4:dsdb/tests: make use assertAttributesEqual() in RestoreUserObjectTestCase()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
c16b30c411 s4:dsdb/tombstone_reanimate: restructure the module logic
Now we keep all state in struct tr_context and split
the preparation and exectution of sub requests into
helper functions.

The most important change is that we now
pass mod_req to dsdb_user_obj_set_defaults(),
so that it can add controls to it.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
272d6478a2 s4:dsdb/common: prepare dsdb_user_obj_set_defaults() for tombstone reanimation
accountExpires gets a different value, logonHours is not updated,
operatorCount and adminCount are added.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
0350e3a42a s4:dsdb/repl_meta_data: remove secret attributes on delete
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
5287e4046d s4:dsdb/repl_meta_data: sort preserved_attrs and add "msDS-PortLDAP"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
73d9f8bef7 s4:password_hash: correctly update pwdLastSet on deleted objects.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
6d4c4855c9 s4:dsdb/samdb: add const to dsdb_make_object_category()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Stefan Metzmacher
49cd4c9853 drsuapi.idl: add DRSUAPI_ATTID_operatorCount and DRSUAPI_ATTID_adminCount
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Andrew Bartlett
6e4e914c76 selftest: Add more tests for samba-tool drs replicate
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul  8 13:39:01 CEST 2016 on sn-devel-144
2016-07-08 13:39:01 +02:00
Andrew Bartlett
eeb0c97fdf samba-tool: Add --local-online mode to samba-tool drs replicate
This mode avoids an issue with using -P on an RODC, instead using an IRPC message
to trigger online replication right away

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-07-08 10:01:20 +02:00
Andrew Bartlett
ae2bd0012c samba-tool: Add success message to samba-tool drs replicate --local
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-07-08 10:01:20 +02:00
Garming Sam
f060811a9f schema: raise debug level
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Garming Sam
657e31450c schema: Remove unnecessary schema reload code
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
769230a49a s4:torture/drs: verify the whole metadata array to be the same in the repl_move tests
We've removed the difference compared to Windows and store metadata stamps for
some empty attributes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
2a44b692c0 Revert "selftest/flapping: mark samba4.drs.repl_move.python as temporary flapping"
We pass this tests again...

This reverts commit HEAD~2.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
26d117c2a2 s4:dsdb/password_hash: force replication meta data for empty password attributes
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9654

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
b0501a1cb0 s4:dsdb/common: add a replication metadata stamp for an empty logonHours attribute
When a user object is created it gets a metadata stamp for logonHours,
while the logonHours attribute has no value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
c7307fb7e4 selftest/flapping: mark samba4.drs.repl_move.python as temporary flapping
We'll change the behaviour step by step to match Windows.
At the end we'll pass the test again and revert this patch.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
3f66ccdfd2 tests:samba3sam: make use of the dsdb_flags_ignore module
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9654

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
d243996341 s4:samba_dsdb: add "dsdb_flags_ignore" module
This module removes internal flags from ldb_message_elements.
Typically the repl_meta_data module handles DSDB_FLAG_INTERNAL_FORCE_META_DATA,
but there're some cases where we don't use that module.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:20 +02:00
Stefan Metzmacher
1ca71aa152 s4:dsdb/samdb: add DSDB_FLAG_INTERNAL_FORCE_META_DATA
With this it's possible to add a replPropertyMetaData entry for an empty
attribute.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-08 10:01:19 +02:00
Stefan Metzmacher
f76a4296cd CVE-2016-2019: s3:selftest: add regression tests for guest logins and mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Jul  7 14:52:20 CEST 2016 on sn-devel-144
2016-07-07 14:52:20 +02:00
Stefan Metzmacher
53a1248fb3 CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2016-07-07 11:22:27 +02:00