gd/samba-autobuild/.git
6 months agobootstrap/dists: add rendered files for dists
Joe Guo [Tue, 12 Feb 2019 00:01:17 +0000 (13:01 +1300)]
bootstrap/dists: add rendered files for dists

Add these into repo, then we can link it to samba wiki,
for people to get a latest and precise pkg list

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agobootstrap/docker.py: add cli to build/tag/push docker images
Joe Guo [Sun, 17 Feb 2019 23:47:50 +0000 (12:47 +1300)]
bootstrap/docker.py: add cli to build/tag/push docker images

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agobootstrap/template.py: add cli to render templates
Joe Guo [Sun, 17 Feb 2019 23:31:28 +0000 (12:31 +1300)]
bootstrap/template.py: add cli to render templates

- bootstrap for each dist
- Dockerfile for each dist
- Vagrantfile all in one

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agobootstrap/config.py: define package lists and templates
Joe Guo [Thu, 7 Feb 2019 01:07:33 +0000 (14:07 +1300)]
bootstrap/config.py: define package lists and templates

Define default pkg list, and allow to override for each dist.
Also define bootstrap/Dockerfile/Vagrantfile templates.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agoselftest/tests: add smoketests for dbcheck --quick-membership-checks
Joe Guo [Fri, 15 Feb 2019 09:55:51 +0000 (22:55 +1300)]
selftest/tests: add smoketests for dbcheck --quick-membership-checks

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agoselftest/tests: add helper method to simplify plantestsuite
Joe Guo [Fri, 15 Feb 2019 09:15:23 +0000 (22:15 +1300)]
selftest/tests: add helper method to simplify plantestsuite

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agodbcheck: skip reverse member link checks when cli option specified
Joe Guo [Thu, 3 Jan 2019 02:55:16 +0000 (15:55 +1300)]
dbcheck: skip reverse member link checks when cli option specified

currently dbcheck cmd tooks about 1 day to finish on a 100k user database.
We can skip member reverse link checks to speed it up dramatically.
A new cli option is added to enable the skipping.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos4/param: Fix provision_get_schema leaking python object
Noel Power [Fri, 15 Feb 2019 10:04:23 +0000 (10:04 +0000)]
s4/param: Fix provision_get_schema leaking python object

provision_get_schema returns a ldb_context object which is stored
in a python object. As a result the parent python object is never
decrefed and probably not released ever.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agovfs_ceph: refactor if-error-return-else logic
David Disseldorp [Mon, 18 Feb 2019 23:33:06 +0000 (00:33 +0100)]
vfs_ceph: refactor if-error-return-else logic

vfs_ceph has quite a few occurrences of:
if (result < 0) {
WRAP_RETURN(result); /* calls return */
} else {
...
}

This change drops the superfluous else {} encapsulation and also removes
duplication of ceph statx debug messages.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Feb 20 13:56:09 CET 2019 on sn-devel-144

6 months agovfs_glusterfs: check for VFS_ADD_FSP_EXTENSION() failure
David Disseldorp [Mon, 18 Feb 2019 16:41:08 +0000 (17:41 +0100)]
vfs_glusterfs: check for VFS_ADD_FSP_EXTENSION() failure

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 months agoWHATSNEW: winbind authentication logging
Gary Lockyer [Wed, 6 Feb 2019 20:57:14 +0000 (09:57 +1300)]
WHATSNEW: winbind authentication logging

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 20 07:43:10 CET 2019 on sn-devel-144

6 months agowinbind: Log PAM and NTLM authentications.
Gary Lockyer [Mon, 28 Jan 2019 02:31:46 +0000 (15:31 +1300)]
winbind: Log PAM and NTLM authentications.

Generate JSON authentication messages for winbind PAM_AUTH and
PAM_AUTH_CRAP requests.  The logon_id in these messages can be used to
link them to the SamLogon messages.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agowinbind: Generate and pass logon ID
Gary Lockyer [Fri, 1 Feb 2019 00:49:49 +0000 (13:49 +1300)]
winbind: Generate and pass logon ID

Generate a random logon_id and pass it in the SamLogon calls.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agokdc hdb: Generate and pass logon ID
Gary Lockyer [Fri, 1 Feb 2019 00:46:01 +0000 (13:46 +1300)]
kdc hdb: Generate and pass logon ID

Generate and pass the logon_id in SamLogon calls

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos4 rpc netlogon: Pass logon_id to auth logging
Gary Lockyer [Thu, 31 Jan 2019 20:41:18 +0000 (09:41 +1300)]
s4 rpc netlogon: Pass logon_id to auth logging

