samba.git
4 years agoRemove ntdb from scripts
Volker Lendecke [Thu, 12 Mar 2015 13:18:34 +0000 (13:18 +0000)]
Remove ntdb from scripts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoparam: Remove "use ntdb" reference
Volker Lendecke [Thu, 12 Mar 2015 13:10:12 +0000 (13:10 +0000)]
param: Remove "use ntdb" reference

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRevert "Samba3-HOWTO: mention NTDB."
Volker Lendecke [Thu, 12 Mar 2015 13:09:01 +0000 (13:09 +0000)]
Revert "Samba3-HOWTO: mention NTDB."

This reverts commit c5bd2ae338c0b67304ee253e3b5139b50cc1d0e5.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoparam: Remove "use ntdb"
Volker Lendecke [Thu, 12 Mar 2015 13:07:31 +0000 (13:07 +0000)]
param: Remove "use ntdb"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove unused util_ntdb.[ch]
Volker Lendecke [Thu, 12 Mar 2015 13:05:25 +0000 (13:05 +0000)]
lib: Remove unused util_ntdb.[ch]

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agodbwrap: Remove dbwrap_ntdb
Volker Lendecke [Thu, 12 Mar 2015 13:03:07 +0000 (13:03 +0000)]
dbwrap: Remove dbwrap_ntdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agodbwrap: Remove ntdb logic from dbwrap_local_open
Volker Lendecke [Thu, 12 Mar 2015 12:57:33 +0000 (12:57 +0000)]
dbwrap: Remove ntdb logic from dbwrap_local_open

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove "use_ntdb" param from secrets_init_path
Volker Lendecke [Thu, 12 Mar 2015 12:45:12 +0000 (12:45 +0000)]
lib: Remove "use_ntdb" param from secrets_init_path

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRemove callers of lp_use_ntdb
Volker Lendecke [Thu, 12 Mar 2015 12:39:37 +0000 (12:39 +0000)]
Remove callers of lp_use_ntdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agosamdb: Ignore ntdb in secrets_tdb_sync
Volker Lendecke [Fri, 13 Mar 2015 14:34:36 +0000 (14:34 +0000)]
samdb: Ignore ntdb in secrets_tdb_sync

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agopassdb: Fix the O3 developer build
Volker Lendecke [Mon, 16 Mar 2015 06:45:28 +0000 (07:45 +0100)]
passdb: Fix the O3 developer build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Mar 17 11:29:38 CET 2015 on sn-devel-104

4 years agolib/util: Make ECHILD in samba_runcmd_io_handler an error
Andrew Bartlett [Wed, 18 Feb 2015 23:41:34 +0000 (12:41 +1300)]
lib/util: Make ECHILD in samba_runcmd_io_handler an error

We now print out a nasty message and set and error if we get ECHILD,
as we no longer set SIGIGN on SIGCHLD in the standard process model.

This was why samba_kcc was able to fail totally without us noticing.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 17 07:05:43 CET 2015 on sn-devel-104

4 years agos4-process_standard: Remove signal(SIGCHLD, SIG_IGN)
Andrew Bartlett [Wed, 18 Feb 2015 23:45:31 +0000 (12:45 +1300)]
s4-process_standard: Remove signal(SIGCHLD, SIG_IGN)

We replace this with a pipe between parent and child, and then watch
for a read event in the parent to indicate that the child has gone away.

The removal of signal(SIGCHLD, SIG_IGN) requires us to then call
waitpid().  We can't do that in a main loop as we want to get the exit
status to the legitimate waitpid calls in routines like
samba_runcmd_*().

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agoselftest: rename env member to nt4_member
Michael Adam [Fri, 6 Mar 2015 09:01:33 +0000 (10:01 +0100)]
selftest: rename env member to nt4_member

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 17 01:46:18 CET 2015 on sn-devel-104

