abartlet/samba.git/.git
6 years agoAdd Samba Testing Policy to README.Coding samba-testing-policy
Andrew Bartlett [Wed, 21 Feb 2018 22:43:13 +0000 (11:43 +1300)]
Add Samba Testing Policy to README.Coding

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: change technique for running specific envs
Jamie McClymont [Thu, 1 Feb 2018 04:46:37 +0000 (17:46 +1300)]
selftest: change technique for running specific envs

Currently testsuites excluded with --exclude/--include-env are skipped when
encountered in the middle of a run, so they are included in progress reporting,
and the @todo list does not accurately show what will be done.

This change skips them earlier, preventing them from being added to @todo, as is
done with pattern-based including/excluding.

As well as making the progress indicator more accurate, this means that
selftest.pl can use @todo to determine when we are finished with an environment.

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: move to declaratively specifying environments and their dependencies
Jamie McClymont [Wed, 21 Feb 2018 00:33:49 +0000 (13:33 +1300)]
selftest: move to declaratively specifying environments and their dependencies

This removes the tangle of code for starting up dependencies, and allows
selftest.pl to query dependencies (hence it can know when things can be shut
down early and how to order environments for optimal memory usage - that patch
not yet submitted).

It also removes the slightly hacky special-casing of the ad_members, and sets
$target->{vars} centrally (so each setup_ function does not need to).

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: remove prototypes from some subroutine templates
Jamie McClymont [Thu, 8 Feb 2018 03:51:23 +0000 (16:51 +1300)]
selftest: remove prototypes from some subroutine templates

Rationale, as sent to samba-technical:

  > Why do you remove the explicit argument declarations for so many functions?
  > These declarations help catch usage errors, i.e. wrong number of calling
  > arguments, especially when you add arguments to functions.

  My understanding is that because these are object methods, the prototypes
  actually were not providing the checking benefits [see PERLSUB(1) (section
  "Prototypes")] -- this is evidenced by the fact that some of the prototypes I
  removed actually had the wrong number of arguments!

  Now that the subroutines are being dynamically called by function references,
  the checking also appears not to apply [see the same source].

  There was also a more concrete reason: the setup code will automatically set
  up multiple environment dependencies and pass each of their vars as an
  individual parameter. Accomplishing this was [seemingly] impossible with the
  prototypes in place.

  Additionally, there seems to be a consensus among perl devs that prototypes
  are generally harmful: see this post (by my colleague) for example:
  http://www.perlmonks.org/?node_id=406231

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbspool: Improve URI handling code
Andreas Schneider [Fri, 5 Jan 2018 09:50:57 +0000 (10:50 +0100)]
smbspool: Improve URI handling code

This also checks that the URI given via the environment variables
starts with smb://

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Feb 20 21:46:38 CET 2018 on sn-devel-144

6 years agotests: Add tests for parsing LDAPv3 and LDAPv2 filter strings
Andreas Schneider [Mon, 19 Feb 2018 11:08:26 +0000 (12:08 +0100)]
tests: Add tests for parsing LDAPv3 and LDAPv2 filter strings

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 19 23:47:08 CET 2018 on sn-devel-144

6 years agos3:tldap: Comment code for to LDAP escaping version
Andreas Schneider [Mon, 19 Feb 2018 11:29:55 +0000 (12:29 +0100)]
s3:tldap: Comment code for to LDAP escaping version

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agos3:tldap: Fix parsing LDAPv2 escaped strings
Andreas Schneider [Wed, 26 Jul 2017 15:48:34 +0000 (17:48 +0200)]
s3:tldap: Fix parsing LDAPv2 escaped strings

