[SCM] Samba Shared Repository - branch v4-7-test updated
Karolin Seeger
kseeger at samba.org
Mon Aug 28 13:21:05 UTC 2017
The branch, v4-7-test has been updated
via 52d8cc3 s4:torture: The teardown function should just return
via 5b41f24 s4:torture: Delete printer before we remove the driver
via 4ed0884 s4:torture: Use a different driver name for add_driver tests
via 63945e1 [PATCH] WHATSNEW: Added links to Wiki documentation
via bec5eb1 vfs_default: Fix passing of errno from async calls
via 9ca3ad4 ctdb-client: Fix ctdb_attach() to use database flags
via b787635 ctdb-client: Optionally return database id from ctdb_ctrl_createdb()
via da1aad0 ctdb-client: Fix ctdb_ctrl_createdb() to use database flags
via 29270b0 ctdb-tests: Add a test to check databases are attached with correct flags
via 8fb3c3c ctdb-tests: Add functions to start/stop/restart a single local daemon
via 9774290 ctdb-tests: Add functions to start/stop/restart ctdb on single node
via 5568b2d s3:utils: Remove pointless if-clause for remote_machine
via c308ad1 s3:utils: Make sure we authenticate against our SAM name in smbpasswd
via 2fcedfb s3:utils: Pass domain to password_change() in smbpasswd
via 0714ae6 s3:utils: Make strings const passed to password_change() in smbpasswd
via a53ed1e s3:libsmb: Move prototye of remote_password_change()
via 34137a1 s3:libsmb: Pass domain to remote_password_change()
via c9eed50 s3:gse_krb5: make use of precalculated krb5 keys in fill_mem_keytab_from_secrets()
via 069dd3e s3:secrets: allow secrets_fetch_or_upgrade_domain_info() on an AD DC
via 173ea78 libcli/smb: debug an error if smb1cli_req_writev_submit() is called for SMB2/3
via f35dab5 s3: libsmb: Add cli_smb2_chkpath() and use from cli_chkpath().
via 639ec48 blackbox: Add test for 'net ads changetrustpw'
via f3fb65c s3:libads: Fix changing passwords with Kerberos
via fa0b6d5 s3:script: Untaint user supplied data in modprinter.pl
via cc9f583 s4:http/gensec: add missing tevent_req_done() to gensec_http_ntlm_update_done()
via 50ad7f1 s3:libsmb: let do_connect() debug the negotiation result similar to "session request ok"
via d5d9632 s3:libsmb: don't call cli_NetServerEnum() on SMB2/3 connections in SMBC_opendir_ctx()
via 84052d0 s3:smbclient: don't try any workgroup listing with "client min protocol = SMB2"
via 50a8102 s3:smbclient: improve the error messages for smbclient -L
via dcdeb33 s3:libsmb: let get_ipc_connect() use CLI_FULL_CONNECTION_FORCE_SMB1
via 3ba3f92 s3:libsmb: Print the kinit failed message with DBGLVL_NOTICE
via 09df2eb s3:utils: Do not report an invalid range for AD DC role
via cf604fb s4/lib/tls: Use SHA256 to sign the TLS certificates
via 21b585f heimdal: Fix printing a short int into a string
via 168bea2 s3:utils: Fix buffer size for snprintf and format string
via 3b9c9f0 s3:torture: Fix spoolss test to build with -O3
via 9850c58 s4:samdb: Fix building Samba with -O3
from 54ab11d s4: com: Replace erroneous inclusion of internal talloc.h header with external.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-7-test
- Log -----------------------------------------------------------------
commit 52d8cc3f87894c91bf2f902721f2b7ab59cff8ed
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 8 12:05:24 2017 +0200
s4:torture: The teardown function should just return
The teardown functions should not return on error but finish cleaning
up!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12984
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit c90069b26424752b15922de9cb796c431d2f3e08)
Autobuild-User(v4-7-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-7-test): Mon Aug 28 15:19:58 CEST 2017 on sn-devel-144
commit 5b41f24a6f71f51c620fe14051468caee3098c5d
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 8 10:40:19 2017 +0200
s4:torture: Delete printer before we remove the driver
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12984
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit bd44e435fa6a93d47a470f8ee95763a95eba4b5d)
commit 4ed08849e4c0bacc3c09f0688fb5bc3073824fc1
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 8 11:25:48 2017 +0200
s4:torture: Use a different driver name for add_driver tests
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12984
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit 731fe596ac0999d54aae03ce4175356c56b3c94b)
commit 63945e1f55b9507534afa9237a4d8b526f1db933
Author: Marc Muehlfeld <mmuehlfeld at samba.org>
Date: Mon Aug 28 10:54:43 2017 +0200
[PATCH] WHATSNEW: Added links to Wiki documentation
Signed-off-by: Marc Muehlfeld <mmuehlfeld at samba.org>
Reviewed-by: Karolin Seeger <kseeger at samba.org>
commit bec5eb17de21556d62a66aff634902ba1c39aa6c
Author: Christof Schmitt <cs at samba.org>
Date: Wed Aug 23 14:37:28 2017 -0700
vfs_default: Fix passing of errno from async calls
Current code assigns errno from async pthreadpool calls to the
vfs_default internal vfswrap_*_state. The callers of the vfs_*_recv
functions expect the value from errno in vfs_aio_state.error.
Correctly assign errno to vfs_aio_state.error and remove the unused
internal err variable.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12983
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit a6f391b8dd1fbfd1a370667dec1374284984c341)
commit 9ca3ad4f94850fdcc1b71ef51afb1012d535d917
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Aug 18 14:00:47 2017 +1000
ctdb-client: Fix ctdb_attach() to use database flags
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Fri Aug 25 13:32:58 CEST 2017 on sn-devel-144
(cherry picked from commit 1f7f112317e0c33bc088a204b3ee69ba48c3f449)
commit b78763510343147262a45dbf684bec6ee66d3062
Author: Amitay Isaacs <amitay at gmail.com>
Date: Wed Aug 23 12:09:22 2017 +1000
ctdb-client: Optionally return database id from ctdb_ctrl_createdb()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 9987fe7209c3bd44ea0015d98d0f92b65ec70700)
commit da1aad0590fa005d3f166cc1f472d56790b16053
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Aug 18 13:50:39 2017 +1000
ctdb-client: Fix ctdb_ctrl_createdb() to use database flags
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 4bd0a20a75db3b3c409c25a4bc59aed30464f047)
commit 29270b0e194b7aef71166b72d36b26f418ebe5b8
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Aug 18 14:27:10 2017 +1000
ctdb-tests: Add a test to check databases are attached with correct flags
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 9a92d712705356d18f70dfb779c18256794966b9)
commit 8fb3c3cf80280fbf4d5b439aefafe4669fcaa1d2
Author: Amitay Isaacs <amitay at gmail.com>
Date: Fri Aug 18 14:45:30 2017 +1000
ctdb-tests: Add functions to start/stop/restart a single local daemon
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 9691b72a8785c2bc2561bd6c897fea3c0cc2cbeb)
commit 97742907ee7e923e14d9f9945327fbc437a2e99f
Author: Amitay Isaacs <amitay at gmail.com>
Date: Tue Aug 22 12:53:43 2017 +1000
ctdb-tests: Add functions to start/stop/restart ctdb on single node
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12978
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
(cherry picked from commit 205969dd94f532a157e17a88191863e4af0c012c)
commit 5568b2d7660ce98856e250818496a372efed0d1c
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 22 15:46:07 2017 +0200
s3:utils: Remove pointless if-clause for remote_machine
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975
Review with: git show -U20
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlet <abartlet at samba.org>
(cherry picked from commit 4a4bfcb539b4489f397b2bc9369215b7e03e620e)
commit c308ad1149969e0663893ca663c544cea31e5d34
Author: Andreas Schneider <asn at samba.org>
Date: Fri Aug 18 16:17:08 2017 +0200
s3:utils: Make sure we authenticate against our SAM name in smbpasswd
If a local user wants to change his password using smbpasswd and the
machine is a domain member, we need to make sure we authenticate against
our SAM and not ask winbind.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlet <abartlet at samba.org>
(cherry picked from commit dc129a968afdac8be70f9756bd18a7bf1f4c3b02)
commit 2fcedfb29285ee875099afa5fd590f23ebc9b720
Author: Andreas Schneider <asn at samba.org>
Date: Fri Aug 18 16:14:57 2017 +0200
s3:utils: Pass domain to password_change() in smbpasswd
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlet <abartlet at samba.org>
(cherry picked from commit b483340639157fe95777672f5723455c48c3c616)
commit 0714ae6be195e9a3e6725e2f5f0d2527cb074612
Author: Andreas Schneider <asn at samba.org>
Date: Fri Aug 18 16:13:15 2017 +0200
s3:utils: Make strings const passed to password_change() in smbpasswd
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlet <abartlet at samba.org>
(cherry picked from commit 41a31a71abe144362fc7483fabba39aafa866373)
commit a53ed1ed6172ec22f5a5842e55838d50d340fad4
Author: Andreas Schneider <asn at samba.org>
Date: Fri Aug 18 16:10:06 2017 +0200
s3:libsmb: Move prototye of remote_password_change()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlet <abartlet at samba.org>
(cherry picked from commit c773844e7529b83b2633671c7bcf1e7b84ad7950)
commit 34137a10e79389ade3667efecb6b8d734b22c8f8
Author: Andreas Schneider <asn at samba.org>
Date: Fri Aug 18 16:08:46 2017 +0200
s3:libsmb: Pass domain to remote_password_change()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlet <abartlet at samba.org>
(cherry picked from commit 7a554ee7dcefdff599ebc6fbf4e128b33ffccf29)
commit c9eed50ba11db7f928a705e6d31399d597be8cb3
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Aug 17 17:45:21 2017 +0200
s3:gse_krb5: make use of precalculated krb5 keys in fill_mem_keytab_from_secrets()
This avoids a lot of cpu cycles, which were wasted for each single smb
connection, even if the client didn't use kerberos.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12973
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Fri Aug 18 10:04:57 CEST 2017 on sn-devel-144
(cherry picked from commit cd813f7fd9ee8e9d82a6bf6c98621c437f6974b2)
commit 069dd3e7f268eb4c46512f70b1511d2e9abb3557
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Aug 17 21:42:34 2017 +0200
s3:secrets: allow secrets_fetch_or_upgrade_domain_info() on an AD DC
The reason for the check is for write access as secrets.ldb is the
master database.
But secrets_fetch_or_upgrade_domain_info() just syncs the values
we got from if they got overwritten by secrets_store_machine_pw_sync().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12973
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 37e49a2af5bb1c40c17eab18ff9412f2ce79ef71)
commit 173ea784b3a33d249e694c37fe87bcf36866b714
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 16 22:27:15 2017 +0200
libcli/smb: debug an error if smb1cli_req_writev_submit() is called for SMB2/3
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12968
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Aug 18 04:45:03 CEST 2017 on sn-devel-144
(cherry picked from commit 9fb2562324e4381f8d0d5eaf864790ad770293b9)
commit f35dab51d09a3a42b7afb84fc94f8a594d4fd623
Author: Jeremy Allison <jra at samba.org>
Date: Wed Aug 16 15:48:01 2017 -0700
s3: libsmb: Add cli_smb2_chkpath() and use from cli_chkpath().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12968
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 428fc22e8bb7b7a74ba9e29bf962ebfbfd50c47b)
commit 639ec488e3c88f564c04768ae799956730966c4b
Author: Andreas Schneider <asn at samba.org>
Date: Wed Aug 9 12:14:34 2017 +0200
blackbox: Add test for 'net ads changetrustpw'
BUG: BUG: https://bugzilla.samba.org/show_bug.cgi?id=12956
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe at gmail.com>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Fri Aug 11 22:09:27 CEST 2017 on sn-devel-144
(cherry picked from commit e2c0fd36ba54d984b554248aecffd3e4e7f43e1f)
commit f3fb65c17c9d7f15ef54e435a4d0ef9c3223cce3
Author: Andreas Schneider <asn at samba.org>
Date: Wed Aug 9 18:14:23 2017 +0200
s3:libads: Fix changing passwords with Kerberos
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12956
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe at gmail.com>
(cherry picked from commit b81ca4f9dcbb378a95fb3ac31bfd9a1cbe505d7d)
commit fa0b6d5017ed82d44ccf4f6f16f125b4f583cfea
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 8 08:40:34 2017 +0200
s3:script: Untaint user supplied data in modprinter.pl
spoolss_SetPrinter fails because of the error produced by modprinter.pl.
Perl error:
Insecure dependency in open while running setgid at modprinter.pl line 76.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12950
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Guenther Deschner <gd at samba.org>
(cherry picked from commit f44917743512fa40f2833629dfd781f7c691ce62)
commit cc9f583bb5b4e166c917cc6e097235cee7f2b6d3
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Jul 20 11:56:21 2017 +0200
s4:http/gensec: add missing tevent_req_done() to gensec_http_ntlm_update_done()
This was missing in commit d718e92d5e145dccd492c46febc249e462ce50c6.
Sadly we can't have automated tests for this as we only implement
the client side for this protocol.
I've tested with using:
bin/smbtorture \
-W BLA --realm=BLA.BASE \
-s /dev/null -Uadministrator%A1b2C3d4 \
ncacn_http:w2k8r2-219[593,RpcProxy=w2k8r2-219.bla.base,HttpUseTls=false,HttpAuthOption=basic] \
rpc.epmapper.epmapper.Lookup_simple \
and:
bin/smbtorture \
-W BLA --realm=BLA.BASE \
-s /dev/null -Uadministrator%A1b2C3d4 \
ncacn_http:w2k8r2-219[593,RpcProxy=w2k8r2-219.bla.base,HttpUseTls=false,HttpAuthOption=ntlm] \
rpc.epmapper.epmapper.Lookup_simple \
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12919
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Jul 21 23:29:39 CEST 2017 on sn-devel-144
(cherry picked from commit 13f91927e0f642e58c70d7b0b2f68df861ac661c)
commit 50ad7f1186bbe12ce8c0b7a9fd9063bb9901d2bd
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 16 12:42:48 2017 +0200
s3:libsmb: let do_connect() debug the negotiation result similar to "session request ok"
Also modify non-specified max_protocol to be PROTOCOL_LATEST
(currently PROTOCOL_SMB3_11).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12881
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 2901ed0deb1324cacdc804fe5a09468a91661f9d)
commit d5d9632ae332afe82f92c0b6e5721808337e37c9
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 16 12:38:30 2017 +0200
s3:libsmb: don't call cli_NetServerEnum() on SMB2/3 connections in SMBC_opendir_ctx()
This is all we can do with when using we allow SMB2/3 and the server supports
it, 'smb://' can't work unless we implement LLMNR and maybe WSD.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12876
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit ecca95736d3994011de2d3fd882b58ab9b450a83)
commit 84052d07096d3d679ecb762203c5ebd54ee625be
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 16 08:56:39 2017 +0200
s3:smbclient: don't try any workgroup listing with "client min protocol = SMB2"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12863
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 379e5c1c2fa75c30b08bea7079cf1e9c46db0b26)
commit 50a81029aff7c0793c93a38cdfc3e757eb05b599
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 16 08:55:43 2017 +0200
s3:smbclient: improve the error messages for smbclient -L
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12863
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 3111463e743dfda89002f1047d1030ab617e5277)
commit dcdeb33aaa81561ddaf684aa30fb3b4b441096e6
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Jul 8 00:57:59 2017 +0200
s3:libsmb: let get_ipc_connect() use CLI_FULL_CONNECTION_FORCE_SMB1
get_ipc_connect() is only used in code paths that require cli_NetServerEnum()
to work, so it must already require SMB1 only.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12876
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 0f9d10246071160dc736205af234ab0ca456d0dc)
commit 3ba3f925cb3d527bb2cf0cea251572cb6fbbfb8a
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 24 12:51:35 2017 +0200
s3:libsmb: Print the kinit failed message with DBGLVL_NOTICE
The default debug level of smbclient is set to 'log level = 1'. So we
need to use at least NOTICE to not get the message when we do not force
kerberos.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12704
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 6d7681c73dc68930dc39f05d58c2679b7c84ad97)
commit 09df2ebb07c7085f7835c94c63914ccf52cbbdb6
Author: Andreas Schneider <asn at samba.org>
Date: Fri Aug 18 10:35:55 2017 +0200
s3:utils: Do not report an invalid range for AD DC role
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12629
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 95e30b081f273f2d156792577179c5220c0a10cc)
commit cf604fbff08e7d7dc16af1be0d878e363cd4ca65
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Aug 9 16:44:24 2017 +1200
s4/lib/tls: Use SHA256 to sign the TLS certificates
The use of SHA-1 has been on the "do not" list for a while now, so make our
self-signed certificates use SHA256 using the new
gnutls_x509_crt_sign2 provided since GNUTLS 1.2.0
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12953
(cherry picked from commit 5bb341fb9ceb943b4a72108edee9046b60f070b0)
commit 21b585f723d7214c470f79e97d84a5b3d2bd18d1
Author: Andreas Schneider <asn at samba.org>
Date: Wed Aug 9 17:01:09 2017 +0200
heimdal: Fix printing a short int into a string
The size of portstr is too small to print an integer and we should print
a short anyway.
This fixes building with GCC 7.1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Fri Aug 11 18:08:04 CEST 2017 on sn-devel-144
(cherry picked from commit abd74c3ba5e3ee3f5320bff6ed7dff4fbcb79373)
commit 168bea2bb7c7f0ad215327c747fe30eb9a5f334d
Author: Andreas Schneider <asn at samba.org>
Date: Wed Aug 9 08:37:38 2017 +0200
s3:utils: Fix buffer size for snprintf and format string
GCC 7.1 produces an error:
‘snprintf’ output between 47 and 66 bytes into a destination of size 40
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Wed Aug 9 13:37:47 CEST 2017 on sn-devel-144
(cherry picked from commit b86f44cbd0b1fcaf39c9edec764ecef2fd6a863b)
commit 3b9c9f070c04b9c4e2d97995f4abf0e1abdd6dc8
Author: Andreas Schneider <asn at samba.org>
Date: Wed Aug 9 08:23:29 2017 +0200
s3:torture: Fix spoolss test to build with -O3
Initialize variables so that we do not get a build warning that they
might be used uninitilized.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 1c3b678e7dc7481cf2e97cdf136358d5fe53d9d3)
commit 9850c58ceda53f5beefbd49d2cd4f02ef6bbce59
Author: Andreas Schneider <asn at samba.org>
Date: Wed Aug 9 07:45:04 2017 +0200
s4:samdb: Fix building Samba with -O3
gcc error: ‘result’ may be used uninitialized
This wont happen, because ldb will return and error, but the compiler
doesn't understand this.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit b5283c70e3924730b567772105ec6056831a6b53)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 6 +
ctdb/client/ctdb_client.c | 58 ++++----
ctdb/include/ctdb_client.h | 4 +-
ctdb/server/ctdb_recoverd.c | 13 +-
ctdb/tests/complex/34_nfs_tickle_restart.sh | 2 +-
ctdb/tests/scripts/integration.bash | 25 +++-
ctdb/tests/simple/21_ctdb_attach.sh | 127 +++++++++++++++++
ctdb/tests/simple/scripts/local_daemons.bash | 35 +++--
libcli/smb/smbXcli_base.c | 3 +
source3/client/client.c | 16 ++-
source3/include/proto.h | 6 -
source3/libads/krb5_setpw.c | 2 +-
source3/librpc/crypto/gse_krb5.c | 180 +++++++++++-------------
source3/libsmb/cli_smb2_fnum.c | 41 ++++++
source3/libsmb/cli_smb2_fnum.h | 2 +
source3/libsmb/cliconnect.c | 4 +-
source3/libsmb/clidfs.c | 9 +-
source3/libsmb/clifile.c | 8 +-
source3/libsmb/libsmb_dir.c | 13 ++
source3/libsmb/passchange.c | 5 +-
source3/libsmb/proto.h | 10 ++
source3/modules/vfs_default.c | 15 +-
source3/passdb/machine_account_secrets.c | 15 +-
source3/script/tests/printing/modprinter.pl | 15 +-
source3/utils/smbpasswd.c | 57 +++++---
source3/utils/status_profile.c | 4 +-
source3/utils/testparm.c | 16 ++-
source4/dsdb/samdb/ldb_modules/vlv_pagination.c | 2 +-
source4/heimdal/lib/krb5/krbhst.c | 4 +-
source4/lib/http/gensec/ntlm.c | 2 +-
source4/lib/tls/tlscert.c | 9 +-
source4/torture/rpc/spoolss.c | 74 ++++++----
testprogs/blackbox/test_net_ads.sh | 4 +
33 files changed, 544 insertions(+), 242 deletions(-)
create mode 100755 ctdb/tests/simple/21_ctdb_attach.sh
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index d738e4d..de74a99 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -103,6 +103,9 @@ KDB (Kerberos Database) driver to access the Samba AD database. When
provisioning an AD DC using 'samba-tool' it will take care of creating a correct
kdc.conf file for the MIT KDC.
+For further details, see:
+https://wiki.samba.org/index.php/Running_a_Samba_AD_DC_with_MIT_Kerberos_KDC
+
Dynamic RPC port range
----------------------
@@ -136,6 +139,9 @@ authentication, SMB and RPC authorization is covered, however password
changes are not at this stage, and this support is not currently
backed by a testsuite.
+For further details, see:
+https://wiki.samba.org/index.php/Setting_up_Audit_Logging
+
Multi-process LDAP Server
-------------------------
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 5ec3d00..b36d46e 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -1947,37 +1947,42 @@ int ctdb_ctrl_getdbseqnum(struct ctdb_context *ctdb, struct timeval timeout,
/*
create a database
*/
-int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode,
- TALLOC_CTX *mem_ctx, const char *name, bool persistent)
+int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout,
+ uint32_t destnode, TALLOC_CTX *mem_ctx,
+ const char *name, uint8_t db_flags, uint32_t *db_id)
{
int ret;
int32_t res;
TDB_DATA data;
- uint64_t tdb_flags = 0;
+ uint32_t opcode;
data.dptr = discard_const(name);
data.dsize = strlen(name)+1;
- /* Make sure that volatile databases use jenkins hash */
- if (!persistent) {
- tdb_flags = TDB_INCOMPATIBLE_HASH;
- }
-
-#ifdef TDB_MUTEX_LOCKING
- if (!persistent && ctdb->tunable.mutex_enabled == 1) {
- tdb_flags |= (TDB_MUTEX_LOCKING | TDB_CLEAR_IF_FIRST);
+ if (db_flags & CTDB_DB_FLAGS_PERSISTENT) {
+ opcode = CTDB_CONTROL_DB_ATTACH_PERSISTENT;
+ } else if (db_flags & CTDB_DB_FLAGS_REPLICATED) {
+ opcode = CTDB_CONTROL_DB_ATTACH_REPLICATED;
+ } else {
+ opcode = CTDB_CONTROL_DB_ATTACH;
}
-#endif
- ret = ctdb_control(ctdb, destnode, tdb_flags,
- persistent?CTDB_CONTROL_DB_ATTACH_PERSISTENT:CTDB_CONTROL_DB_ATTACH,
- 0, data,
+ ret = ctdb_control(ctdb, destnode, 0, opcode, 0, data,
mem_ctx, &data, &res, &timeout, NULL);
if (ret != 0 || res != 0) {
return -1;
}
+ if (data.dsize != sizeof(uint32_t)) {
+ TALLOC_FREE(data.dptr);
+ return -1;
+ }
+ if (db_id != NULL) {
+ *db_id = *(uint32_t *)data.dptr;
+ }
+ talloc_free(data.dptr);
+
return 0;
}
@@ -2118,12 +2123,10 @@ int ctdb_ctrl_db_open_flags(struct ctdb_context *ctdb, uint32_t db_id,
struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb,
struct timeval timeout,
const char *name,
- bool persistent)
+ uint8_t db_flags)
{
struct ctdb_db_context *ctdb_db;
- TDB_DATA data;
int ret;
- int32_t res;
int tdb_flags;
ctdb_db = ctdb_db_handle(ctdb, name);
@@ -2138,22 +2141,15 @@ struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb,
ctdb_db->db_name = talloc_strdup(ctdb_db, name);
CTDB_NO_MEMORY_NULL(ctdb, ctdb_db->db_name);
- data.dptr = discard_const(name);
- data.dsize = strlen(name)+1;
-
/* tell ctdb daemon to attach */
- ret = ctdb_control(ctdb, CTDB_CURRENT_NODE, 0,
- persistent?CTDB_CONTROL_DB_ATTACH_PERSISTENT:CTDB_CONTROL_DB_ATTACH,
- 0, data, ctdb_db, &data, &res, NULL, NULL);
- if (ret != 0 || res != 0 || data.dsize != sizeof(uint32_t)) {
+ ret = ctdb_ctrl_createdb(ctdb, timeout, CTDB_CURRENT_NODE,
+ ctdb_db, name, db_flags, &ctdb_db->db_id);
+ if (ret != 0) {
DEBUG(DEBUG_ERR,("Failed to attach to database '%s'\n", name));
talloc_free(ctdb_db);
return NULL;
}
- ctdb_db->db_id = *(uint32_t *)data.dptr;
- talloc_free(data.dptr);
-
ret = ctdb_ctrl_getdbpath(ctdb, timeout, CTDB_CURRENT_NODE, ctdb_db->db_id, ctdb_db, &ctdb_db->db_path);
if (ret != 0) {
DEBUG(DEBUG_ERR,("Failed to get dbpath for database '%s'\n", name));
@@ -2176,9 +2172,7 @@ struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb,
return NULL;
}
- if (persistent) {
- ctdb_db->db_flags = CTDB_DB_FLAGS_PERSISTENT;
- }
+ ctdb_db->db_flags = db_flags;
DLIST_ADD(ctdb->db_list, ctdb_db);
@@ -3925,7 +3919,7 @@ struct ctdb_transaction_handle *ctdb_transaction_start(struct ctdb_db_context *c
}
h->g_lock_db = ctdb_attach(h->ctdb_db->ctdb, timeval_current_ofs(3,0),
- "g_lock.tdb", false);
+ "g_lock.tdb", 0);
if (!h->g_lock_db) {
DEBUG(DEBUG_ERR, (__location__ " unable to attach to g_lock.tdb\n"));
talloc_free(h);
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index d4fd771..9ad9bdb 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -254,7 +254,7 @@ int ctdb_ctrl_getdbseqnum(struct ctdb_context *ctdb, struct timeval timeout,
int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, TALLOC_CTX *mem_ctx,
- const char *name, bool persistent);
+ const char *name, uint8_t db_flags, uint32_t *db_id);
int ctdb_ctrl_get_debuglevel(struct ctdb_context *ctdb, uint32_t destnode,
int32_t *level);
@@ -276,7 +276,7 @@ int ctdb_ctrl_db_open_flags(struct ctdb_context *ctdb, uint32_t db_id,
struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb,
struct timeval timeout,
const char *name,
- bool persistent);
+ uint8_t db_flags);
int ctdb_detach(struct ctdb_context *ctdb, uint32_t db_id);
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index b57be06..9488bc2 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -472,7 +472,7 @@ static int create_missing_remote_databases(struct ctdb_context *ctdb, struct ctd
ret = ctdb_ctrl_createdb(ctdb, CONTROL_TIMEOUT(),
nodemap->nodes[j].pnn,
mem_ctx, name,
- dbmap->dbs[db].flags & CTDB_DB_FLAGS_PERSISTENT);
+ dbmap->dbs[db].flags, NULL);
if (ret != 0) {
DEBUG(DEBUG_ERR, (__location__ " Unable to create remote db:%s\n", name));
return -1;
@@ -534,8 +534,9 @@ static int create_missing_local_databases(struct ctdb_context *ctdb, struct ctdb
nodemap->nodes[j].pnn));
return -1;
}
- ctdb_ctrl_createdb(ctdb, CONTROL_TIMEOUT(), pnn, mem_ctx, name,
- remote_dbmap->dbs[db].flags & CTDB_DB_FLAGS_PERSISTENT);
+ ctdb_ctrl_createdb(ctdb, CONTROL_TIMEOUT(), pnn,
+ mem_ctx, name,
+ remote_dbmap->dbs[db].flags, NULL);
if (ret != 0) {
DEBUG(DEBUG_ERR, (__location__ " Unable to create local db:%s\n", name));
return -1;
@@ -653,7 +654,7 @@ static void vacuum_fetch_handler(uint64_t srvid, TDB_DATA data,
TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
const char *name;
struct ctdb_dbid_map_old *dbmap=NULL;
- bool persistent = false;
+ uint8_t db_flags = 0;
struct ctdb_db_context *ctdb_db;
struct ctdb_rec_data_old *r;
@@ -672,7 +673,7 @@ static void vacuum_fetch_handler(uint64_t srvid, TDB_DATA data,
for (i=0;i<dbmap->num;i++) {
if (dbmap->dbs[i].db_id == recs->db_id) {
- persistent = dbmap->dbs[i].flags & CTDB_DB_FLAGS_PERSISTENT;
+ db_flags = dbmap->dbs[i].flags;
break;
}
}
@@ -688,7 +689,7 @@ static void vacuum_fetch_handler(uint64_t srvid, TDB_DATA data,
}
/* attach to it */
- ctdb_db = ctdb_attach(ctdb, CONTROL_TIMEOUT(), name, persistent);
+ ctdb_db = ctdb_attach(ctdb, CONTROL_TIMEOUT(), name, db_flags);
if (ctdb_db == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Failed to attach to database '%s'\n", name));
goto done;
diff --git a/ctdb/tests/complex/34_nfs_tickle_restart.sh b/ctdb/tests/complex/34_nfs_tickle_restart.sh
index 365a017..6350db6 100755
--- a/ctdb/tests/complex/34_nfs_tickle_restart.sh
+++ b/ctdb/tests/complex/34_nfs_tickle_restart.sh
@@ -71,7 +71,7 @@ rn=$(awk -F'|' -v test_node=$test_node \
'$2 != test_node { print $2 ; exit }' <<<"$listnodes_output")
echo "Restarting CTDB on node ${rn}"
-try_command_on_node $rn $CTDB_TEST_WRAPPER restart_ctdb_1
+restart_ctdb_1 $rn
# In some theoretical world this is racy. In practice, the node will
# take quite a while to become healthy, so this will beat any
diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash
index b2a3451..4f1227f 100644
--- a/ctdb/tests/scripts/integration.bash
+++ b/ctdb/tests/scripts/integration.bash
@@ -524,19 +524,21 @@ wait_until_node_has_some_ips ()
#######################################
-restart_ctdb_1 ()
+_service_ctdb ()
{
+ cmd="$1"
+
if [ -e /etc/redhat-release ] ; then
- service ctdb restart
+ service ctdb "$cmd"
else
- /etc/init.d/ctdb restart
+ /etc/init.d/ctdb "$cmd"
fi
}
# Restart CTDB on all nodes. Override for local daemons.
_restart_ctdb_all ()
{
- onnode -p all $CTDB_TEST_WRAPPER restart_ctdb_1
+ onnode -p all $CTDB_TEST_WRAPPER _service_ctdb restart
}
# Nothing needed for a cluster. Override for local daemons.
@@ -545,6 +547,21 @@ setup_ctdb ()
:
}
+start_ctdb_1 ()
+{
+ onnode "$1" $CTDB_TEST_WRAPPER _service_ctdb start
+}
+
+stop_ctdb_1 ()
+{
+ onnode "$1" $CTDB_TEST_WRAPPER _service_ctdb stop
+}
+
+restart_ctdb_1 ()
+{
+ onnode "$1" $CTDB_TEST_WRAPPER _service_ctdb restart
+}
+
restart_ctdb ()
{
echo -n "Restarting CTDB"
diff --git a/ctdb/tests/simple/21_ctdb_attach.sh b/ctdb/tests/simple/21_ctdb_attach.sh
new file mode 100755
index 0000000..11b6008
--- /dev/null
+++ b/ctdb/tests/simple/21_ctdb_attach.sh
@@ -0,0 +1,127 @@
+#!/bin/bash
+
+test_info()
+{
+ cat <<EOF
+Verify the operation of 'ctdb attach' command.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Shut down one of the nodes
+3. Attach test databases
+4. Start shutdown node
+5. Verify that the databases are attached.
+6. Restart one of the nodes
+7. Verify that the databses are attached.
+
+
+Expected results:
+
+* Command 'ctdb attach' command successfully attaches databases.
+EOF
+}
+
+. "${TEST_SCRIPTS_DIR}/integration.bash"
+
+ctdb_test_init "$@"
+
+set -e
+
+cluster_is_healthy
+
+# Reset configuration
+ctdb_restart_when_done
+
+######################################################################
+
+try_command_on_node 0 "$CTDB listnodes -X"
+listnodes_output="$out"
+numnodes=$(wc -l <<<"$listnodes_output")
+lastnode=$(( numnodes - 1 ))
+
+######################################################################
+
+# Confirm that the database is attached
+check_db ()
+{
+ pnn="$1"
+ db="$2"
+ flag="$3"
+ try_command_on_node $pnn "$CTDB getdbmap | grep $db"
+ if [ -z "$out" ] ; then
+ echo "BAD: database $db is not attached on node $node"
+ echo "$out"
+ exit 1
+ else
+ local flags=$(awk '{print $4}' <<<"$out") || true
+ if [ "$flags" = "$flag" ]; then
+ echo "GOOD: database $db is attached on node $node with flag $flag"
+ else
+ echo "BAD: database $db is attached on node $node with wrong flag"
+ echo "$out"
+ exit 1
+ fi
+ fi
+}
+
+######################################################################
+
+testdb1="test_volatile.tdb"
+testdb2="test_persistent.tdb"
+testdb3="test_replicated.tdb"
+
+test_node="0"
+
+echo "Shutting down node $test_node"
+stop_ctdb_1 "$test_node"
+sleep 1
+wait_until_node_has_status 1 recovered
+try_command_on_node -v 1 $CTDB status
+
+echo "Create test databases"
+try_command_on_node 1 $CTDB attach "$testdb1"
+try_command_on_node 1 $CTDB attach "$testdb2" persistent
+try_command_on_node 1 $CTDB attach "$testdb3" replicated
+
+echo
+echo "Checking if database is attached with correct flags"
+for node in $(seq 0 $lastnode) ; do
+ if [ $node -ne $test_node ] ; then
+ check_db $node $testdb1 ""
+ check_db $node $testdb2 PERSISTENT
+ check_db $node $testdb3 REPLICATED
+ fi
+done
+
+######################################################################
+
+echo
+echo "Start node $test_node"
+start_ctdb_1 "$test_node"
+sleep 1
+wait_until_ready
+
+echo
+echo "Checking if database is attached with correct flags"
+check_db $test_node $testdb1 ""
+check_db $test_node $testdb2 PERSISTENT
+check_db $test_node $testdb3 REPLICATED
+
+######################################################################
+
+echo
+echo "Restarting node $test_node"
+restart_ctdb_1 "$test_node"
+sleep 1
+wait_until_ready
+
+echo
+echo "Checking if database is attached with correct flags"
+check_db $test_node $testdb1 ""
+check_db $test_node $testdb2 PERSISTENT
+check_db $test_node $testdb3 REPLICATED
diff --git a/ctdb/tests/simple/scripts/local_daemons.bash b/ctdb/tests/simple/scripts/local_daemons.bash
index d7f33b6..b702a3e 100644
--- a/ctdb/tests/simple/scripts/local_daemons.bash
+++ b/ctdb/tests/simple/scripts/local_daemons.bash
@@ -172,12 +172,9 @@ EOF
done
}
-daemons_start ()
+start_ctdb_1 ()
{
- echo "Starting $TEST_LOCAL_DAEMONS ctdb daemons..."
-
- local pnn
- for pnn in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
+ local pnn="$1"
local pidfile=$(node_pidfile "$pnn")
local conf=$(node_conf "$pnn")
@@ -200,25 +197,47 @@ daemons_start ()
if [ -n "$tmp_conf" ] ; then
rm -f "$tmp_conf"
fi
- done
+
}
-daemons_stop ()
+daemons_start ()
{
- echo "Stopping $TEST_LOCAL_DAEMONS ctdb daemons..."
+ echo "Starting $TEST_LOCAL_DAEMONS ctdb daemons..."
local pnn
for pnn in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
+ start_ctdb_1 "$pnn"
+ done
+}
+
+stop_ctdb_1 ()
+{
+ local pnn="$1"
local pidfile=$(node_pidfile "$pnn")
local conf=$(node_conf "$pnn")
CTDBD_CONF="$conf" \
ctdbd_wrapper "$pidfile" stop
+}
+
+daemons_stop ()
+{
+ echo "Stopping $TEST_LOCAL_DAEMONS ctdb daemons..."
+
+ local pnn
+ for pnn in $(seq 0 $(($TEST_LOCAL_DAEMONS - 1))) ; do
+ stop_ctdb_1 "$pnn"
done
rm -rf "${TEST_VAR_DIR}/test.db"
}
+restart_ctdb_1 ()
+{
+ stop_ctdb_1 "$1"
+ start_ctdb_1 "$1"
+}
+
maybe_stop_ctdb ()
{
if $TEST_CLEANUP ; then
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index cc89789..d73949b 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -1661,6 +1661,9 @@ static NTSTATUS smb1cli_req_writev_submit(struct tevent_req *req,
}
if (state->conn->protocol > PROTOCOL_NT1) {
+ DBG_ERR("called for dialect[%s] server[%s]\n",
+ smb_protocol_types_string(state->conn->protocol),
+ smbXcli_conn_remote_name(state->conn));
return NT_STATUS_REVISION_MISMATCH;
--
Samba Shared Repository
More information about the samba-cvs
mailing list