4 years agoselftest: rename env s3dc_schannel to nt4_dc_schannel
Michael Adam [Fri, 6 Mar 2015 08:39:54 +0000 (09:39 +0100)]
selftest: rename env s3dc_schannel to nt4_dc_schannel

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env s3dc to nt4_dc
Michael Adam [Fri, 6 Mar 2015 08:34:11 +0000 (09:34 +0100)]
selftest: rename env s3dc to nt4_dc

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env s3member_rfc2307 to ad_member_rfc2307
Michael Adam [Thu, 5 Mar 2015 23:58:45 +0000 (00:58 +0100)]
selftest: rename env s3member_rfc2307 to ad_member_rfc2307

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env s3member to ad_member.
Michael Adam [Thu, 5 Mar 2015 22:46:14 +0000 (23:46 +0100)]
selftest: rename env s3member to ad_member.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env dc to ad_dc_ntvfs
Michael Adam [Thu, 5 Mar 2015 22:38:26 +0000 (23:38 +0100)]
selftest: rename env dc to ad_dc_ntvfs

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env plugin_s4_dc to ad_dc
Michael Adam [Thu, 5 Mar 2015 17:08:43 +0000 (18:08 +0100)]
selftest: rename env plugin_s4_dc to ad_dc

This is the environment that represents our supported production
setup of an active directory domain controller.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: make blackbox.pkinit test independent of test environment.
Michael Adam [Mon, 16 Mar 2015 09:37:35 +0000 (10:37 +0100)]
selftest: make blackbox.pkinit test independent of test environment.

This lets the test not clutter the main selftest prefix directory
with temporary data.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: make blackbox.ktpass test independent of test environment.
Michael Adam [Mon, 16 Mar 2015 09:34:37 +0000 (10:34 +0100)]
selftest: make blackbox.ktpass test independent of test environment.

This also prevents the test from cluttering the main
selftest prefix directory with temporary data.

Note: this test is currently skipped but it should
be adapted because of the environment renames anyways.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: make blackbox.passwords test independent of test environment.
Michael Adam [Mon, 16 Mar 2015 09:27:56 +0000 (10:27 +0100)]
selftest: make blackbox.passwords test independent of test environment.

This also prevents the test from cluttering the main
selftest directort with temporary data.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest:test_kinit: remove commented out line with outdated content.
Michael Adam [Mon, 16 Mar 2015 09:20:01 +0000 (10:20 +0100)]
selftest:test_kinit: remove commented out line with outdated content.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodoc: fix the idmap_script manpage to be named idmap_script
Michael Adam [Tue, 3 Feb 2015 13:41:27 +0000 (14:41 +0100)]
doc: fix the idmap_script manpage to be named idmap_script

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Mar 16 23:03:34 CET 2015 on sn-devel-104

4 years agos3:winbind:grent: don't stop when querying one domain fails.
Michael Adam [Sun, 25 Jan 2015 11:16:50 +0000 (12:16 +0100)]
s3:winbind:grent: don't stop when querying one domain fails.

Just continue with the next domain.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: convert wb_next_grent to use wb_query_group_list.
Michael Adam [Fri, 23 Jan 2015 13:23:16 +0000 (14:23 +0100)]
s3:winbind:grent: convert wb_next_grent to use wb_query_group_list.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind: add wb_query_group_list module - async query group list
Michael Adam [Fri, 23 Jan 2015 13:06:40 +0000 (14:06 +0100)]
s3:winbind: add wb_query_group_list module - async query group list

Modeled after wb_query_user_list.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: refactor duplication into wb_next_grent_send_do()
Michael Adam [Wed, 21 Jan 2015 11:32:04 +0000 (12:32 +0100)]
s3:winbind:grent: refactor duplication into wb_next_grent_send_do()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: move resetting next_group up.
Michael Adam [Tue, 20 Jan 2015 11:25:29 +0000 (12:25 +0100)]
s3:winbind:grent: move resetting next_group up.

This is to make it more obvious that this is a case
of code duplication.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: use wb_next_domain() in wb_next_grent.c
Michael Adam [Tue, 20 Jan 2015 09:25:37 +0000 (10:25 +0100)]
s3:winbind:grent: use wb_next_domain() in wb_next_grent.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: fix a debug message.
Michael Adam [Sun, 25 Jan 2015 11:20:35 +0000 (12:20 +0100)]
s3:winbind:grent: fix a debug message.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: refactor duplication into wb_next_pwent_send_do()
Michael Adam [Mon, 19 Jan 2015 12:51:39 +0000 (13:51 +0100)]
s3:winbind:pwent: refactor duplication into wb_next_pwent_send_do()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: move resetting next_user up.
Michael Adam [Tue, 20 Jan 2015 10:06:51 +0000 (11:06 +0100)]
s3:winbind:pwent: move resetting next_user up.