Yes, this is outdated, but the missing 'break' produces a compiler
warning.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython/tests/sites: ensure we can't manipulate subnets as non-admin
Douglas Bagnall [Thu, 15 Feb 2018 02:08:03 +0000 (15:08 +1300)]
python/tests/sites: ensure we can't manipulate subnets as non-admin

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

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosubnet: Avoid a segfault when renaming subnet objects
Garming Sam [Wed, 20 Sep 2017 02:55:11 +0000 (14:55 +1200)]
subnet: Avoid a segfault when renaming subnet objects

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoFix incorrect `ldbsearch` invocation
Timur I. Bakeyev [Mon, 11 Dec 2017 04:05:19 +0000 (05:05 +0100)]
Fix incorrect `ldbsearch` invocation

Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Mon Feb 19 12:31:38 CET 2018 on sn-devel-144

6 years agoRemove some bashisms from the test scripts
Timur I. Bakeyev [Mon, 11 Dec 2017 01:47:21 +0000 (02:47 +0100)]
Remove some bashisms from the test scripts

Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoDon't load LDB_MODULESDIR as a module file
Timur I. Bakeyev [Wed, 14 Feb 2018 01:31:58 +0000 (02:31 +0100)]
Don't load LDB_MODULESDIR as a module file

We are setting modules directory here(LDB_MODULESDIR) so treat it this
way, no need to attempt to load it as a module file.

Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
6 years agowinbind: Don't send "server_id" explicitly for DUMP_DOMAIN_LIST
Volker Lendecke [Tue, 13 Feb 2018 13:05:43 +0000 (14:05 +0100)]
winbind: Don't send "server_id" explicitly for DUMP_DOMAIN_LIST

messaging already provides the sender id

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): Fri Feb 16 00:56:36 CET 2018 on sn-devel-144

6 years agowinbind: Don't explicitly send "server_id" for ONLINESTATUS
Volker Lendecke [Tue, 13 Feb 2018 13:05:15 +0000 (14:05 +0100)]
winbind: Don't explicitly send "server_id" for ONLINESTATUS

Messaging already provides the sender id

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agorepl_metadata: Avoid silent skipping an object during DRS (due to RODC rename collisions)
Garming Sam [Wed, 14 Feb 2018 00:32:33 +0000 (13:32 +1300)]
repl_metadata: Avoid silent skipping an object during DRS (due to RODC rename collisions)

No error code was being set in this case, and so, we would commit the
HWM and UDV without actually having all the updates.

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

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): Thu Feb 15 10:18:42 CET 2018 on sn-devel-144

6 years agorepl_metadata: Avoid silent skipping an object during DRS (due to RODC name collisions)
Garming Sam [Wed, 14 Feb 2018 00:32:24 +0000 (13:32 +1300)]
repl_metadata: Avoid silent skipping an object during DRS (due to RODC name collisions)

No error code was being set in this case, and so, we would commit the
HWM and UDV without actually having all the updates.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotests/replica_sync_rodc: Test conflict handling on an RODC
Garming Sam [Wed, 14 Feb 2018 00:30:26 +0000 (13:30 +1300)]
tests/replica_sync_rodc: Test conflict handling on an RODC

There are two cases we are interested in:

1) RODC receives two identical DNs which conflict
2) RODC receives a rename to a DN which already exists

Currently these issues are ignored, but the UDV and HWM are being
updated, leading to objects/updates being skipped.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: Add RODC variables to list of those exported
Garming Sam [Wed, 14 Feb 2018 00:27:27 +0000 (13:27 +1300)]
selftest: Add RODC variables to list of those exported

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotests/drs_base: Allow the net drs replicate to try with a single object
Garming Sam [Wed, 14 Feb 2018 00:27:59 +0000 (13:27 +1300)]
tests/drs_base: Allow the net drs replicate to try with a single object

This eventually passes down the replicate single object exop.

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

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotests/replica_sync: Add some additional replication in setUp
Garming Sam [Wed, 14 Feb 2018 00:26:35 +0000 (13:26 +1300)]
tests/replica_sync: Add some additional replication in setUp