Pass the logon_id passed in the netlogon identity information to
auth_logging.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agoauth log: Log the netlogon logon id.
Gary Lockyer [Thu, 31 Jan 2019 20:40:10 +0000 (09:40 +1300)]
auth log: Log the netlogon logon id.

Add code to log the logonId in the JSON Authentication messages.

The version number for Authentication messages changes from 1.1 to 1.2
to reflect this.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolibrpc idl: netlogon netr_identity_info logon_id to 64 bit
Gary Lockyer [Thu, 20 Dec 2018 02:02:30 +0000 (15:02 +1300)]
librpc idl: netlogon netr_identity_info logon_id to 64 bit

Fold the two 32 bit values logon_id_high and logon_id_low into a single
64 bit logon_id in netr_identity_info.  This will be used to tie
together winbind and SamLogon requests in audit logging.

Summary of the of the Query and Response from Microsoft on it's usage.

[REG:119013019612095] [MS-NRPC]: NETLOGON_LOGON_IDENTITY_INFO: Does
the Reserved field have LogonId meaning?

Questions:
  In NetrLogonSamLogonEx does the Reserved field
  (of NETLOGON_LOGON_IDENTITY_INFO) have LogonId meaning?

  What is a valid LogonID, and does have any audit usage?

  Samba is sending a constant "deadbeef" in hex and would like to
  understand any usage of this field.

Response:
  The NRPC spec is accurate in defining the field as Reserved, and without
  protocol significance. In the header file in our source code, it is
  defined as LogonId and commented as such, but it’s effectively not used.
  This is probably why the API structure has that field name. It may have
  been intended as such but it’s not used.

Samba will send a random value in this field.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib util: Add function to generate random uint64_t
Gary Lockyer [Thu, 31 Jan 2019 20:33:53 +0000 (09:33 +1300)]
lib util: Add function to generate random uint64_t

Generate a random uint64_t , which will be used for the netlogon
logon_id.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos3 auth: Create messaging and lp contexts.
Gary Lockyer [Mon, 28 Jan 2019 02:30:23 +0000 (15:30 +1300)]
s3 auth: Create messaging and lp contexts.

If 'auth event notifications' are enabled create an imessaging_context
and a loadparm_context that can be passed to log_authentication_event.

This will allow the generated authentication messages to be tested.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos3 winbind auth_log: Tests for logon id logging.
Gary Lockyer [Mon, 21 Jan 2019 20:16:05 +0000 (09:16 +1300)]
s3 winbind auth_log: Tests for logon id logging.

Tests to validate that winbind generates a random logon_id and passes it
in the netlogon call.

This will allow the linking of the windbind authentication requests and
the SamLogon request on the DC.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agowbinfo: fix --ntlmv1 option
Gary Lockyer [Wed, 30 Jan 2019 21:52:07 +0000 (10:52 +1300)]
wbinfo: fix --ntlmv1 option

Currently using the --ntlmv1 option fails with an unknown option error.
This patch ensures that the option is correctly supported.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agoauth_log tests: Allow the remote address to be None
Gary Lockyer [Mon, 28 Jan 2019 02:27:29 +0000 (15:27 +1300)]
auth_log tests: Allow the remote address to be None

Allow self.remoteAddress to be None, remote address filtering is not
required for the winbind auth logging tests.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agoselftest: Add basic sanity-check tests for nopython target
Tim Beale [Sun, 17 Feb 2019 23:52:41 +0000 (12:52 +1300)]
selftest: Add basic sanity-check tests for nopython target

Previously we were only checking samba compiled OK with
--disable-python, not that it actually ran.

The main problem is all the make test framework is based around
subunit/smbtorture, neither of which we seem to build with
disable-python. However, for just a simple sanity-check, we can just
bypass all the subunit-filter work and just call the Perl code directly.
This works OK as long as it's just simple shell script tests that we're
running, as we can check the script's exit code directly.

The main thing that we really want to test is that we can start up the
smbd testenv and connect to it (i.e. a simple smbclient test).

This patch adds a new 'make test-nopython' target. This disables the
subunit filtering, and runs a small test-list that was generated manually.

Note that currently this has the limitation that it doesn't support known
failures or flapping tests. However, just checking that smd starts up OK
is probably OK for now.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 20 02:10:00 CET 2019 on sn-devel-144

6 months agoselftest: Abort if we fail to startup testenv with '--one' option
Tim Beale [Mon, 18 Feb 2019 02:34:51 +0000 (15:34 +1300)]
selftest: Abort if we fail to startup testenv with '--one' option

