Stefan Metzmacher [Wed, 7 Dec 2016 06:30:39 +0000 (07:30 +0100)]
libgpo: make use of cli_full_connection_creds()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 6 Dec 2016 14:59:12 +0000 (15:59 +0100)]
ads_struct
Andreas Schneider [Thu, 15 Sep 2016 08:48:19 +0000 (10:48 +0200)]
TODO: s3-libads: Pass cli_credentials to ads_sasl_spnego_gensec_bind()
Signed-off-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 1 Mar 2016 14:29:08 +0000 (15:29 +0100)]
TODO CRED_MUST_USE_KERBEROS without password s3-libads: Simplify ads_sasl_spnego_bind()
Stefan Metzmacher [Tue, 1 Mar 2016 20:25:13 +0000 (21:25 +0100)]
s3-libads: Use gensec GSSAPI for ads_sasl_gssapi_bind()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Thu, 6 Oct 2016 14:33:01 +0000 (16:33 +0200)]
auth: Add cli_credentials_ccache_update_principal()
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 6 Oct 2016 14:32:16 +0000 (16:32 +0200)]
auth: Add cli_credentials_ccache_get()
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 6 Oct 2016 06:47:40 +0000 (08:47 +0200)]
auth: Return username in get_principal if it contains an '@'
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 6 Oct 2016 13:28:29 +0000 (15:28 +0200)]
auth: Do not invalidate the cache on set_principal
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 6 Oct 2016 13:25:37 +0000 (15:25 +0200)]
Revert "auth: Call cli_credentials_ccache_reinit() in set_principal"
This reverts commit
2bfe4d053cb3e1bc4ed8acd050bc6861ece49105.
Andreas Schneider [Thu, 6 Oct 2016 06:18:16 +0000 (08:18 +0200)]
auth: Call cli_credentials_ccache_reinit() in set_principal
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 1 Oct 2016 09:37:39 +0000 (11:37 +0200)]
auth: Add new cli_credentials_ccache_destroy() function
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 1 Oct 2016 09:22:58 +0000 (11:22 +0200)]
auth: Add cli_credentials_ccache_reinit()
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 6 Oct 2016 07:30:20 +0000 (09:30 +0200)]
krb5_samba: Add krb5_free_string macro for Heimdal build
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 1 Oct 2016 08:57:23 +0000 (10:57 +0200)]
auth: Add a new cli_credentials_ccache_init()
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 19 Sep 2016 12:38:54 +0000 (14:38 +0200)]
s4-libsmb: Do not set empty password for gensec
GENSEC expects NULL as no password. There are too many places which
set "" instead of NULL. We plan to pass down the cli_credentials
structure anyway so this workaround should be ok for now.
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 19 Sep 2016 13:59:34 +0000 (15:59 +0200)]
auth: Do not set an empty realm
Just remove the @ sign and use it as a username.
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 19 Sep 2016 13:56:01 +0000 (15:56 +0200)]
auth: Do not set emtpy passwords for credentials
Signed-off-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Mon, 19 Sep 2016 10:42:27 +0000 (12:42 +0200)]
SKIP TESTS - DONT PUSH
Stefan Metzmacher [Wed, 22 Feb 2017 18:54:57 +0000 (19:54 +0100)]
sq gensec_gssapi_map_krb5_error
Stefan Metzmacher [Wed, 22 Feb 2017 05:30:23 +0000 (06:30 +0100)]
krb5 fallback
Stefan Metzmacher [Thu, 9 Feb 2017 13:51:24 +0000 (14:51 +0100)]
s4 make use of gensec_gssapi_try_kerberos()
Stefan Metzmacher [Thu, 29 Dec 2016 23:58:35 +0000 (00:58 +0100)]
TODO s4:auth/gensec: make use of gensec_gssapi... GENSEC_GSSAPI_HELPER
Stefan Metzmacher [Thu, 29 Dec 2016 16:51:17 +0000 (17:51 +0100)]
use gensec_gssapi_try_kerberos in source3/librpc/crypto/gse.c
Stefan Metzmacher [Thu, 29 Dec 2016 16:04:17 +0000 (17:04 +0100)]
auth/kerberos: add gensec_gssapi_try_kerberos()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 17 Feb 2017 16:52:08 +0000 (17:52 +0100)]
TODO improve pdb_samba_dsdb_get_trusteddom_creds
Stefan Metzmacher [Thu, 9 Feb 2017 06:57:51 +0000 (07:57 +0100)]
s3:libads: let get_kdc_ip_string() also return kpasswd_server entries for each kdc
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12515
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 9 Feb 2017 06:09:38 +0000 (07:09 +0100)]
s3:libads: improve the logic in get_kdc_ip_string()
This fixes possible memory leaks on 'mem_ctx' and
always adds :88 (also for ipv4 addresses).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12515
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 24 Feb 2017 14:37:16 +0000 (15:37 +0100)]
REQUIRE NEW ldb version auth/credentials: use LDB_FLG_DONT_CREATE_DB and avoid creating secrets.ldb on domain members
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 24 Feb 2017 14:36:24 +0000 (15:36 +0100)]
s4:param: pass flags via secrets_db_connect() to ldb_wrap_connect()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 10 May 2017 07:55:34 +0000 (09:55 +0200)]
sq Test python binding for package_PackagesBlob
Stefan Metzmacher [Wed, 10 May 2017 06:49:05 +0000 (08:49 +0200)]
selftest: only use the ntvfs server for ad_dc_ntvfs, rpc_proxy, promoted_dc and s4member*
Stefan Metzmacher [Wed, 10 May 2017 06:40:03 +0000 (08:40 +0200)]
Revert "s3:smbd: unimplement FSCTL_VALIDATE_NEGOTIATE_INFO with "server max protocol = SMB2_02""
This reverts commit
def878b3aa74c81303fe4ba3fe69e20ee579dd55.
Stefan Metzmacher [Wed, 10 May 2017 06:39:53 +0000 (08:39 +0200)]
works
Stefan Metzmacher [Fri, 5 May 2017 16:49:37 +0000 (18:49 +0200)]
s3:smbd: unimplement FSCTL_VALIDATE_NEGOTIATE_INFO with "server max protocol = SMB2_02"
A client that supports SMB3 will do a signed FSCTL_VALIDATE_NEGOTIATE_INFO
after a tree connect. This FSCTL_VALIDATE_NEGOTIATE_INFO call contains
the client capabilities, client guid, security mode and the array of supported
dialects. But if SMB 2.02 is negotiated the doesn't send these values to the
server in the first connection attempt (when the client starts with a SMB1 Negotiate).
Windows servers that only support SMB2 just return NT_STATUS_FILE_CLOSED
as answer to FSCTL_VALIDATE_NEGOTIATE_INFO.
We should do the same if we just pretend to support SMB 2.02,
as SMB 2.10 always include an SMB2 Negotiate request we can leave it as is.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12772
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 10 May 2017 06:05:02 +0000 (08:05 +0200)]
run samba3.blackbox.smbclient_auth.plain with -mSMB...
Stefan Metzmacher [Wed, 10 May 2017 05:53:07 +0000 (07:53 +0200)]
selftest: run nt4_member with server max protocol = SMB3_02
This makes sure we don't regress with it.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 10 May 2017 05:37:37 +0000 (07:37 +0200)]
Revert "s3:smbd: unimplement FSCTL_VALIDATE_NEGOTIATE_INFO with "server max protocol = SMB2_02""
This reverts commit
efa5e47869ee88e5984e6763a40efa1eb2e64c9e.
Arvid Requate [Wed, 3 May 2017 08:59:41 +0000 (10:59 +0200)]
Test python binding for package_PackagesBlob
Signed-off-by: Arvid Requate <requate@univention.de>
Stefan Metzmacher [Fri, 10 Mar 2017 16:41:46 +0000 (17:41 +0100)]
REVIEW: pidl/Python: make use of pyrpc_string_array_{from,to}_PyList()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
TODO: Reviewed-by: Arvid Requate <requate@univention.de>
Stefan Metzmacher [Tue, 9 May 2017 06:42:21 +0000 (08:42 +0200)]
pidl/Python: make use of pyrpc_PyStr_AsString() in ConvertStringFromPythonData()
This reduces the amount of generated code a lot.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 07:59:39 +0000 (09:59 +0200)]
pidl/Python: generate a ndr_PyLong_AsCheckedLongLong() helper function
This reduces the size of the generated C code a lot.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 07:59:39 +0000 (09:59 +0200)]
pidl/Python: generate a ndr_PyLong_AsCheckedUnsignedLongLong() helper function
This reduces the size of the generated C code a lot.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 14:05:12 +0000 (16:05 +0200)]
pidl/Python: improve generation of error checking in FromPythonToUnionFunction()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 14:04:18 +0000 (16:04 +0200)]
pidl/Python: fix talloc hierachy in FromPythonToUnionFunction()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 14:01:39 +0000 (16:01 +0200)]
pidl/Python: avoid generation of dead code in FromUnionToPythonFunction()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 13:02:02 +0000 (15:02 +0200)]
pidl/Python: improve error handling in PythonFunctionUnpackOut() results
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 07:17:20 +0000 (09:17 +0200)]
pidl/Python: improve error paths for Exceptions during the PyList construction
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 06:57:28 +0000 (08:57 +0200)]
pidl/Python: stop processing if fail to create a PyObject from a C type
If the conversion from a C variable into a PyObject fails
(typically is raises an Exception), we need to stop processing
and propagate the error.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Mon, 26 Jun 2017 12:54:12 +0000 (14:54 +0200)]
Revert "Test python binding for package_PackagesBlob"
This reverts commit
cfc69410bbf4598fd18e1e1bce262e8a247df926.
Arvid Requate [Wed, 3 May 2017 08:59:41 +0000 (10:59 +0200)]
Test python binding for package_PackagesBlob
Signed-off-by: Arvid Requate <requate@univention.de>
Arvid Requate [Fri, 10 Mar 2017 16:41:46 +0000 (17:41 +0100)]
SIGN-OFF s4:pyrpc: add pyrpc_string_array_{from,to}_PyList()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
TODO: Signed-off-by: Arvid Requate <requate@univention.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 06:31:13 +0000 (08:31 +0200)]
s4:pyrpc: add pyrpc_PyStr_AsString() helper function
This contains the logic that's currently used in the pidl generated
python bindings. Moving this to a helper function will remove a lot
of generated code.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 May 2017 06:55:55 +0000 (08:55 +0200)]
talloc: improve pytalloc error code paths if talloc* fails
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 10 Mar 2017 16:46:17 +0000 (17:46 +0100)]
Revert "TODO pyrpc_string_array_{from,to}_PyList()"
This reverts commit
27ec6e04894422e9988674985f8055bb9c7a6764.
Stefan Metzmacher [Fri, 10 Mar 2017 16:41:46 +0000 (17:41 +0100)]
TODO pyrpc_string_array_{from,to}_PyList()
Stefan Metzmacher [Wed, 15 Mar 2017 17:04:44 +0000 (17:04 +0000)]
cli_state_update_after_negprot source3/libsmb/cliconnect.c server_os...
Stefan Metzmacher [Mon, 8 May 2017 13:27:21 +0000 (15:27 +0200)]
overwrite... in cli_state_update_after_sesssetup
Stefan Metzmacher [Wed, 21 Jun 2017 14:02:50 +0000 (16:02 +0200)]
Revert "TODO NOT NEEDED cli_connect_sock_send/recv return sock_storage"
This reverts commit
6c0bd63a73bf8140fb92ea6896008109a0598097.
Stefan Metzmacher [Wed, 21 Jun 2017 14:02:20 +0000 (16:02 +0200)]
TODO NOT NEEDED cli_connect_sock_send/recv return sock_storage
Stefan Metzmacher [Tue, 20 Jun 2017 09:38:09 +0000 (11:38 +0200)]
Revert "s3:selftest: also run test_smbclient_s3.sh with PROTO=SMB3"
This reverts commit
b689e911a42481aa5a66827bbf0b80b93d60c5f8.
Stefan Metzmacher [Mon, 19 Jun 2017 19:54:33 +0000 (21:54 +0200)]
s3:libsmb: change the connect banner to "Server=[%s] Protocol=[%s]"
Stefan Metzmacher [Wed, 21 Jun 2017 14:03:32 +0000 (16:03 +0200)]
s3:libsmb: pass an optional const struct sockaddr_storage *dest_ss to cli_cm_open()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 21 Jun 2017 09:50:40 +0000 (11:50 +0200)]
s3:libsmb: pass 'dest_ss' from cli_cm_connect() via do_connect() to cli_connect_nb()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 21 Jun 2017 13:41:33 +0000 (15:41 +0200)]
TODO use cli_state_dup
Stefan Metzmacher [Wed, 21 Jun 2017 14:00:30 +0000 (16:00 +0200)]
TODO: s3:libsmb: add cli_state_dup()
This can be used to create a 2nd cli_state for
a different tcon on the same connection/session.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 21 Jun 2017 16:24:20 +0000 (18:24 +0200)]
Revert "run_oplock_cancel"
This reverts commit
fbd15d778d26c3061140537b64a4e6dc5baf5dad.
Stefan Metzmacher [Wed, 21 Jun 2017 16:12:10 +0000 (18:12 +0200)]
run_oplock_cancel
Stefan Metzmacher [Wed, 21 Jun 2017 16:24:02 +0000 (18:24 +0200)]
Revert "WORKS BUT NOT NEEDED s3:smbd: allow cancelling deferred SMB1 opens"
This reverts commit
bf5b33b83f7d0ca13d07d8c53651b8664df137ac.
Stefan Metzmacher [Wed, 21 Jun 2017 16:03:07 +0000 (18:03 +0200)]
WORKS BUT NOT NEEDED s3:smbd: allow cancelling deferred SMB1 opens
The Windows 2012R2 behaviour seems to be a NTCREATE response
with STATUS_CANCELLED, but the underlying open is not really
cancelled and a following open get SHARING_VIOLATION.
Stefan Metzmacher [Fri, 23 Jun 2017 15:13:59 +0000 (17:13 +0200)]
Revert "s3:libsmb: remove unused show_sessetup handling from do_connect()"
This reverts commit
b6f66cf85fafa08aed5692d76940908854310e93.
Stefan Metzmacher [Thu, 17 Aug 2017 15:46:30 +0000 (17:46 +0200)]
Revert "more enctypes..."
This reverts commit
f5cfd4aa8b4dfb442f1abfc61ef66cdb0b8cd09a.
Stefan Metzmacher [Thu, 17 Aug 2017 15:46:11 +0000 (17:46 +0200)]
more enctypes...
Stefan Metzmacher [Mon, 18 Feb 2019 11:47:30 +0000 (12:47 +0100)]
Revert "HACK... https://bugzilla.samba.org/show_bug.cgi?id=12892"
This reverts commit
4da2a7a9f9261ab18207699a102069040b652c24.
Stefan Metzmacher [Tue, 11 Jul 2017 16:05:14 +0000 (18:05 +0200)]
HACK... https://bugzilla.samba.org/show_bug.cgi?id=12892
Stefan Metzmacher [Wed, 16 Aug 2017 05:18:02 +0000 (07:18 +0200)]
s3:libsmb: add support for SMB2/3 in cli_chkpath()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12968
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Mon, 19 Jun 2017 06:08:50 +0000 (08:08 +0200)]
debug REVISION_MISMATCH
Stefan Metzmacher [Wed, 28 Jun 2017 07:09:14 +0000 (09:09 +0200)]
more [flag(NDR_SECRET)]...
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
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>
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>
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
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>