This should avoid some failures due to stale objects.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agobuildtools python: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 22:19:49 +0000 (11:19 +1300)]
buildtools python: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 15 05:40:55 CET 2018 on sn-devel-144

6 years agoscripts/ python: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:36:22 +0000 (10:36 +1300)]
scripts/ python: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest and autrobuild: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:35:53 +0000 (10:35 +1300)]
selftest and autrobuild: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agodrs torture python: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:34:23 +0000 (10:34 +1300)]
drs torture python: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosource4/scripting python: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:33:06 +0000 (10:33 +1300)]
source4/scripting python: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agodsdb python tests: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:31:33 +0000 (10:31 +1300)]
dsdb python tests: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba python tests: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:27:52 +0000 (10:27 +1300)]
samba python tests: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba python libs: convert 'except X, e' to 'except X as e'
Douglas Bagnall [Tue, 13 Feb 2018 21:18:36 +0000 (10:18 +1300)]
samba python libs: convert 'except X, e' to 'except X as e'

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool: convert 'except X, e' to 'except X as e' for all X
Douglas Bagnall [Tue, 13 Feb 2018 21:07:23 +0000 (10:07 +1300)]
samba-tool: convert 'except X, e' to 'except X as e' for all X

This is needed for Python 3 and is compatible with python 2.6

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: Avoid a build started around midnight failing (again)
Andrew Bartlett [Tue, 13 Feb 2018 22:29:54 +0000 (11:29 +1300)]
selftest: Avoid a build started around midnight failing (again)

This case most likely relates to Daylight Saving changes creating
a 23 hour day.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 years agosmbspool: Initialize empty_str on declaration
Andreas Schneider [Fri, 5 Jan 2018 09:43:18 +0000 (10:43 +0100)]
smbspool: Initialize empty_str on declaration

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoselftest: GnuTLS is already mandetory to build the AD DC
Andrew Bartlett [Sun, 11 Feb 2018 22:06:25 +0000 (11:06 +1300)]
selftest: GnuTLS is already mandetory to build the AD DC

This change avoids the code behind 'if have_tls_support' becoming untested
if the configure logic changes.  We already assert that we have GnuTLS
elsewhere in the AD DC build scripts.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agoselftest: Require jansson support for selftest of the AD DC
Andrew Bartlett [Sun, 11 Feb 2018 22:03:25 +0000 (11:03 +1300)]
selftest: Require jansson support for selftest of the AD DC

This avoids this code becoming untested if a package is not installed or
the configure test is accidentially broken.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
6 years agotest samba-tool drs showrepl: test --json output
Douglas Bagnall [Thu, 8 Feb 2018 03:01:41 +0000 (16:01 +1300)]
test samba-tool drs showrepl: test --json output

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool drs showrepl: add --json option for JSON output
Douglas Bagnall [Thu, 8 Feb 2018 02:52:01 +0000 (15:52 +1300)]
samba-tool drs showrepl: add --json option for JSON output

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamba-tool drs showrepl: restructure in preparation for --json
Douglas Bagnall [Fri, 2 Feb 2018 02:39:47 +0000 (15:39 +1300)]
samba-tool drs showrepl: restructure in preparation for --json

Basically we just separate data extraction from printing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotest samba-tool drs showrepl: test expected output more strictly
Douglas Bagnall [Thu, 8 Feb 2018 01:22:39 +0000 (14:22 +1300)]
test samba-tool drs showrepl: test expected output more strictly

We try to ensure the output has all the expected information in the
expected order.

Soon we're going to add a JSON output mode, and we are strengthening
the tests here to ensure we don't break anything.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotest samba-tool drs showrepl: fix formatting and unused imports
Douglas Bagnall [Thu, 8 Feb 2018 01:47:55 +0000 (14:47 +1300)]
test samba-tool drs showrepl: fix formatting and unused imports

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agotests: move samba-tool drs showrepl into its own suite
Douglas Bagnall [Fri, 2 Feb 2018 02:59:38 +0000 (15:59 +1300)]
tests: move samba-tool drs showrepl into its own suite