The --one selftest.pl option means abort when the first test fails.
However, when 'make test' fails to startup a testenv, it'll try to
continue and run other tests by default. When '--one' is used,
selftest.pl can just die() at that point.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos3:tests: Set/return $failed in test_smbclient_auth.sh
Tim Beale [Mon, 18 Feb 2019 02:28:49 +0000 (15:28 +1300)]
s3:tests: Set/return $failed in test_smbclient_auth.sh

Update the test so the shell script returns pass/fail as the exit code.

Note that subunit is just looking for 'failure:' in the test output for
whether the test passed or failed, so setting $failed isn't strictly
required.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agonssswitch: Log user access to kerberos
Andreas Schneider [Fri, 16 Nov 2018 17:23:35 +0000 (18:23 +0100)]
nssswitch: Log user access to kerberos

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Feb 18 13:01:12 CET 2019 on sn-devel-144

7 months ago.gitlab-ci.yml: merge .gitlab-ci-private.yml
Joe Guo [Fri, 15 Feb 2019 09:25:07 +0000 (22:25 +1300)]
.gitlab-ci.yml: merge .gitlab-ci-private.yml

`.gitlab-ci.yml` support conditional jobs with `only` and `except`.
And variables can be read from repo CI/CD settings as condition:

    build_samba:
      script: ...
      only:
        variables:
          - $SUPPORT_PRIVATE_TEST == 'yes'

Instead of having 2 copies of yml file, we can use this feature to
trigger private jobs only when a var like `SUPPORT_PRIVATE_TEST` is defined.

I've already added above var to our repos.
Once merged, we can remove custom CI config file in
gitlab repo settings, and remove .gitlab-ci-private.yml file from code.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 18 10:54:19 CET 2019 on sn-devel-144

7 months agowafsamba/symbols: change regex to match both rpath and runpath for different readelf...
Joe Guo [Thu, 14 Feb 2019 22:46:22 +0000 (11:46 +1300)]
wafsamba/symbols: change regex to match both rpath and runpath for different readelf output

In `wafsamba.dumplicate_symbols` test, it will use Popen to call:

    readelf --dynamic bin/default/source3/lib/netapi/examples/netlogon/netlogon_control2

then try to find rpath lib lines from output with regex:

    re_rpath     = re.compile(b'Library rpath: \[(.*)\]')

In ubuntu 14.04 docker image, which current CI is using, the actual output
from `readelf` is `runpath` instead of 'rpath':

    ...
    Library runpath: [/home/gitlab-runner/samba/bin/shared:/home/gitlab-runner/samba/bin/shared/private]\n'
    ...

So the regex never matched, and hide a bug.

In Ubuntu 1604 docker image, the output changes to `rpath` and matched the
regex, which expose the error in previous commit.

Improve the regex to match both `rpath` and `runpath`.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agowafsamba/symbols: always split Popen output by bytes
Joe Guo [Thu, 14 Feb 2019 22:23:17 +0000 (11:23 +1300)]
wafsamba/symbols: always split Popen output by bytes

In py3, `wafsamba.duplicate_symbols` test may fail:

    ...
    elfpipe = subprocess.Popen(['readelf', '--dynamic', binname], stdout=subprocess.PIPE).stdout
    ...

    File "./buildtools/wafsamba/symbols.py", line 153, in get_libs
        rpath.extend(m.group(1).split(":"))
    TypeError: a bytes-like object is required, not 'str'

Because Popen will always return bytestr even in py3, and ":" is a
unicode str in py3.  Change ":" to b":" to fix.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest: Initialize DC_SERVER/etc variables in one place
Tim Beale [Sun, 17 Feb 2019 20:28:37 +0000 (09:28 +1300)]
selftest: Initialize DC_SERVER/etc variables in one place

It's simpler to do setup DC_SERVER/etc in the same place we set
SERVER/etc. (Rather than initializing them for every single testenv,
like we were doing).

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 18 07:24:05 CET 2019 on sn-devel-144

7 months agoselftest: Add helper function to avoid repeated {DC_SERVER}=x
Tim Beale [Wed, 13 Feb 2019 02:52:00 +0000 (15:52 +1300)]
selftest: Add helper function to avoid repeated {DC_SERVER}=x

For every 2-DC testenv we setup, we copy the $DC_SERVER value of the
dependent testenv (i.e. the PDC) into the env variables for the new
testenv. This means DC_SERVER always points to the PDC (or first DC).

This adds a helper function to avoid repeating this code for every 2-DC
environment we setup.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest: Remove need for $RODC_DC_SERVER env variable
Tim Beale [Wed, 13 Feb 2019 02:37:24 +0000 (15:37 +1300)]
selftest: Remove need for $RODC_DC_SERVER env variable

