summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wbinfo: fix --ntlmv1 optionGary Lockyer2019-02-201-0/+1
| | | | | | | | 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>
* auth_log tests: Allow the remote address to be NoneGary Lockyer2019-02-201-0/+3
| | | | | | | | 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>
* selftest: Add basic sanity-check tests for nopython targetTim Beale2019-02-204-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* selftest: Abort if we fail to startup testenv with '--one' optionTim Beale2019-02-201-1/+5
| | | | | | | | | | 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>
* s3:tests: Set/return $failed in test_smbclient_auth.shTim Beale2019-02-201-13/+16
| | | | | | | | | | | 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>
* nssswitch: Log user access to kerberosAndreas Schneider2019-02-181-5/+16
| | | | | | | | 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
* .gitlab-ci.yml: merge .gitlab-ci-private.ymlJoe Guo2019-02-182-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | `.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
* wafsamba/symbols: change regex to match both rpath and runpath for different ↵Joe Guo2019-02-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* wafsamba/symbols: always split Popen output by bytesJoe Guo2019-02-181-1/+2
| | | | | | | | | | | | | | | | | | | 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>
* selftest: Initialize DC_SERVER/etc variables in one placeTim Beale2019-02-181-45/+10
| | | | | | | | | | | | 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
* selftest: Add helper function to avoid repeated {DC_SERVER}=xTim Beale2019-02-181-42/+22
| | | | | | | | | | | | 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>
* selftest: Remove need for $RODC_DC_SERVER env variableTim Beale2019-02-183-6/+1
| | | | | | | | 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>
* selftest: Remove unused environment variablesTim Beale2019-02-183-91/+1
| | | | | | | | | | | | | | | | | | 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>
* tests: Tweak DRS tests to avoid unnecessary env variablesTim Beale2019-02-181-13/+15
| | | | | | | | | | | | 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>
* selftest: Export DC conf path for special casesTim Beale2019-02-182-0/+13
| | | | | | | | | | | | | | | | | | | | | 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>
* selftest: Add common function to return cmd environment variablesTim Beale2019-02-181-110/+30
| | | | | | | | | | | | | | | | | 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>
* third_party/nss_wrapper/wscript: check for libnsl and libsocketBjörn Jacke2019-02-171-0/+1
| | | | | | | | | | | | 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
* waf: add library dependency for sendfile on SolarisBjörn Jacke2019-02-172-1/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* third_party/nss_wrapper/wscript: fix check for gethostbynameBjörn Jacke2019-02-171-2/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: fix setting of RPATH_ST variableBjörn Jacke2019-02-171-1/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wafsamba: we should also remove stale symlinks hereBjörn Jacke2019-02-171-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: print the library name in which we search for a functionBjörn Jacke2019-02-171-1/+4
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: use the correct WERROR_CFLAGS in CHECK_CODEBjörn Jacke2019-02-171-7/+2
| | | | | | | 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>
* waf: remove redundant WERROR flagBjörn Jacke2019-02-171-1/+1
| | | | | | | CHECK_CFLAGS always uses WERROR flags Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: remove duplicate WERROR cflagsBjörn Jacke2019-02-171-1/+1
| | | | | | | 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>
* waf: fix compiler warnings in configure checksBjörn Jacke2019-02-171-4/+4
| | | | | | | | | the studio compiler issued here: warning: statement not reached Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* waf: fix WERROR_CFLAGS checkBjörn Jacke2019-02-171-2/+1
| | | | | | | | | | 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>
* waf: fix some missing newline compiler warningsBjörn Jacke2019-02-173-6/+7
| | | | | | | | | 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>
* sysquotas_4B: raise log level of a sometimes too noisy messageBjörn Jacke2019-02-171-1/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* waf/quotas: fail configure when quotas were requested but not foundBjörn Jacke2019-02-171-2/+5
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* quotas: remove legacy AIX quota code that is covered by sysquotas nowBjoern Jacke2019-02-171-122/+0
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* tests/sysquotas.c: include jfs/quota.h for 4B test on AIXBjoern Jacke2019-02-171-0/+4
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* add sysquotas_jfs2.cBjoern Jacke2019-02-174-0/+157
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sysquotas_4B: enable for jfs/quota.h on AIXBjoern Jacke2019-02-171-0/+4
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sysquotas_4B: make quota block calculation adopt to platform quota block sizeBjoern Jacke2019-02-171-25/+20
| | | | | | | 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>
* waf: check for jfs/quota.hBjoern Jacke2019-02-171-0/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sysquotas.h: collect more platform quotablock sizesBjoern Jacke2019-02-171-0/+10
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* tests/quota: tidy up includes of sysquotas 4BBjoern Jacke2019-02-171-4/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sysquotas_nfs: also honor reported inode/file limitsBjörn Jacke2019-02-171-0/+3
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sysquotas_xfs: fix inode limit setting, which is not depeding on blocksizeBjörn Jacke2019-02-171-4/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sysquotas_linux: fix inode limit setting, which is not depeding on blocksizeBjörn Jacke2019-02-171-4/+2
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* ntquotas: do not set inode limits when setting space quotaBjörn Jacke2019-02-171-15/+0
| | | | | | | 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>
* replace: remove needless vxfs header file checkBjörn Jacke2019-02-172-9/+1
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* sambaundoguididx: use the right escaped oder unescaped sam ldb filesBjörn Jacke2019-02-171-2/+1
| | | | | | | | | | | 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>
* .gitignore: add ignore rules for a few dev toolsJoe Guo2019-02-151-0/+12
| | | | | | | | | 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
* autobuild: Drop 'py2' flagTim Beale2019-02-151-9/+2
| | | | | | | 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>
* autobuild: Replace samba-buildpy2-only with samba-nopython-py2Tim Beale2019-02-152-11/+35
| | | | | | | | | | | | | 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>
* autobuild: Remove ${EXTRA_PYTHON} variableTim Beale2019-02-151-17/+8
| | | | | | | | 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>
* autobuild: Tidy up unnecessary line-breaks in 'TESTS='Tim Beale2019-02-151-21/+10
| | | | | | | | 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>
* autobuild: Remove the PY3_ONLY variableTim Beale2019-02-151-13/+10
| | | | | | | | 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>