This is a simple copy of the sowrepl test to the new file, making room
to expand the test and (soon) to test JSON output.

pep-8 intentionally ignored to show this is a copy.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython.subunit: add assertRegexpMatches for Python 2.6
Douglas Bagnall [Sat, 10 Feb 2018 22:59:40 +0000 (11:59 +1300)]
python.subunit: add assertRegexpMatches for Python 2.6

This is used in python/samba/tests/samba_tool/provision_password_check.py

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: tests: Make tests of dsdb Python module Python 3 compatible
Lumir Balhar [Tue, 30 Jan 2018 17:55:12 +0000 (18:55 +0100)]
python: tests: Make tests of dsdb Python module Python 3 compatible

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: Port dsdb module to Python 3 compatible form.
Lumir Balhar [Tue, 30 Jan 2018 17:53:38 +0000 (18:53 +0100)]
python: Port dsdb module to Python 3 compatible form.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: Port samdb module to Python 3 compatible form
Lumir Balhar [Tue, 30 Jan 2018 17:52:11 +0000 (18:52 +0100)]
python: Port samdb module to Python 3 compatible form

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: Add `text_type` Python 2/3 compatible function name.
Lumir Balhar [Fri, 9 Feb 2018 19:49:36 +0000 (20:49 +0100)]
python: Add `text_type` Python 2/3 compatible function name.

This compatible function name represents `str` in Python 3
and `unicode` in Python 2.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: Port dsdb_dns module to Python 3 compatible form.
Lumir Balhar [Tue, 30 Jan 2018 17:47:32 +0000 (18:47 +0100)]
python: Port dsdb_dns module to Python 3 compatible form.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: Convert base64 encoded password to utf-8
Andreas Schneider [Tue, 30 Jan 2018 17:09:00 +0000 (18:09 +0100)]
python: Convert base64 encoded password to utf-8

Pair-Programmed-With: Alexander Bokovoy <ab@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopython: Generate random test usernames
Andreas Schneider [Tue, 30 Jan 2018 15:39:21 +0000 (16:39 +0100)]
python: Generate random test usernames

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agodocs: Add a not that 'wbinfo --user-groups' may be incomplete
Andreas Schneider [Wed, 14 Feb 2018 11:05:16 +0000 (12:05 +0100)]
docs: Add a not that 'wbinfo --user-groups' may be incomplete

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Feb 14 20:32:18 CET 2018 on sn-devel-144

6 years agolibsocket: Avoid an unnecessary else branch
Volker Lendecke [Sun, 4 Feb 2018 15:13:43 +0000 (15:13 +0000)]
libsocket: Avoid an unnecessary else branch

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): Tue Feb 13 21:07:17 CET 2018 on sn-devel-144

6 years agonet: Slightly simplify net_lookup_dsgetdcname()
Volker Lendecke [Sun, 4 Feb 2018 15:48:23 +0000 (15:48 +0000)]
net: Slightly simplify net_lookup_dsgetdcname()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agodsgetdcname: Add some const
Volker Lendecke [Fri, 12 Jan 2018 21:16:39 +0000 (22:16 +0100)]
dsgetdcname: Add some const

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agolibsmb: Fix an error path memleak
Volker Lendecke [Tue, 30 Jan 2018 12:47:35 +0000 (13:47 +0100)]
libsmb: Fix an error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agolibsmb: Fix destructor setup in unexpected.c
Volker Lendecke [Wed, 7 Feb 2018 07:55:03 +0000 (08:55 +0100)]
libsmb: Fix destructor setup in unexpected.c