Same deal as earlier patch - we can use the $SERVER env variable instead
and avoid the need for this extra variable.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest: Remove unused environment variables
Tim Beale [Wed, 13 Feb 2019 01:50:12 +0000 (14:50 +1300)]
selftest: Remove unused environment variables

We only really want generic environment variables. For 2+ DC
environments, we have the $SERVER and $DC_SERVER (aka PDC) variables.
However, lots of testenvs also export really specific environment
variables, e.g. VAMPIRE_2000_DC_SERVER_IP (despite that testenv being
only used for a single test case).

Previously the <testenv>_SERVER variable was used for DRS tests, but we
can avoid the need to do this now. The other variables are not used at
all.

The RODC and TRUST environment variables are still used by a few tests.
SUBDOM_DC_SERVER is only used within Samba4.pm and not exported.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agotests: Tweak DRS tests to avoid unnecessary env variables
Tim Beale [Wed, 13 Feb 2019 02:23:29 +0000 (15:23 +1300)]
tests: Tweak DRS tests to avoid unnecessary env variables

Each DC used in a DRS test has its own '<testenv>_SERVER' environment
variable, e.g. VAMPIRE_DC_SERVER. These variables are only used by
test.py for DRS, but they're not actually needed.

The $SERVER environment variable holds the same information, so we can
just use this in test.py instead.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest: Export DC conf path for special cases
Tim Beale [Mon, 11 Feb 2019 04:15:22 +0000 (17:15 +1300)]
selftest: Export DC conf path for special cases

In a few rare cases, a test needs to assert aspects both client-side and
server-side aspects. A typical example would be the audit logging, which
is exercising client-side behaviour, but also asserting the server-side
logging.

Usually this has involved a kludge in tests.py to either use
socket-wrapper explicitly, or hardcode in the server smb.conf path.

This patch exposes the existing SERVERCONFFILE env variable to the
tests. DC_SERVERCONFFILE has been added for 2 DC testenvs, where we need
the PDC's smb.conf.

The benefit of doing this way is the filepath/testenv-dependency logic
is all self-contained with the Perl code, and it doesn't bleed out into
tests.py as well.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest: Add common function to return cmd environment variables
Tim Beale [Wed, 30 Jan 2019 03:31:40 +0000 (16:31 +1300)]
selftest: Add common function to return cmd environment variables

We prefix samba-tool commands with a bunch of WRAPPER/CONF environment
variables, in order for the command to work properly. These variables
are duplicated all over the place in the selftest code. This patch adds
a helper function to return the variables, so we can reduce the required
code down to a single line in a lot of places.

A couple of exceptions I've left alone:
- drs replicate, which omits the RESOLV_WRAPPER_CONF/_HOSTS variables
  (I'm not sure whether that's deliberate or not).
- create_backup(), which uses the backupfromdc's krb5.conf rather than
  the new testenv.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agothird_party/nss_wrapper/wscript: check for libnsl and libsocket
Björn Jacke [Sat, 16 Feb 2019 00:23:29 +0000 (01:23 +0100)]
third_party/nss_wrapper/wscript: check for libnsl and libsocket

this is needed as there are HAVE_LIBNSL and HAVE_LIBSOCKET in the code and
Samba fails to build in a terrible obscure way on Solaris if this is not
working inside nss_wrapper here.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Sun Feb 17 15:05:20 CET 2019 on sn-devel-144

7 months agowaf: add library dependency for sendfile on Solaris
Björn Jacke [Sun, 10 Feb 2019 21:38:49 +0000 (22:38 +0100)]
waf: add library dependency for sendfile on Solaris

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agothird_party/nss_wrapper/wscript: fix check for gethostbyname
Björn Jacke [Sun, 10 Feb 2019 01:02:06 +0000 (02:02 +0100)]
third_party/nss_wrapper/wscript: fix check for gethostbyname

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: fix setting of RPATH_ST variable
Björn Jacke [Sun, 10 Feb 2019 02:41:50 +0000 (03:41 +0100)]
waf: fix setting of RPATH_ST variable

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowafsamba: we should also remove stale symlinks here
Björn Jacke [Mon, 11 Feb 2019 14:30:24 +0000 (15:30 +0100)]
wafsamba: we should also remove stale symlinks here

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: print the library name in which we search for a function
Björn Jacke [Mon, 11 Feb 2019 09:03:00 +0000 (10:03 +0100)]
waf: print the library name in which we search for a function

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: use the correct WERROR_CFLAGS in CHECK_CODE
Björn Jacke [Sun, 10 Feb 2019 00:29:22 +0000 (01:29 +0100)]
waf: use the correct WERROR_CFLAGS in CHECK_CODE

