[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8cd8aa6 libcli: Overflow array index read possible, in auth code. via 1406371 Revert libcli: Overflow array index read possible, in auth code. from 538cbfe libcli: Overflow array index read possible, in auth code. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8cd8aa6686c21e8c43a6d14c0ae1a21954d6e8cd Author: Ira Cooper i...@samba.org Date: Thu Feb 13 14:45:23 2014 -0500 libcli: Overflow array index read possible, in auth code. Changed the if condtion to detect when we'd improperly overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper i...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ira Cooper i...@samba.org Autobuild-Date(master): Mon Feb 24 11:56:38 CET 2014 on sn-devel-104 commit 14063719e0b21da438179f0bb02b8c9d948d2dbb Author: Ira Cooper i...@samba.org Date: Mon Feb 24 14:16:00 2014 +0530 Revert libcli: Overflow array index read possible, in auth code. This reverts commit 538cbfe0e90b7c7ed0f8421b323cac4dacd83f04. Signed-off-by: Ira Cooper i...@samba.org --- Summary of changes: libcli/auth/netlogon_creds_cli.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index 7e88255..472a452 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -1766,11 +1766,11 @@ struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx if (new_version != NULL) { struct NL_PASSWORD_VERSION version; - int32_t len = IVAL(state-samr_crypt_password.data, 512); - int32_t ofs = 512 - len; + uint32_t len = IVAL(state-samr_crypt_password.data, 512); + uint32_t ofs = 512 - len; uint8_t *p; - if (ofs 12) { + if (len 500) { tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX); return tevent_req_post(req, ev); } -- Samba Shared Repository
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2014-02-24-1817/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey/2014-02-24-1817/samba.stderr http://git.samba.org/autobuild.flakey/2014-02-24-1817/samba.stdout The top commit at the time of the failure was: commit 8cd8aa6686c21e8c43a6d14c0ae1a21954d6e8cd Author: Ira Cooper i...@samba.org Date: Thu Feb 13 14:45:23 2014 -0500 libcli: Overflow array index read possible, in auth code. Changed the if condtion to detect when we'd improperly overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper i...@samba.org Reviewed-by: Stefan Metzmacher me...@samba.org Autobuild-User(master): Ira Cooper i...@samba.org Autobuild-Date(master): Mon Feb 24 11:56:38 CET 2014 on sn-devel-104
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 695ece2 s4: tidy up vfs smb2 in regards to using share_string_option via d8d0619 s4: tidy up vfs cifs in regards to using share_string_option via 209386b s4: tidy up some null checks in ntvfs from 8cd8aa6 libcli: Overflow array index read possible, in auth code. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 695ece206b3365c99499e424e0dba43ce5de9300 Author: Garming Sam garm...@catalyst.net.nz Date: Fri Feb 21 09:34:45 2014 +1300 s4: tidy up vfs smb2 in regards to using share_string_option Change-Id: Ieae6b5ddc2cd9983489c374605e4740371e81883 Signed-off-by: Garming Sam garm...@catalyst.net.nz Reviewed-by: Andrew Bartlett abart...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Kamen Mazdrashki kame...@samba.org Autobuild-User(master): Andreas Schneider a...@cryptomilk.org Autobuild-Date(master): Mon Feb 24 19:16:48 CET 2014 on sn-devel-104 commit d8d06193daad86ea7c38b78b5949d404eabb0636 Author: Garming Sam garm...@catalyst.net.nz Date: Fri Feb 21 09:29:38 2014 +1300 s4: tidy up vfs cifs in regards to using share_string_option Change-Id: I014bce667d3f875a913dbccf269b514f7ffbab7b Signed-off-by: Garming Sam garm...@catalyst.net.nz Reviewed-by: Andrew Bartlett abart...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Kamen Mazdrashki kame...@samba.org commit 209386bbd3177fbd310b36e2d8f09c6ba7f556d3 Author: Garming Sam garm...@catalyst.net.nz Date: Fri Feb 21 09:06:25 2014 +1300 s4: tidy up some null checks in ntvfs Change-Id: I629a299bea10b063de4525020a4c6b838260cd67 Signed-off-by: Garming Sam garm...@catalyst.net.nz Reviewed-by: Andrew Bartlett abart...@samba.org Reviewed-by: Andreas Schneider a...@samba.org Reviewed-by: Kamen Mazdrashki kame...@samba.org --- Summary of changes: source4/ntvfs/cifs/vfs_cifs.c | 47 + source4/ntvfs/smb2/vfs_smb2.c | 46 2 files changed, 47 insertions(+), 46 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 16bbf97..355b0bd 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -173,7 +173,8 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, sharename = tcon-smb2.in.path; break; default: - return NT_STATUS_INVALID_LEVEL; + status = NT_STATUS_INVALID_LEVEL; + goto out; } if (strncmp(sharename, , 2) == 0) { @@ -200,23 +201,24 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, p = talloc_zero(ntvfs, struct cvfs_private); if (!p) { - TALLOC_FREE(tmp_ctx); - return NT_STATUS_NO_MEMORY; + status = NT_STATUS_NO_MEMORY; + goto out; } ntvfs-private_data = p; if (!host) { DEBUG(1,(CIFS backend: You must supply server\n)); - return NT_STATUS_INVALID_PARAMETER; + status = NT_STATUS_INVALID_PARAMETER; + goto out; } if (user pass) { DEBUG(5, (CIFS backend: Using specified password\n)); credentials = cli_credentials_init(p); if (!credentials) { - TALLOC_FREE(tmp_ctx); - return NT_STATUS_NO_MEMORY; + status = NT_STATUS_NO_MEMORY; + goto out; } cli_credentials_set_conf(credentials, ntvfs-ctx-lp_ctx); cli_credentials_set_username(credentials, user, CRED_SPECIFIED); @@ -233,8 +235,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, } status = cli_credentials_set_machine_account(credentials, ntvfs-ctx-lp_ctx); if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE(tmp_ctx); - return status; + goto out; } } else if (req-session_info-credentials) { DEBUG(5, (CIFS backend: Using delegated credentials\n)); @@ -265,8 +266,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs, } status = cli_credentials_set_machine_account(credentials, ntvfs-ctx-lp_ctx); if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE(tmp_ctx); - return status; + goto out; } cli_credentials_invalidate_ccache(credentials, CRED_SPECIFIED);
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fcf846a ctdb-eventscripts: Switch on dumping of stuck nfsd threads from 695ece2 s4: tidy up vfs smb2 in regards to using share_string_option http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fcf846a795085d24468548165d92762a628ef54d Author: Martin Schwenke mar...@meltin.net Date: Thu Feb 20 15:20:44 2014 +1100 ctdb-eventscripts: Switch on dumping of stuck nfsd threads This feature was added quite a while ago but was not enabled by default. It is a useful feature so enable it to dump stack traces of up to 5 stuck processes by default. This can be disabled by setting: CTDB_NFS_DUMP_STUCK_THREADS=0 Signed-off-by: Martin Schwenke mar...@meltin.net Reviewed-by: Amitay Isaacs ami...@gmail.com Autobuild-User(master): Amitay Isaacs ami...@samba.org Autobuild-Date(master): Tue Feb 25 04:06:45 CET 2014 on sn-devel-104 --- Summary of changes: ctdb/config/functions |2 +- ctdb/doc/ctdbd.conf.5.xml |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/config/functions b/ctdb/config/functions index 954e681..6efe60f 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -734,7 +734,7 @@ startstop_nfs() { # Dump up to the configured number of nfsd thread backtraces. nfs_dump_some_threads () { -[ -n $CTDB_NFS_DUMP_STUCK_THREADS ] || return 0 +[ -n $CTDB_NFS_DUMP_STUCK_THREADS ] || CTDB_NFS_DUMP_STUCK_THREADS=5 # Optimisation to avoid running an unnecessary pidof [ $CTDB_NFS_DUMP_STUCK_THREADS -gt 0 ] || return 0 diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml index 37b1cf9..d80bda6 100644 --- a/ctdb/doc/ctdbd.conf.5.xml +++ b/ctdb/doc/ctdbd.conf.5.xml @@ -909,7 +909,7 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 NFS during a restart. /para para - Default is 0. + Default is 5. Set this to 0 to disable this feature. /para /listitem /varlistentry -- Samba Shared Repository
[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.2-9-g2441655
The branch, 2.5 has been updated via 24416553a521cc1e93f04e661bce0b2c78e8cd8b (commit) from c632c6a6a97768683d25f7481ff8002961d2052a (commit) http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=2.5 - Log - commit 24416553a521cc1e93f04e661bce0b2c78e8cd8b Author: Martin Schwenke mar...@meltin.net Date: Thu Feb 20 15:20:44 2014 +1100 eventscripts: Switch on dumping of stuck nfsd threads This feature was added quite a while ago but was not enabled by default. It is a useful feature so enable it to dump stack traces of up to 5 stuck processes by default. This can be disabled by setting: CTDB_NFS_DUMP_STUCK_THREADS=0 Signed-off-by: Martin Schwenke mar...@meltin.net Reviewed-by: Amitay Isaacs ami...@gmail.com Autobuild-User(master): Amitay Isaacs ami...@samba.org Autobuild-Date(master): Tue Feb 25 04:06:45 CET 2014 on sn-devel-104 (Imported from commit fcf846a795085d24468548165d92762a628ef54d) --- Summary of changes: config/functions |2 +- doc/ctdbd.conf.5.xml |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/config/functions b/config/functions index 1aad3ae..1bcdc34 100755 --- a/config/functions +++ b/config/functions @@ -734,7 +734,7 @@ startstop_nfs() { # Dump up to the configured number of nfsd thread backtraces. nfs_dump_some_threads () { -[ -n $CTDB_NFS_DUMP_STUCK_THREADS ] || return 0 +[ -n $CTDB_NFS_DUMP_STUCK_THREADS ] || CTDB_NFS_DUMP_STUCK_THREADS=5 # Optimisation to avoid running an unnecessary pidof [ $CTDB_NFS_DUMP_STUCK_THREADS -gt 0 ] || return 0 diff --git a/doc/ctdbd.conf.5.xml b/doc/ctdbd.conf.5.xml index a1f6db5..3db554c 100644 --- a/doc/ctdbd.conf.5.xml +++ b/doc/ctdbd.conf.5.xml @@ -909,7 +909,7 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 NFS during a restart. /para para - Default is 0. + Default is 5. Set this to 0 to disable this feature. /para /listitem /varlistentry -- CTDB repository
[SCM] CTDB repository - branch 2.5 updated - ctdb-2.5.2-10-gbd4edfb
The branch, 2.5 has been updated via bd4edfbf7384d39448bedfb64e2f91411ad75e54 (commit) from 24416553a521cc1e93f04e661bce0b2c78e8cd8b (commit) http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=2.5 - Log - commit bd4edfbf7384d39448bedfb64e2f91411ad75e54 Author: Martin Schwenke mar...@meltin.net Date: Fri Feb 7 17:37:00 2014 +1100 scripts: Enhancements to hung script debugging * Add stack dumps for interesting processes that sometimes get stuck, so try to print stack traces for them if they appear in the pstree output. * Add new configuration variables CTDB_DEBUG_HUNG_SCRIPT_LOGFILE and CTDB_DEBUG_HUNG_SCRIPT_STACKPAT. These are primarily for testing but the latter may be useful for live debugging. * Load CTDB configuration so that above configuration variables can be set/changed without restarting ctdbd. Add a test that tries to ensure that all of this is working. Signed-off-by: Martin Schwenke mar...@meltin.net Reviewed-by: Amitay Isaacs ami...@gmail.com (Imported from commit 2532149f8f9bbe6d3c8f5ac6e5e4bc2ad1681e27) --- Summary of changes: config/debug-hung-script.sh | 34 - doc/ctdbd.conf.5.xml | 30 +++ tests/complex/90_debug_hung_script.sh | 91 + 3 files changed, 153 insertions(+), 2 deletions(-) create mode 100755 tests/complex/90_debug_hung_script.sh Changeset truncated at 500 lines: diff --git a/config/debug-hung-script.sh b/config/debug-hung-script.sh index 1984242..63d695f 100755 --- a/config/debug-hung-script.sh +++ b/config/debug-hung-script.sh @@ -1,18 +1,48 @@ #!/bin/sh +[ -n $CTDB_BASE ] || \ +export CTDB_BASE=$(cd -P $(dirname $0) ; echo $PWD) + +. $CTDB_BASE/functions + +loadconfig ctdb + +# Testing hook +if [ -n $CTDB_DEBUG_HUNG_SCRIPT_LOGFILE ] ; then +exec $CTDB_DEBUG_HUNG_SCRIPT_LOGFILE 21 +fi + ( flock --wait 2 9 || exit 1 echo = Start of hung script debug for PID=\$1\, event=\$2\ = echo pstree -p -a ${1}: -pstree -p -a $1 +out=$(pstree -p -a $1) +echo $out + +# Check for processes matching a regular expression and print +# stack staces. This could help confirm that certain processes +# are stuck in certain places such as the cluster filesystem. The +# regexp should separate items with \| and should not contain +# parentheses. The default pattern can be replaced for testing. +default_pat='exportfs\|rpcinfo' +pat=${CTDB_DEBUG_HUNG_SCRIPT_STACKPAT:-${default_pat}} +echo $out | +sed -n s@.*-\(.*${pat}.*\),\([0-9]*\).*@\2 \1@p | +while read pid name ; do + trace=$(cat /proc/${pid}/stack 2/dev/null) + if [ $? -eq 0 ] ; then + echo Stack trace of interesting process ${pid}[${name}] + echo $trace + fi +done if [ $2 = init ] ; then exit 0 fi -echo ctdb scriptstatus ${2}: +echo ctdb scriptstatus ${2}: # No use running several of these in parallel if, say, releaseip # event hangs for multiple IPs. In that case the output would be # interleaved in the log and would just be confusing. diff --git a/doc/ctdbd.conf.5.xml b/doc/ctdbd.conf.5.xml index 3db554c..d80bda6 100644 --- a/doc/ctdbd.conf.5.xml +++ b/doc/ctdbd.conf.5.xml @@ -1375,6 +1375,36 @@ CTDB_SET_MonitorInterval=20 /varlistentry varlistentry + termCTDB_DEBUG_HUNG_SCRIPT_LOGFILE=parameterFILENAME/parameter/term + listitem + para + FILENAME specifies where log messages should go when + debugging hung eventscripts. This is a testing option. + See also citetitleCTDB_DEBUG_HUNG_SCRIPT/citetitle. + /para + para + No default. Messages go to stdout/stderr and are logged + to the same place as other CTDB log messages. + /para + /listitem + /varlistentry + + varlistentry + termCTDB_DEBUG_HUNG_SCRIPT_STACKPAT=parameterREGEXP/parameter/term + listitem + para + REGEXP specifies interesting processes for which stack + traces should be logged when debugging hung eventscripts + and those processes are matched in pstree output. See + also citetitleCTDB_DEBUG_HUNG_SCRIPT/citetitle. + /para + para + Default is exportfs\|rpcinfo. + /para + /listitem + /varlistentry + + varlistentry termCTDB_DEBUG_LOCKS=parameterFILENAME/parameter/term listitem para diff --git a/tests/complex/90_debug_hung_script.sh b/tests/complex/90_debug_hung_script.sh new file mode 100755 index 000..ef6216c --- /dev/null +++ b/tests/complex/90_debug_hung_script.sh @@ -0,0 +1,91 @@ +#!/bin/bash
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2014-02-25-0629/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey/2014-02-25-0629/samba.stderr http://git.samba.org/autobuild.flakey/2014-02-25-0629/samba.stdout The top commit at the time of the failure was: commit fcf846a795085d24468548165d92762a628ef54d Author: Martin Schwenke mar...@meltin.net Date: Thu Feb 20 15:20:44 2014 +1100 ctdb-eventscripts: Switch on dumping of stuck nfsd threads This feature was added quite a while ago but was not enabled by default. It is a useful feature so enable it to dump stack traces of up to 5 stuck processes by default. This can be disabled by setting: CTDB_NFS_DUMP_STUCK_THREADS=0 Signed-off-by: Martin Schwenke mar...@meltin.net Reviewed-by: Amitay Isaacs ami...@gmail.com Autobuild-User(master): Amitay Isaacs ami...@samba.org Autobuild-Date(master): Tue Feb 25 04:06:45 CET 2014 on sn-devel-104