The destructor does DLIST_REMOVE, so better make sure "client" is in fact
member of that list when the destructor fires

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agolibcli: Fix a cut&paste typo
Volker Lendecke [Sun, 4 Feb 2018 16:41:04 +0000 (16:41 +0000)]
libcli: Fix a cut&paste typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agonet: Add some {}
Volker Lendecke [Sun, 4 Feb 2018 15:45:57 +0000 (15:45 +0000)]
net: Add some {}

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agonbt_server: Fix a typo
Volker Lendecke [Mon, 29 Jan 2018 09:17:11 +0000 (10:17 +0100)]
nbt_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agolibnbt: Apply some const
Volker Lendecke [Fri, 2 Feb 2018 12:13:31 +0000 (13:13 +0100)]
libnbt: Apply some const

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agolibnbt: Use TALLOC_FREE
Volker Lendecke [Sat, 3 Feb 2018 12:48:35 +0000 (12:48 +0000)]
libnbt: Use TALLOC_FREE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agodocs: Fix smbpasswd manpage about password storage
Andreas Schneider [Mon, 12 Feb 2018 10:24:26 +0000 (11:24 +0100)]
docs: Fix smbpasswd manpage about password storage

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb 13 16:25:33 CET 2018 on sn-devel-144

6 years agosmbd: remove "id" from share_mode_entry
Volker Lendecke [Wed, 7 Feb 2018 13:32:37 +0000 (14:32 +0100)]
smbd: remove "id" from share_mode_entry

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 Feb 13 05:01:38 CET 2018 on sn-devel-144

6 years agosmbd: Pass "file_id" explicitly to send_break_to_none
Volker Lendecke [Wed, 7 Feb 2018 11:28:13 +0000 (12:28 +0100)]
smbd: Pass "file_id" explicitly to send_break_to_none

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Pass "file_id" explicitly to send_break_message()
Volker Lendecke [Wed, 7 Feb 2018 11:24:35 +0000 (12:24 +0100)]
smbd: Pass "file_id" explicitly to send_break_message()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosrvsvc: Avoid a dependency on share_mode_entry->id
Volker Lendecke [Wed, 7 Feb 2018 11:16:10 +0000 (12:16 +0100)]
srvsvc: Avoid a dependency on share_mode_entry->id

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Avoid a dependency on share_mode_entry->id
Volker Lendecke [Wed, 7 Feb 2018 11:11:10 +0000 (12:11 +0100)]
smbd: Avoid a dependency on share_mode_entry->id

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Avoid a dependency on share_mode_entry->id
Volker Lendecke [Wed, 7 Feb 2018 10:40:58 +0000 (11:40 +0100)]
smbd: Avoid a dependency on share_mode_entry->id

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Pass "file_id" explicitly to message_to_share_mode_entry()
Volker Lendecke [Wed, 7 Feb 2018 10:39:32 +0000 (11:39 +0100)]
smbd: Pass "file_id" explicitly to message_to_share_mode_entry()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Pass "file_id" explicitly into share_mode_entry_to_message()
Volker Lendecke [Wed, 7 Feb 2018 10:36:51 +0000 (11:36 +0100)]
smbd: Pass "file_id" explicitly into share_mode_entry_to_message()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Remove a redundant check
Volker Lendecke [Wed, 7 Feb 2018 10:14:31 +0000 (11:14 +0100)]
smbd: Remove a redundant check

The file ids in all share modes match the share_mode_data's one

We don't have a paranoia check for this, but the share mode is per inode.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Use "share_mode_data->id", not "share_mode_entry->id"
Volker Lendecke [Wed, 7 Feb 2018 10:13:40 +0000 (11:13 +0100)]
smbd: Use "share_mode_data->id", not "share_mode_entry->id"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosrvsvc: Use the passed-in file_id
Volker Lendecke [Wed, 7 Feb 2018 10:10:14 +0000 (11:10 +0100)]
srvsvc: Use the passed-in file_id