all the non gcc version were incorrectly set here till now

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: remove redundant WERROR flag
Björn Jacke [Sat, 9 Feb 2019 23:47:59 +0000 (00:47 +0100)]
waf: remove redundant WERROR flag

CHECK_CFLAGS always uses WERROR flags

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: remove duplicate WERROR cflags
Björn Jacke [Sat, 9 Feb 2019 23:44:14 +0000 (00:44 +0100)]
waf: remove duplicate WERROR cflags

WERROR flags are already added by the strict=True switch.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: fix compiler warnings in configure checks
Björn Jacke [Sat, 9 Feb 2019 23:07:57 +0000 (00:07 +0100)]
waf: fix compiler warnings in configure checks

the studio compiler issued here:

warning: statement not reached

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: fix WERROR_CFLAGS check
Björn Jacke [Sat, 9 Feb 2019 00:33:13 +0000 (01:33 +0100)]
waf: fix WERROR_CFLAGS check

if we found the right WERROR flags of the compiler then the compiler is right
to fail because we explicitly give it an empty file to compile. We
should not do that because that makes the almost successful test fail.
This fixed the studio compiler test.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agowaf: fix some missing newline compiler warnings
Björn Jacke [Sat, 9 Feb 2019 00:30:50 +0000 (01:30 +0100)]
waf: fix some missing newline compiler warnings

without a trailing newline the studio compiler issues:

warning: newline not last character in file

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months agosysquotas_4B: raise log level of a sometimes too noisy message
Björn Jacke [Tue, 12 Feb 2019 18:07:38 +0000 (19:07 +0100)]
sysquotas_4B: raise log level of a sometimes too noisy message

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agowaf/quotas: fail configure when quotas were requested but not found
Björn Jacke [Thu, 7 Feb 2019 03:39:04 +0000 (04:39 +0100)]
waf/quotas: fail configure when quotas were requested but not found

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agoquotas: remove legacy AIX quota code that is covered by sysquotas now
Bjoern Jacke [Thu, 31 Jan 2019 03:57:38 +0000 (21:57 -0600)]
quotas: remove legacy AIX quota code that is covered by sysquotas now

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agotests/sysquotas.c: include jfs/quota.h for 4B test on AIX
Bjoern Jacke [Thu, 31 Jan 2019 00:35:55 +0000 (18:35 -0600)]
tests/sysquotas.c: include jfs/quota.h for 4B test on AIX

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agoadd sysquotas_jfs2.c
Bjoern Jacke [Tue, 5 Feb 2019 22:52:33 +0000 (16:52 -0600)]
add sysquotas_jfs2.c

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosysquotas_4B: enable for jfs/quota.h on AIX
Bjoern Jacke [Thu, 31 Jan 2019 00:33:55 +0000 (18:33 -0600)]
sysquotas_4B: enable for jfs/quota.h on AIX

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosysquotas_4B: make quota block calculation adopt to platform quota block size
Bjoern Jacke [Tue, 5 Feb 2019 23:23:35 +0000 (17:23 -0600)]
sysquotas_4B: make quota block calculation adopt to platform quota block size

the correct QUOTABLOCK_SIZE for platform is taken from sysquotas.h

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agowaf: check for jfs/quota.h
Bjoern Jacke [Thu, 31 Jan 2019 00:27:12 +0000 (18:27 -0600)]
waf: check for jfs/quota.h

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosysquotas.h: collect more platform quotablock sizes
Bjoern Jacke [Thu, 31 Jan 2019 18:01:36 +0000 (12:01 -0600)]
sysquotas.h: collect more platform quotablock sizes

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agotests/quota: tidy up includes of sysquotas 4B
Bjoern Jacke [Wed, 30 Jan 2019 23:55:06 +0000 (17:55 -0600)]
tests/quota: tidy up includes of sysquotas 4B

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosysquotas_nfs: also honor reported inode/file limits
Björn Jacke [Sat, 9 Feb 2019 23:51:23 +0000 (00:51 +0100)]
sysquotas_nfs: also honor reported inode/file limits

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosysquotas_xfs: fix inode limit setting, which is not depeding on blocksize
Björn Jacke [Thu, 7 Feb 2019 03:23:13 +0000 (04:23 +0100)]
sysquotas_xfs: fix inode limit setting, which is not depeding on blocksize

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosysquotas_linux: fix inode limit setting, which is not depeding on blocksize
Björn Jacke [Thu, 7 Feb 2019 02:35:01 +0000 (03:35 +0100)]
sysquotas_linux: fix inode limit setting, which is not depeding on blocksize

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agontquotas: do not set inode limits when setting space quota
Björn Jacke [Thu, 14 Feb 2019 11:09:38 +0000 (12:09 +0100)]
ntquotas: do not set inode limits when setting space quota