This does not change the behaviour and makes it more evident
that we have anothe code duplication here:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (state->gstate->num_users == 0) {
...
}

subreq = wb_fill_pwent_send(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

is for the current setting of variables equivalent
to the block found elsewhere:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (state->gstate->next_user >= state->gstate->num_users) {
...
}

subreq = wb_fill_pwent_send(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

because both num_users is set to a non-negative
value and num_users starts at 0 and is incremented up to
num_users.

The code duplication will be factored out next.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: move wb_next_domain() to winbindd_util.c for re-use
Michael Adam [Tue, 20 Jan 2015 09:07:59 +0000 (10:07 +0100)]
s3:winbind:pwent: move wb_next_domain() to winbindd_util.c for re-use

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: rename wb_next_find_domain to wb_next_domain
Michael Adam [Tue, 20 Jan 2015 08:41:31 +0000 (09:41 +0100)]
s3:winbind:pwent: rename wb_next_find_domain to wb_next_domain

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: use wb_next_find_domain()
Michael Adam [Sat, 17 Jan 2015 22:34:37 +0000 (23:34 +0100)]
s3:winbind:pwent: use wb_next_find_domain()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:util: fix comment typo
Michael Adam [Tue, 20 Jan 2015 07:39:58 +0000 (08:39 +0100)]
s3:winbind:util: fix comment typo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:util_sid: donate an empty line.
Michael Adam [Mon, 19 Jan 2015 07:14:44 +0000 (08:14 +0100)]
s3:util_sid: donate an empty line.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: don't stop group enumeration when a group has no gid
Michael Adam [Mon, 19 Jan 2015 12:51:55 +0000 (13:51 +0100)]
s3:winbind:grent: don't stop group enumeration when a group has no gid

simply continue with the next group

Note: this patch introduces some code duplication to make it
easier to create minimal backport patch. Subsequent patches
will provide some refactoring to reduce the duplication.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agodsdb: fix the user_account_control test.
Michael Adam [Mon, 16 Mar 2015 16:22:01 +0000 (17:22 +0100)]
dsdb: fix the user_account_control test.

On my system (Fedora 21) the test fails with:

[1(0)/1 at 0s] samba4.user_account_control.python(dc)
teardown_env(dc)
Traceback (most recent call last):
  File "/home/obnox/devel/samba/master-push.git/source4/dsdb/tests/python/user_account_control.py", line 23, in <module>
    from subunit.run import SubunitTestRunner
ImportError: No module named subunit.run

This fixes it for me.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Mar 16 20:25:33 CET 2015 on sn-devel-104

4 years agoselftest: Add missing variable to @exported_envvars
Andreas Schneider [Mon, 16 Mar 2015 16:43:59 +0000 (17:43 +0100)]
selftest: Add missing variable to @exported_envvars

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoctdb-tests: Add tests for "ctdb reloadips" and "ctdb recover"
Martin Schwenke [Fri, 13 Mar 2015 04:00:03 +0000 (15:00 +1100)]
ctdb-tests: Add tests for "ctdb reloadips" and "ctdb recover"

Although much of the test infrastructure in recent commits is actually
targeted for "reloadnodes", it is worthwhile adding some tests for
"reloadips" and "recover".  This allows most of the test
infrastructure to be tried out against known good code.

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): Mon Mar 16 09:18:55 CET 2015 on sn-devel-104

4 years agoctdb-tools: Drop a debug message to DEBUG level
Martin Schwenke [Sat, 7 Feb 2015 21:16:47 +0000 (08:16 +1100)]
ctdb-tools: Drop a debug message to DEBUG level

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add stub for ctdb_client_async_control()
Martin Schwenke [Wed, 25 Feb 2015 00:41:48 +0000 (11:41 +1100)]
ctdb-tests: Add stub for ctdb_client_async_control()

With support for CTDB_CONTROL_RELOAD_PUBLIC_IPS and
CTDB_CONTROL_RELOAD_NODES_FILE for now.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add stub for ctdb_ctrl_reload_nodes_file()
Martin Schwenke [Wed, 4 Feb 2015 03:57:03 +0000 (14:57 +1100)]
ctdb-tests: Add stub for ctdb_ctrl_reload_nodes_file()

ctdb_ctrl_reload_nodes_file_stub() does nothing except print a helpful
message.  That's enough to help test the tool.  It could update the
nodemap but that would not be incredibly useful.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add stubs for some CTDB client messaging functions
Martin Schwenke [Sat, 7 Feb 2015 21:07:56 +0000 (08:07 +1100)]
ctdb-tests: Add stubs for some CTDB client messaging functions

Stub for ctdb_client_send_message() only implements
CTDB_SRVID_TAKEOVER_RUN and CTDB_SRVID_DISABLE_TAKEOVER_RUNS.  It
assumes srvid_broadcast() is in use and just calls handler to fake
appropriate replies.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Test stub fixes
Martin Schwenke [Sat, 7 Feb 2015 21:14:41 +0000 (08:14 +1100)]
ctdb-tests: Test stub fixes

Initialise ctdb->ev in ctdb_cmdline_client_stub().

Add a comment to tevent_context_init_stub() explaining why the ctdb
context is initialised there instead of ctdb_cmdline_client_stub().
This information is in the git log but that doesn't help someone who
is reading the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Handle deleted nodes when loading fake nodemap
Martin Schwenke [Mon, 9 Feb 2015 06:04:30 +0000 (17:04 +1100)]
ctdb-tests: Handle deleted nodes when loading fake nodemap

The daemon uses an IP address of "0.0.0.0" when handling deleted
nodes.  Do the same in the tests when loading a fake nodemap.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Support CTDB_DEBUGLEVEL in tool tests
Martin Schwenke [Wed, 4 Feb 2015 03:56:17 +0000 (14:56 +1100)]
ctdb-tests: Support CTDB_DEBUGLEVEL in tool tests

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add ctdb_ctrl_setrecmode() stub
Martin Schwenke [Mon, 9 Feb 2015 10:55:59 +0000 (21:55 +1100)]
ctdb-tests: Add ctdb_ctrl_setrecmode() stub

If recovery mode is set to active then it updates the generation and
immediately sets recovery mode back to normal.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-eventscripts: Make 11.natgw stateful
Martin Schwenke [Wed, 26 Mar 2014 05:50:59 +0000 (16:50 +1100)]
ctdb-eventscripts: Make 11.natgw stateful

IP addresses and routes are only changed if either the NAT gateway
configuration or the NAT gateway master node has changed.  If running
"ip monitor" this will minimise the amount of noise seen.  It should
also be more lightweight at the expense of managing a couple of state
files.

Add a test to check that configuration changes behave correctly.
Tweak the static route result generation code so that the required
output is sorted.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoDo not use popt_common.h in dlz_bind9
Andrew Bartlett [Sun, 15 Mar 2015 22:26:16 +0000 (11:26 +1300)]
Do not use popt_common.h in dlz_bind9

We do not use popt_common structures here

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoparam: Use IDL-based constants for NBT and NBT dgram ports
Andrew Bartlett [Sun, 1 Mar 2015 07:04:00 +0000 (20:04 +1300)]
param: Use IDL-based constants for NBT and NBT dgram ports

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Mar 16 05:35:56 CET 2015 on sn-devel-104

4 years agosmb.conf.5: Mark "dgram port" and "nbt port" as deprecated
Andrew Bartlett [Sun, 1 Mar 2015 07:00:05 +0000 (20:00 +1300)]
smb.conf.5: Mark "dgram port" and "nbt port" as deprecated

These are not honored in the source3 codebase, so keeping them is confusing.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11126

4 years agosamba-tool drs: Ensure we do not replicate all secrets to an RODC, even with --local
Andrew Bartlett [Fri, 20 Feb 2015 04:54:32 +0000 (17:54 +1300)]
samba-tool drs: Ensure we do not replicate all secrets to an RODC, even with --local

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agotorture3: Rename LOCAL-WBCLIENT to WBCLIENT-MULTI-PING
Andrew Bartlett [Sun, 22 Feb 2015 22:52:58 +0000 (11:52 +1300)]
torture3: Rename LOCAL-WBCLIENT to WBCLIENT-MULTI-PING

This is not a local test, it should not be named LOCAL-*

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agoselftest: Run LOCAL-WBCLIENT against a test environment, not none
Andrew Bartlett [Sun, 22 Feb 2015 22:49:29 +0000 (11:49 +1300)]
selftest: Run LOCAL-WBCLIENT against a test environment, not none

The issue with this test was that it ran against whatever was
listening (or not) at the build prefix, not what was running under
make test

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agodsdb-repl: Always set DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING when we are an RODC
Andrew Bartlett [Fri, 20 Feb 2015 04:55:49 +0000 (17:55 +1300)]
dsdb-repl: Always set DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING when we are an RODC

Unless we are using DRSUAPI_EXOP_REPL_SECRET, always remove
DRSUAPI_DRS_WRIT_REP and always set
DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING

Otherwise, we will not work as an RODC, because replication will fail
with access denied errors.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agos4-process_model: Remove prefork and onefork
Andrew Bartlett [Thu, 19 Feb 2015 01:44:00 +0000 (14:44 +1300)]
s4-process_model: Remove prefork and onefork

While it is possible to run Samba in these modes, it isn't tested and
isn't required.

Each of these modes requires that SIGCHLD be set to SIGIGN, and that
breaks samba_runcmd_*().

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agoselftest: Fix comments in provision_promoted_dc
Andrew Bartlett [Tue, 17 Feb 2015 02:47:47 +0000 (15:47 +1300)]
selftest: Fix comments in provision_promoted_dc

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agopygensec: Add bindings for gensec_set_target_service and gensec_set_target_hostname
Andrew Bartlett [Mon, 2 Mar 2015 00:58:21 +0000 (13:58 +1300)]
pygensec: Add bindings for gensec_set_target_service and gensec_set_target_hostname

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
4 years agoTransition to waf 1.8: wrapped conf.check_cfg
Thomas Nagy [Sat, 7 Mar 2015 14:31:19 +0000 (15:31 +0100)]
Transition to waf 1.8: wrapped conf.check_cfg

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
(forward ported to current master by abartlet)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoTransition to waf 1.8: replaced on_results by update_outputs
Thomas Nagy [Sat, 7 Mar 2015 14:31:18 +0000 (15:31 +0100)]
Transition to waf 1.8: replaced on_results by update_outputs

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoUpdate the copy of waf to current 1.5
Jelmer Vernooij [Sat, 7 Mar 2015 14:31:17 +0000 (15:31 +0100)]
Update the copy of waf to current 1.5

After making the update, this commit reverts the upstream addition of
LDVERSION support in Python.py, which is necessary for Python 3
support in waf. This change conflicts with the last remaining
Samba-specific change in waf to help with cross-compilation.

Change-Id: Iedfdc0199e9d10dfbd910c4eab50c23f984b6e2d
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/param: Add hook that allows modification of default settings.
Jelmer Vernooij [Sun, 15 Mar 2015 23:30:27 +0000 (12:30 +1300)]
lib/param: Add hook that allows modification of default settings.

This is useful for reducing the amount of configuration necessary for
OpenChange.

The hook is ideally registered from a plugin initialization function,
so that it automatically gets used whenever the plugin is installed.

This makes it possible for plugins to e.g. extend the default value for
the list of enabled dcerpc endpoint services.

Like all our interfaces, callers are expected to use this API
responsibly. For example, OpenChange should only enable its DCE/RPC
interface if it has been provisioned.

Change-Id: Ic8bacdd8b4c92a2a4b97cfa1a50dc41365b78071
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoRequire at least Python 2.6.
Jelmer Vernooij [Sun, 8 Mar 2015 14:54:07 +0000 (15:54 +0100)]
Require at least Python 2.6.

Per discussion on the list earlier this year.

Change-Id: I085c6e8253b2b8183749c2b0962714c350b2d440
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: use server_maxtime = 9000 by default
Stefan Metzmacher [Sun, 15 Mar 2015 22:06:47 +0000 (23:06 +0100)]
selftest: use server_maxtime = 9000 by default

With something like this:

samba.stdout:
[1730(16549)/1735 at 2h9m58s] samba4.blackbox.dbcheck(dc)
ERROR: Testsuite[samba4.blackbox.dbcheck(dc)]
REASON: unable to set up environment dc:local - exiting

samba.stderr:
samba: maximum runtime exceeded - terminating at 1426447450, current ts:
1426447450
samba child process 653 exited with value 0

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos4.2/fsmo.py: fixed fsmo transfer exception
Steve Howells [Sat, 31 Jan 2015 16:09:17 +0000 (16:09 +0000)]
s4.2/fsmo.py: fixed fsmo transfer exception

In transfer_role() there is an duplicate call to samdb.modify() inside the if statement
where the type of role is being determined (specifically for the naming fsmo). This
call is unnecessary as after the if statement their is a correct call, with a try/catch
block, used by all fsmo transfers that will handle errors - such as the DC with the
fsmo role being offline.

The call to samdb.modify() inside the if statement for naming fsmo has been removed.

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

Signed-off-by: Steve Howells <steve.howells@moscowfirst.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos4:auth/gensec_gssapi: let gensec_gssapi_update() return NT_STATUS_LOGON_FAILURE...
Stefan Metzmacher [Fri, 13 Mar 2015 13:39:10 +0000 (14:39 +0100)]
s4:auth/gensec_gssapi: let gensec_gssapi_update() return NT_STATUS_LOGON_FAILURE for unknown errors

The 'nt_status' variable is set to NT_STATUS_OK before.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolibrpc: use the correct "MSServerClusterMgmtAPI" auth service for clusapi.
Günther Deschner [Wed, 11 Mar 2015 09:37:00 +0000 (10:37 +0100)]
librpc: use the correct "MSServerClusterMgmtAPI" auth service for clusapi.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Sat Mar 14 02:36:33 CET 2015 on sn-devel-104

4 years agos4-torture: establish a torture_clusapi_context to make it easier to keep state
Günther Deschner [Tue, 10 Mar 2015 09:51:39 +0000 (10:51 +0100)]
s4-torture: establish a torture_clusapi_context to make it easier to keep state
between tests.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolibrpc: add ncacn_ip_tcp: endpoint to clusapi.
Günther Deschner [Fri, 6 Mar 2015 19:15:25 +0000 (20:15 +0100)]
librpc: add ncacn_ip_tcp: endpoint to clusapi.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agopidl: align s4 dcesrv template generation with coding standards.
Günther Deschner [Fri, 6 Mar 2015 19:02:44 +0000 (20:02 +0100)]
pidl: align s4 dcesrv template generation with coding standards.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agopidl: add --template3 option to generate s3 server stubs.
Günther Deschner [Mon, 21 Jan 2013 17:42:45 +0000 (18:42 +0100)]
pidl: add --template3 option to generate s3 server stubs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add testing for clusapi Registry.
Günther Deschner [Fri, 6 Mar 2015 08:26:25 +0000 (09:26 +0100)]
s4-torture: add testing for clusapi Registry.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add testing for clusapi NetInterfaces.
Günther Deschner [Thu, 5 Mar 2015 23:28:53 +0000 (00:28 +0100)]
s4-torture: add testing for clusapi NetInterfaces.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add testing for clusapi Networks.
Günther Deschner [Thu, 5 Mar 2015 23:08:20 +0000 (00:08 +0100)]
s4-torture: add testing for clusapi Networks.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add tests for clusapi_BackupClusterDatabase and clusapi_SetServiceAccount...
Günther Deschner [Thu, 5 Mar 2015 23:06:25 +0000 (00:06 +0100)]
s4-torture: add tests for clusapi_BackupClusterDatabase and clusapi_SetServiceAccountPassword.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: test all available groups on the cluster.
Günther Deschner [Thu, 5 Mar 2015 23:05:09 +0000 (00:05 +0100)]
s4-torture: test all available groups on the cluster.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: test all available nodes on the cluster.
Günther Deschner [Thu, 5 Mar 2015 22:54:43 +0000 (23:54 +0100)]
s4-torture: test all available nodes on the cluster.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: pass down node name down to clusapi_OpenNode.
Günther Deschner [Thu, 5 Mar 2015 22:52:41 +0000 (23:52 +0100)]
s4-torture: pass down node name down to clusapi_OpenNode.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add test for clusapi_OpenGroupEx.
Günther Deschner [Thu, 5 Mar 2015 22:51:41 +0000 (23:51 +0100)]
s4-torture: add test for clusapi_OpenGroupEx.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: pass down group name down to clusapi_OpenGroup.
Günther Deschner [Thu, 5 Mar 2015 22:50:00 +0000 (23:50 +0100)]
s4-torture: pass down group name down to clusapi_OpenGroup.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add test for clusapi_OpenResourceEx.
Günther Deschner [Thu, 5 Mar 2015 22:43:40 +0000 (23:43 +0100)]
s4-torture: add test for clusapi_OpenResourceEx.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add test for clusapi_OpenClusterEx.
Günther Deschner [Thu, 5 Mar 2015 20:31:17 +0000 (21:31 +0100)]
s4-torture: add test for clusapi_OpenClusterEx.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolibrpc: add clusapi_DesiredAccessMask to IDL.
Günther Deschner [Thu, 5 Mar 2015 19:06:50 +0000 (20:06 +0100)]
librpc: add clusapi_DesiredAccessMask to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: test all available resources on the cluster.
Günther Deschner [Thu, 5 Mar 2015 15:49:02 +0000 (16:49 +0100)]
s4-torture: test all available resources on the cluster.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: pass down resource name down to clusapi_OpenResource.
Günther Deschner [Thu, 5 Mar 2015 15:39:37 +0000 (16:39 +0100)]
s4-torture: pass down resource name down to clusapi_OpenResource.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolibrpc: add clusapi_ClusterNetworkState and clusapi_ClusterNetInterfaceState.
Günther Deschner [Thu, 5 Mar 2015 11:06:46 +0000 (12:06 +0100)]
librpc: add clusapi_ClusterNetworkState and clusapi_ClusterNetInterfaceState.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add more cluster group tests.
Günther Deschner [Thu, 5 Mar 2015 11:06:05 +0000 (12:06 +0100)]
s4-torture: add more cluster group tests.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: add test for clusapi_SetResourceName.
Günther Deschner [Thu, 5 Mar 2015 11:04:54 +0000 (12:04 +0100)]
s4-torture: add test for clusapi_SetResourceName.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agoclusapi: add clusapi_CreateResourceFlags to IDL and torture test.
Günther Deschner [Thu, 5 Mar 2015 11:04:02 +0000 (12:04 +0100)]
clusapi: add clusapi_CreateResourceFlags to IDL and torture test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolibrpc: add clusapi_ClusterGroupState enum to IDL.
Günther Deschner [Thu, 5 Mar 2015 10:42:30 +0000 (11:42 +0100)]
librpc: add clusapi_ClusterGroupState enum to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: fix clusapi_SetClusterName test by re-setting existing cluster name.
Günther Deschner [Wed, 4 Mar 2015 14:34:29 +0000 (15:34 +0100)]
s4-torture: fix clusapi_SetClusterName test by re-setting existing cluster name.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: use clusapi_ClusterNodeState enum in torture test.
Günther Deschner [Wed, 4 Mar 2015 14:33:45 +0000 (15:33 +0100)]
s4-torture: use clusapi_ClusterNodeState enum in torture test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolibrpc: add clusapi_ClusterNodeState enum to IDL.
Günther Deschner [Wed, 4 Mar 2015 14:31:25 +0000 (15:31 +0100)]
librpc: add clusapi_ClusterNodeState enum to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: use clusapi_ClusterResourceState enum in torture test.
Günther Deschner [Wed, 4 Mar 2015 14:28:32 +0000 (15:28 +0100)]
s4-torture: use clusapi_ClusterResourceState enum in torture test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agolibrpc: add clusapi_ClusterResourceState enum to IDL.
Günther Deschner [Wed, 4 Mar 2015 14:27:46 +0000 (15:27 +0100)]
librpc: add clusapi_ClusterResourceState enum to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos4-torture: use a specific resource clusapi testcase.
Günther Deschner [Fri, 6 Mar 2015 12:53:13 +0000 (13:53 +0100)]
s4-torture: use a specific resource clusapi testcase.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>