The one in share_mode_entry will go

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Pass in "file_id" into validate_my_share_entries
Volker Lendecke [Wed, 7 Feb 2018 10:09:10 +0000 (11:09 +0100)]
smbd: Pass in "file_id" into validate_my_share_entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Pass in "file_id" into share_mode_str()
Volker Lendecke [Wed, 7 Feb 2018 10:05:33 +0000 (11:05 +0100)]
smbd: Pass in "file_id" into share_mode_str()

This used to directly access share_entry->id, which will go

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosrvsvc: Use the passed-in file id, not the one from share_mode_entry
Volker Lendecke [Wed, 7 Feb 2018 09:52:23 +0000 (10:52 +0100)]
srvsvc: Use the passed-in file id, not the one from share_mode_entry

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Pass "file_id" through share_entry_forall
Volker Lendecke [Wed, 7 Feb 2018 09:43:11 +0000 (10:43 +0100)]
smbd: Pass "file_id" through share_entry_forall

It's also in the share_entry, but that is redundant and will go

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Fix a signed/unsigned hickup
Volker Lendecke [Wed, 7 Feb 2018 09:05:57 +0000 (10:05 +0100)]
smbd: Fix a signed/unsigned hickup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agowinbindd: Initialize the domain groups member
Andreas Schneider [Fri, 9 Feb 2018 15:19:53 +0000 (16:19 +0100)]
winbindd: Initialize the domain groups member

==9405== 4 errors in context 1 of 493:
==9405== Conditional jump or move depends on uninitialised value(s)
==9405==    at 0x7507F71: vfprintf (in /lib64/libc-2.12.so)
==9405==    by 0x75C515B: __vasprintf_chk (in /lib64/libc-2.12.so)
==9405==    by 0x2A8728: dbgtext (stdio2.h:199)
==9405==    by 0x22DCBB: winbindd_list_groups_done (winbindd_list_groups.c:127)
==9405==    by 0x6C7F568: _tevent_req_error (tevent_req.c:167)
==9405==    by 0x6C7F568: _tevent_req_error (tevent_req.c:167)
==9405==    by 0x6C7F568: _tevent_req_error (tevent_req.c:167)
==9405==    by 0x3CDAE8: dcerpc_binding_handle_call_done (binding_handle.c:445)
==9405==    by 0x6C7F568: _tevent_req_error (tevent_req.c:167)
==9405==    by 0x6C7F568: _tevent_req_error (tevent_req.c:167)
==9405==    by 0x202701: wbint_bh_raw_call_done (winbindd_dual_ndr.c:139)
==9405==    by 0x6C82C60: tevent_common_loop_timer_delay (tevent_timed.c:341)
==9405==    by 0x6C83CA1: epoll_event_loop_once (tevent_epoll.c:911)
==9405==    by 0x6C822D5: std_event_loop_once (tevent_standard.c:114)
==9405==    by 0x6C7DC3C: _tevent_loop_once (tevent.c:533)
==9405==    by 0x1D8A03: main (winbindd.c:1490)
==9405==  Uninitialised value was created by a heap allocation
==9405==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==9405==    by 0x6A71DCA: _talloc_array (in /usr/lib64/libtalloc.so.2.1.5)
==9405==    by 0x22D959: winbindd_list_groups_send (winbindd_list_groups.c:69)
==9405==    by 0x1D76BC: winbind_client_request_read (winbindd.c:647)
==9405==    by 0x23AF2A: wb_req_read_done (wb_reqtrans.c:126)
==9405==    by 0x6C83EA5: epoll_event_loop_once (tevent_epoll.c:728)
==9405==    by 0x6C822D5: std_event_loop_once (tevent_standard.c:114)
==9405==    by 0x6C7DC3C: _tevent_loop_once (tevent.c:533)
==9405==    by 0x1D8A03: main (winbindd.c:1490)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Feb 13 00:25:27 CET 2018 on sn-devel-144

6 years agowinbindd: Free is_parent before we terminate
Andreas Schneider [Fri, 9 Feb 2018 14:33:39 +0000 (15:33 +0100)]
winbindd: Free is_parent before we terminate