we are supposed to set a space quota limit, we should not calculate an
additional artifical inode limit out of that.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
7 months agoreplace: remove needless vxfs header file check
Björn Jacke [Wed, 6 Feb 2019 21:53:00 +0000 (22:53 +0100)]
replace: remove needless vxfs header file check

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 months agosambaundoguididx: use the right escaped oder unescaped sam ldb files
Björn Jacke [Wed, 23 Jan 2019 13:01:26 +0000 (14:01 +0100)]
sambaundoguididx: use the right escaped oder unescaped sam ldb files

the correct filename is taken from the partition database before, we should not
unescape that because this can result in a new unescaped ldb file being created
and the script not to work at all.

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 months ago.gitignore: add ignore rules for a few dev tools
Joe Guo [Thu, 7 Feb 2019 22:25:44 +0000 (11:25 +1300)]
.gitignore: add ignore rules for a few dev tools

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-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): Fri Feb 15 06:07:07 CET 2019 on sn-devel-144

7 months agoautobuild: Drop 'py2' flag
Tim Beale [Thu, 14 Feb 2019 23:20:10 +0000 (12:20 +1300)]
autobuild: Drop 'py2' flag

This isn't used any more. It was only being set, never referenced.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoautobuild: Replace samba-buildpy2-only with samba-nopython-py2
Tim Beale [Thu, 14 Feb 2019 23:17:49 +0000 (12:17 +1300)]
autobuild: Replace samba-buildpy2-only with samba-nopython-py2

For Samba 4.11, the minimum python2 functionality we will support (for
now, at least - we may change our minds) is for the --disable-python
target, i.e. if you're excluding all the python functionality from
samba, then WAF should still support being built with python2.

The use case here is old unix platforms that want to use smbd, but don't
have python3 support.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoautobuild: Remove ${EXTRA_PYTHON} variable
Tim Beale [Thu, 14 Feb 2019 22:58:51 +0000 (11:58 +1300)]
autobuild: Remove ${EXTRA_PYTHON} variable

We no longer build the python2 bindings, only python3. So we can get rid
of this variable now.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoautobuild: Tidy up unnecessary line-breaks in 'TESTS='
Tim Beale [Thu, 14 Feb 2019 22:45:53 +0000 (11:45 +1300)]
autobuild: Tidy up unnecessary line-breaks in 'TESTS='

Now that we've dropped the {PY3_ONLY} variable, there's no need for
line-breaks in some of the 'TESTS=' values. We can tidy this up a bit.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoautobuild: Remove the PY3_ONLY variable
Tim Beale [Thu, 14 Feb 2019 22:44:21 +0000 (11:44 +1300)]
autobuild: Remove the PY3_ONLY variable

This variable is no longer needed as all the tests run using python3
now.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoautobuild: Update variable name to make more sense
Tim Beale [Tue, 12 Feb 2019 23:41:34 +0000 (12:41 +1300)]
autobuild: Update variable name to make more sense

When we switched from python2 being the default to python3, we didn't
update this variable name. It's now handling the python2 case, but it's
a boolean flag named 'py3', which is rather confusing.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoautobuild: Drop py2 autobuild jobs
Tim Beale [Tue, 12 Feb 2019 23:12:18 +0000 (12:12 +1300)]
autobuild: Drop py2 autobuild jobs

Samba v4.11 will no longer support python2, so let's drop the autobuild
jobs. This will save some gitlab/sn-devel time and money, as it's less
work for CI to do.

Note that this highlights some previous inconsistencies:
- samba-none-env-py2 was being built for gitlab but not sn-devel.
- samba-nt4-py2 was being built for sn-devel but not gitlab

I've left samba-buildpy2-only for now, which will be addressed in a
subsequent patch.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agogitlab-ci: Rename DOCKER to CONTAINER
Andreas Schneider [Thu, 14 Feb 2019 07:19:46 +0000 (08:19 +0100)]
gitlab-ci: Rename DOCKER to CONTAINER

This is just a runc container, not tied to docker. See podman.io

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 14 17:32:38 CET 2019 on sn-devel-144

7 months agowaf: Do not install internal header
Andreas Schneider [Wed, 13 Feb 2019 09:44:45 +0000 (10:44 +0100)]
waf: Do not install internal header

We should not install header files without an public API:

- memory.h
- safe_strings.h
- talloc_stack.h

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agolib:util: Move discard_const(_p) to own header for libndr.h
Andreas Schneider [Wed, 6 Feb 2019 15:05:48 +0000 (16:05 +0100)]
lib:util: Move discard_const(_p) to own header for libndr.h

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agopidl: Use NDR_ZERO_STRUCT(P) macros
Andreas Schneider [Wed, 13 Feb 2019 09:41:19 +0000 (10:41 +0100)]
pidl: Use NDR_ZERO_STRUCT(P) macros

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agolibrpc:ndr: Add NDR_ZERO_STRUCT(P) macros
Andreas Schneider [Wed, 13 Feb 2019 09:38:02 +0000 (10:38 +0100)]
librpc:ndr: Add NDR_ZERO_STRUCT(P) macros

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agolibrpc:ndr: Implement ndr_zero_memory()
Andreas Schneider [Wed, 13 Feb 2019 09:35:13 +0000 (10:35 +0100)]
librpc:ndr: Implement ndr_zero_memory()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agolib:util: Add GPL header to tftw.c
Andreas Schneider [Wed, 6 Feb 2019 16:03:59 +0000 (17:03 +0100)]
lib:util: Add GPL header to tftw.c

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agolib:util: Add missing "replace.h" header in tftw
Andreas Schneider [Wed, 6 Feb 2019 16:03:28 +0000 (17:03 +0100)]
lib:util: Add missing "replace.h" header in tftw

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 months agos4 dsdb util: samdb_client_site_name clean up
Gary Lockyer [Wed, 13 Feb 2019 21:53:37 +0000 (10:53 +1300)]
s4 dsdb util: samdb_client_site_name clean up

* Initialise pointers to NULL
* replace talloc_free with TALLOC_FREE
* add goto exit to ensure memory deallocated correctly

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 14 06:53:14 CET 2019 on sn-devel-144

7 months agos4 dsdb util: remove samdb_search_count
Gary Lockyer [Wed, 13 Feb 2019 20:19:21 +0000 (09:19 +1300)]
s4 dsdb util: remove samdb_search_count

All the uses have been replaced with calls to dsdb_domain_count, so it
is no longer needed.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agos4 dsdb util: samdb_client_site_name use dsdb_domain_count
Gary Lockyer [Wed, 13 Feb 2019 20:18:20 +0000 (09:18 +1300)]
s4 dsdb util: samdb_client_site_name use dsdb_domain_count

Replace the call to samdb_search_count with dsdb_domain_count. As this
is the only remaining caller of samdb_search_count, replacing it will
allow the removal of samdb_search_count.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agos4 rpc_server_samr: DomGeneralInformation use dsdb_domain_count
Gary Lockyer [Wed, 13 Feb 2019 20:33:57 +0000 (09:33 +1300)]
s4 rpc_server_samr: DomGeneralInformation use dsdb_domain_count

Use dsdb_domain_count instead of samdb_search_count to determine the
number of users, groups and aliases.  This gives a performance gain of
around 10%, reduces the total memory allocated and fixes the incorrect
count returned for aliases.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agos4 dsdb util: add dsdb_domain_count
Gary Lockyer [Wed, 13 Feb 2019 01:36:33 +0000 (14:36 +1300)]
s4 dsdb util: add dsdb_domain_count

This counts the number of objects that are in the domain,
provided a domain SID was supplied (otherwise it just
counts all the objects).

This routine avoids allocating memory for the full
result set by using a callback.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agos2 decrpc samr: Add tests for QueryDomainInfo
Gary Lockyer [Wed, 13 Feb 2019 01:34:06 +0000 (14:34 +1300)]
s2 decrpc samr: Add tests for QueryDomainInfo

Add tests for the number of domain users, groups and aliases returned by
QueryDomainInfo.

These tests revealed that the existing code was not checking the
returned elements to ensure they were part of the domain.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months ago.gitlab-ci.yml: Make docker image name more explicit
Tim Beale [Wed, 13 Feb 2019 23:26:26 +0000 (12:26 +1300)]
.gitlab-ci.yml: Make docker image name more explicit

The 'image' YAML tag implies a docker image, but for people who find
gitlab mysterious, let's make it blatantly obvious what we're doing
here.

+ added a comment
+ added 'DOCKER' to the variable names
+ removed 'BUILD', as we've now dropped this from all the job-names
+ tried to make the variable names consistent, both within the file and
WRT docker terminology

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 14 03:51:21 CET 2019 on sn-devel-144

7 months ago.gitlab-ci.yml: Include the actual command used by gitlab
Tim Beale [Wed, 13 Feb 2019 22:20:16 +0000 (11:20 +1300)]
.gitlab-ci.yml: Include the actual command used by gitlab