This makes valgrind happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbindd: Free memory before we exit the connect child
Andreas Schneider [Fri, 9 Feb 2018 14:27:42 +0000 (15:27 +0100)]
winbindd: Free memory before we exit the connect child

This will make valgrind happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agowinbind: Improve child selection
Volker Lendecke [Fri, 9 Feb 2018 09:27:55 +0000 (10:27 +0100)]
winbind: Improve child selection

This improves the situation when a client request blocks a winbind
child. This might be a slow samlogon or lookupnames to a domain that's
far away. With random selection of the child for new request coming in
we could end up with a long queue when other, non-blocked children
could serve those new requests. Choose the shortest queue.

This is an immediate and simple fix. Step two will be to have a
per-domain and not a per-child queue. Right now we're pre-selecting
the check-out queue at Fry's randomly without looking at the queue
length. With this change we're picking the shortest queue. The better
change will be what Fry's really does: One central queue and red/green
lights on the busy/free checkout counters.

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): Mon Feb 12 19:51:35 CET 2018 on sn-devel-144

6 years agotests/samba-tool user wdigest: fix a flapping test
Douglas Bagnall [Fri, 9 Feb 2018 10:09:41 +0000 (23:09 +1300)]
tests/samba-tool user wdigest: fix a flapping test

The output of something like

  samba-tool user getpassword $USER --attributes virtualWDigest01

contains an LDIF section with long strings folded on the 77th column.

To unfold this LDIF we were using:

   result = re.sub(r"\n\s*", '', out)

which worked fine EXCEPT when a space in the output happened to land
immediately after the fold and got eaten by the \s*.

Instead we remove just a single space after the line break, because
that is always what fold_string() in lib/ldb/common/ldb_ldif.c
inserts, and for this simple replacement we don't need the re module.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 12 05:21:01 CET 2018 on sn-devel-144

6 years agotests: SambaToolCmdTest.assertMatch() indicates what was asserted
Douglas Bagnall [Fri, 9 Feb 2018 01:29:43 +0000 (14:29 +1300)]
tests: SambaToolCmdTest.assertMatch() indicates what was asserted

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agowinbindd: WBFLAG_PAM_AUTH_PAC should call add_trusted_domain_from_auth() is the resul...
Stefan Metzmacher [Tue, 23 Jan 2018 22:13:12 +0000 (23:13 +0100)]
winbindd: WBFLAG_PAM_AUTH_PAC should call add_trusted_domain_from_auth() is the result is trusted

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Feb 10 13:08:50 CET 2018 on sn-devel-144

6 years agowinbindd: rename winbindd_pam_auth_pac_send and let it return validation
Stefan Metzmacher [Fri, 9 Feb 2018 07:38:18 +0000 (08:38 +0100)]
winbindd: rename winbindd_pam_auth_pac_send and let it return validation

Just a preperational step. The next commit will update the caller to
make use of the validation info.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: complete WBFLAG_PAM_AUTH_PAC handling in winbindd_pam_auth_crap_send()
Stefan Metzmacher [Tue, 23 Jan 2018 22:10:42 +0000 (23:10 +0100)]
winbindd: complete WBFLAG_PAM_AUTH_PAC handling in winbindd_pam_auth_crap_send()

winbindd_pam_auth_crap_recv() should not have any real logic.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: let winbindd_pam_auth_pac_send() compute info6 from PAC
Stefan Metzmacher [Tue, 23 Jan 2018 22:02:26 +0000 (23:02 +0100)]
winbindd: let winbindd_pam_auth_pac_send() compute info6 from PAC

This way we don't loose the DNS info and UPN. A subsequent commit will
let winbindd_pam_auth_pac_send() return the full validation info.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: call add_trusted_domain_from_auth() in winbindd_pam_auth_crap_done()
Stefan Metzmacher [Tue, 23 Jan 2018 21:00:35 +0000 (22:00 +0100)]
winbindd: call add_trusted_domain_from_auth() in winbindd_pam_auth_crap_done()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: get netr_SamInfo6 out of winbindd_dual_pam_auth_kerberos()
Stefan Metzmacher [Tue, 23 Jan 2018 20:34:46 +0000 (21:34 +0100)]
winbindd: get netr_SamInfo6 out of winbindd_dual_pam_auth_kerberos()

This way we don't loose dns_domain_name and user principal.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/rpc_client: add map_info6_to_validation()
Stefan Metzmacher [Tue, 23 Jan 2018 20:32:53 +0000 (21:32 +0100)]
s3/rpc_client: add map_info6_to_validation()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/auth: add create_info6_from_pac()
Stefan Metzmacher [Tue, 23 Jan 2018 20:32:25 +0000 (21:32 +0100)]
s3/auth: add create_info6_from_pac()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos4/auth_winbind: ask for validation level 6
Stefan Metzmacher [Tue, 23 Jan 2018 16:58:07 +0000 (17:58 +0100)]
s4/auth_winbind: ask for validation level 6

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: allow validation level 6 in winbind_SamLogon
Stefan Metzmacher [Tue, 23 Jan 2018 16:57:37 +0000 (17:57 +0100)]
winbindd: allow validation level 6 in winbind_SamLogon

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/rpc_client: add copy_netr_SamInfo6() and map_validation_to_info6()
Stefan Metzmacher [Tue, 23 Jan 2018 16:53:49 +0000 (17:53 +0100)]
s3/rpc_client: add copy_netr_SamInfo6() and map_validation_to_info6()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: introduce a cm_connect_netlogon_secure() which gives a valid netlogon_creds_ctx
Stefan Metzmacher [Fri, 2 Feb 2018 14:24:00 +0000 (15:24 +0100)]
winbindd: introduce a cm_connect_netlogon_secure() which gives a valid netlogon_creds_ctx

At lot of callers require a valid schannel connection.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: handle interactive logons in _winbind_SamLogon()
Stefan Metzmacher [Tue, 23 Jan 2018 16:39:15 +0000 (17:39 +0100)]
winbindd: handle interactive logons in _winbind_SamLogon()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: pass 'bool interactive' to winbind_dual_SamLogon()
Stefan Metzmacher [Tue, 23 Jan 2018 16:37:54 +0000 (17:37 +0100)]
winbindd: pass 'bool interactive' to winbind_dual_SamLogon()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: add a comment to a parameter in _winbind_SamLogon()
Stefan Metzmacher [Thu, 8 Feb 2018 16:23:49 +0000 (17:23 +0100)]
winbindd: add a comment to a parameter in _winbind_SamLogon()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: separate plaintext given and interactive in winbind_samlogon_retry_loop()
Stefan Metzmacher [Tue, 23 Jan 2018 15:36:45 +0000 (16:36 +0100)]
winbindd: separate plaintext given and interactive in winbind_samlogon_retry_loop()

We need to handle 4 cases:

plaintext_given=true  interactive=true
plaintext_given=false interactive=true
plaintext_given=true  interactive=false
plaintext_given=false interactive=false

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agos3/rpc_client: add rpccli_netlogon_interactive_logon()
Stefan Metzmacher [Fri, 9 Feb 2018 15:15:18 +0000 (16:15 +0100)]
s3/rpc_client: add rpccli_netlogon_interactive_logon()

This will be used in a subsequent commit.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agowinbindd: add_trusted_domain_from_auth() should not use dns_name = ""
Stefan Metzmacher [Tue, 23 Jan 2018 22:19:32 +0000 (23:19 +0100)]
winbindd: add_trusted_domain_from_auth() should not use dns_name = ""

Check whether the DNS domain name in the info6 struct is actually more
then just an empty string. If it is we want to call add_trusted_domain()
with NULL as DNS domain name argument.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>