Someone who finds gitlab mysterious will have no idea what $CI_JOB_NAME
should be, if they wanted to reproduce the autobuild job manually. It
should be trivial to include the actual command being run in the logs.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months ago.gitlab-ci.yml: Re-indent comments on test times
Andrew Bartlett [Wed, 13 Feb 2019 20:55:45 +0000 (09:55 +1300)]
.gitlab-ci.yml: Re-indent comments on test times

(some of these need to be updated, but for now improve the formatting)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
7 months ago.gitlab-ci.yml: Use .extends to avoid duplication of autobuild command
Andrew Bartlett [Wed, 13 Feb 2019 03:43:51 +0000 (16:43 +1300)]
.gitlab-ci.yml: Use .extends to avoid duplication of autobuild command

This should make our .gitlab-ci.yml file much less overwealming.

The downside is that $CI_JOB_NAME is printed rather than the job name
in the log, but the upside is that the names must now strictly match.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
7 months ago.gitlab-ci.yml: Fix the registry as "registry.gitlab.com"
Andrew Bartlett [Wed, 13 Feb 2019 03:14:13 +0000 (16:14 +1300)]
.gitlab-ci.yml: Fix the registry as "registry.gitlab.com"

This is important as our team docker images are only in this registry, but
the .gitlab-ci.yml file is also run on other private GitLab hosts.

This partially undoes 8989916b5af6fed9c4c63035d4488583396b8c5a

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
7 months ago.gitlab-ci.yml: add retries on runner_system_failure/stuck_or_timeout_failure
Stefan Metzmacher [Mon, 11 Feb 2019 11:53:03 +0000 (12:53 +0100)]
.gitlab-ci.yml: add retries on runner_system_failure/stuck_or_timeout_failure

This hopefully avoids pipeline failures due too docker/runner
errors.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months ago.gitlab-ci*.yml: use 'extends: ' instead of YAML Anchors
Stefan Metzmacher [Mon, 11 Feb 2019 12:26:22 +0000 (13:26 +0100)]
.gitlab-ci*.yml: use 'extends: ' instead of YAML Anchors

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months ago.gitlab-ci*.yml: remove build_ prefixes
Stefan Metzmacher [Mon, 11 Feb 2019 11:47:29 +0000 (12:47 +0100)]
.gitlab-ci*.yml: remove build_ prefixes

It's useless to see 'builf_samba_ad...' 7 times in the gitlab pipeline summary.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months ago.gitlab-ci.yml: print out more information in the before_script section
Stefan Metzmacher [Mon, 11 Feb 2019 12:23:58 +0000 (13:23 +0100)]
.gitlab-ci.yml: print out more information in the before_script section

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoscript/autobuild.py: add 'lsb_release -a' and 'mount' to system-info.txt
Stefan Metzmacher [Mon, 11 Feb 2019 12:18:18 +0000 (13:18 +0100)]
script/autobuild.py: add 'lsb_release -a' and 'mount' to system-info.txt

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest:Samba4: wait for DNS names being registered
Stefan Metzmacher [Tue, 29 Jan 2019 12:57:04 +0000 (13:57 +0100)]
selftest:Samba4: wait for DNS names being registered

We can't reliable start tests without registered dns names.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agoselftest:Samba4: report when samba is started and ready
Stefan Metzmacher [Wed, 30 Jan 2019 12:44:04 +0000 (13:44 +0100)]
selftest:Samba4: report when samba is started and ready

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agosamba_dnsupdate: make rodc_dns_update() more robust against timing problems
Stefan Metzmacher [Thu, 7 Feb 2019 08:42:36 +0000 (09:42 +0100)]
samba_dnsupdate: make rodc_dns_update() more robust against timing problems

Without this we had an interesting race!

The messaging_dgm code caches connected datagram sockets based on the
destination pid for 1 second.

The fact that samba_dnsupdate constantly recreates its messaging
context (and the underlying datagram socket) means that we the winbindd
messaging context may get a stale connection. As a result sending any
message from winbindd back to samba_dnsupdate will result in
ECONNREFUSED.

That means the IRPC response from winbindd never reaches
samba_dnsupdate, which will then hit a timeout.

In turn samba_dnsupdate on the RODC times out.

This was a workaround for the problem, by having just one global
IRPC handle and thus just one messaging_dgm context.
The actual problem is solved a few commits before
("messages_dgm: Properly handle receiver re-initialization").
But we keep this as an performance optimization, which hopefully
means that the overall samba_dnsupdate is less likely to
timeout after the hardcoded 20 seconds.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 months agosamba_dnsupdate: make it clear that opts.use_file is active and we're not using nsupdate
Stefan Metzmacher [Thu, 7 Feb 2019 08:40:19 +0000 (09:40 +0100)]
samba_dnsupdate: make it clear that opts.use_file is active and we're not using nsupdate

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