[SCM] Samba Shared Repository - branch master updated

2017-10-26 Thread Jeremy Allison
The branch, master has been updated
   via  3271908 s3:modules: Check correct variable for NULL in 
posixacl_xattr
   via  5274beb s3:passdb: Make sure the salt is fully initialized before 
passing
   via  d6a418c s3:secrets: Do not leak memory of pw and old_pw
  from  4f45843 s3:vfs_glusterfs: Use SAFE_FREE

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 327190893f5f3352a2e6abc4872b54092ee7de68
Author: Andreas Schneider 
Date:   Wed Oct 25 19:55:32 2017 +0200

s3:modules: Check correct variable for NULL in posixacl_xattr

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Oct 27 04:54:22 CEST 2017 on sn-devel-144

commit 5274beba4cf722a34403dc07bf287815a6df6281
Author: Andreas Schneider 
Date:   Wed Oct 25 19:50:57 2017 +0200

s3:passdb: Make sure the salt is fully initialized before passing

Otherwise the magic member is not initialized.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit d6a418c13f0a41851ecc0579765502e076a5cd3b
Author: Andreas Schneider 
Date:   Wed Oct 25 19:30:28 2017 +0200

s3:secrets: Do not leak memory of pw and old_pw

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

---

Summary of changes:
 source3/modules/posixacl_xattr.c |  2 +-
 source3/passdb/machine_account_secrets.c | 18 --
 2 files changed, 17 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/posixacl_xattr.c b/source3/modules/posixacl_xattr.c
index 759d372..8f6f365 100644
--- a/source3/modules/posixacl_xattr.c
+++ b/source3/modules/posixacl_xattr.c
@@ -384,7 +384,7 @@ SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct 
*handle,
TALLOC_CTX *frame = talloc_stackframe();
struct smb_filename *smb_fname_tmp =
cp_smb_filename_nostream(frame, smb_fname);
-   if (smb_fname == NULL) {
+   if (smb_fname_tmp == NULL) {
errno = ENOMEM;
ret = -1;
} else {
diff --git a/source3/passdb/machine_account_secrets.c 
b/source3/passdb/machine_account_secrets.c
index 5a0f7a8..75f31cb 100644
--- a/source3/passdb/machine_account_secrets.c
+++ b/source3/passdb/machine_account_secrets.c
@@ -1090,8 +1090,10 @@ static int secrets_domain_info_kerberos_keys(struct 
secrets_domain_info1_passwor
return krb5_ret;
}
 
-   salt.data = discard_const(salt_data);
-   salt.length = strlen(salt_data);
+   salt = (krb5_data) {
+   .data = discard_const(salt_data),
+   .length = strlen(salt_data),
+   };
 
ok = convert_string_talloc(keys, CH_UTF16MUNGED, CH_UTF8,
   p->cleartext_blob.data,
@@ -1367,6 +1369,8 @@ NTSTATUS secrets_fetch_or_upgrade_domain_info(const char 
*domain,
DBG_ERR("secrets_fetch_domain_sid(%s) failed\n",
domain);
dbwrap_transaction_cancel(db);
+   SAFE_FREE(old_pw);
+   SAFE_FREE(pw);
TALLOC_FREE(frame);
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
}
@@ -1381,6 +1385,8 @@ NTSTATUS secrets_fetch_or_upgrade_domain_info(const char 
*domain,
if (info->account_name == NULL) {
DBG_ERR("talloc_asprintf(%s$) failed\n", info->computer_name);
dbwrap_transaction_cancel(db);
+   SAFE_FREE(old_pw);
+   SAFE_FREE(pw);
TALLOC_FREE(frame);
return NT_STATUS_NO_MEMORY;
}
@@ -1418,6 +1424,8 @@ NTSTATUS secrets_fetch_or_upgrade_domain_info(const char 
*domain,
DBG_ERR("talloc_asprintf(%s#%02X) failed\n",
domain, NBT_NAME_PDC);
dbwrap_transaction_cancel(db);
+   SAFE_FREE(pw);
+   SAFE_FREE(old_pw);
TALLOC_FREE(frame);
return NT_STATUS_NO_MEMORY;
}
@@ -1438,6 +1446,8 @@ NTSTATUS secrets_fetch_or_upgrade_domain_info(const char 
*domain,
p = kerberos_secrets_fetch_salt_princ();
if (p == NULL) {
dbwrap_transaction_cancel(db);
+   SAFE_FREE(old_pw);
+   

autobuild[sn-devel-144]: intermittent test failure detected

2017-10-26 Thread autobuild
The autobuild test system (on sn-devel-144) 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.sn-devel-144/2017-10-26-2022/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-144/2017-10-26-2022/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-144/2017-10-26-2022/samba.stdout
  
The top commit at the time of the failure was:

commit 4f458437af227a924474c27ad75c705c23394445
Author: Andreas Schneider 
Date:   Thu Oct 26 08:05:20 2017 +0200

s3:vfs_glusterfs: Use SAFE_FREE

Signed-off-by: Andreas Schneider 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Thu Oct 26 17:31:40 CEST 2017 on sn-devel-144



[SCM] Samba Shared Repository - branch master updated

2017-10-26 Thread Andreas Schneider
The branch, master has been updated
   via  4f45843 s3:vfs_glusterfs: Use SAFE_FREE
  from  0e8b781 ctdb-tests: Process-exists unit tests should wait until PID 
is registered

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4f458437af227a924474c27ad75c705c23394445
Author: Andreas Schneider 
Date:   Thu Oct 26 08:05:20 2017 +0200

s3:vfs_glusterfs: Use SAFE_FREE

Signed-off-by: Andreas Schneider 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Thu Oct 26 17:31:40 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/modules/vfs_glusterfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 32074cb..3534ed7 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1100,7 +1100,7 @@ static struct smb_filename *vfs_gluster_getwd(struct 
vfs_handle_struct *handle,
 
ret = glfs_getcwd(handle->data, cwd, PATH_MAX - 1);
if (ret == NULL) {
-   free(cwd);
+   SAFE_FREE(cwd);
return NULL;
}
smb_fname = synthetic_smb_fname(ctx,
@@ -1108,7 +1108,7 @@ static struct smb_filename *vfs_gluster_getwd(struct 
vfs_handle_struct *handle,
NULL,
NULL,
0);
-   free(cwd);
+   SAFE_FREE(cwd);
return smb_fname;
 }
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2017-10-26 Thread Amitay Isaacs
The branch, master has been updated
   via  0e8b781 ctdb-tests: Process-exists unit tests should wait until PID 
is registered
   via  6fad421 ctdb-tests: Wait for fake_ctdbd to start, fail if it doesn't
   via  274fef9 ctdb-tests: Skip starting fake_ctdbd when current node is 
disconnected
   via  dcbaebc ctdb-tests: Wait for ctdb_eventd to start, fail if it 
doesn't
   via  d698992 ctdb-tests: Allow wait_until() to be used in unit tests
  from  16389be s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0e8b781e0740310d251bf1fa7db7a467d4f7f9b5
Author: Martin Schwenke 
Date:   Wed Oct 25 12:15:23 2017 +1100

ctdb-tests: Process-exists unit tests should wait until PID is registered

Otherwise the client registration can race with the check in the test.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Thu Oct 26 13:32:24 CEST 2017 on sn-devel-144

commit 6fad42103c0c812d5b5f4b42854fd7fd68846487
Author: Martin Schwenke 
Date:   Wed Oct 25 17:52:04 2017 +1100

ctdb-tests: Wait for fake_ctdbd to start, fail if it doesn't

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

commit 274fef9b843aa1726c9d331a876504bc0a96a322
Author: Martin Schwenke 
Date:   Wed Oct 25 21:43:56 2017 +1100

ctdb-tests: Skip starting fake_ctdbd when current node is disconnected

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

commit dcbaebc232b49e6a64228f1bb7ce7cfc5d2120e2
Author: Martin Schwenke 
Date:   Wed Oct 25 18:52:10 2017 +1100

ctdb-tests: Wait for ctdb_eventd to start, fail if it doesn't

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

commit d69899238bfe468cd3e915f6d66e279811301d66
Author: Martin Schwenke 
Date:   Wed Oct 25 12:04:49 2017 +1100

ctdb-tests: Allow wait_until() to be used in unit tests

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

---

Summary of changes:
 ctdb/tests/eventd/scripts/local.sh  |  7 ++---
 ctdb/tests/scripts/common.sh| 44 +
 ctdb/tests/scripts/integration.bash | 44 -
 ctdb/tests/tool/ctdb.getcapabilities.003.sh | 13 +
 ctdb/tests/tool/ctdb.lvs.008.sh | 13 +
 ctdb/tests/tool/ctdb.process-exists.001.sh  |  2 ++
 ctdb/tests/tool/ctdb.process-exists.002.sh  |  2 ++
 ctdb/tests/tool/ctdb.process-exists.003.sh  |  2 ++
 ctdb/tests/tool/scripts/local.sh|  6 +++-
 9 files changed, 72 insertions(+), 61 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/eventd/scripts/local.sh 
b/ctdb/tests/eventd/scripts/local.sh
index 343205e..c8f7775 100644
--- a/ctdb/tests/eventd/scripts/local.sh
+++ b/ctdb/tests/eventd/scripts/local.sh
@@ -42,7 +42,7 @@ cleanup_eventd ()
 
 setup_eventd ()
 {
-   debug "Setting up eventd"
+   echo "Setting up eventd"
 
if [ -n "$1" ]; then
extra_args="-D $1"
@@ -53,9 +53,8 @@ setup_eventd ()
-e "$eventd_scriptdir" \
-l "file:" -d "DEBUG" $extra_args 2>&1 | tee "$eventd_logfile" &
# Wait till eventd is running
-   while [ ! -S "$eventd_socket" ] ; do
-   sleep 1
-   done
+   wait_until 10 test -S "$eventd_socket" || \
+   die "ctdb_eventd failed to start"
 
test_cleanup cleanup_eventd
 }
diff --git a/ctdb/tests/scripts/common.sh b/ctdb/tests/scripts/common.sh
index 93db417..099eee1 100644
--- a/ctdb/tests/scripts/common.sh
+++ b/ctdb/tests/scripts/common.sh
@@ -47,3 +47,47 @@ esac
 if [ -d "$_test_bin_dir" ] ; then
PATH="${_test_bin_dir}:$PATH"
 fi
+
+# Wait until either timeout expires or command succeeds.  The command
+# will be tried once per second, unless timeout has format T/I, where
+# I is the recheck interval.
+wait_until ()
+{
+local timeout="$1" ; shift # "$@" is the command...
+
+local interval=1
+case "$timeout" in
+   */*)
+   interval="${timeout#*/}"
+   timeout="${timeout%/*}"
+esac
+
+local negate=false

autobuild[sn-devel-144]: intermittent test failure detected

2017-10-26 Thread autobuild
The autobuild test system (on sn-devel-144) 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.sn-devel-144/2017-10-26-1206/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-144/2017-10-26-1206/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-144/2017-10-26-1206/samba.stdout
  
The top commit at the time of the failure was:

commit 16389bed0773952ca563b7bf1fecc2a737587257
Author: Andreas Schneider 
Date:   Wed Oct 25 19:39:34 2017 +0200

s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()

Found by cppcheck.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 26 09:34:40 CEST 2017 on sn-devel-144



[SCM] Samba Shared Repository - branch master updated

2017-10-26 Thread Jeremy Allison
The branch, master has been updated
   via  16389be s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()
  from  30584a2 linked attribute tests: correct add_all_at_once test

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 16389bed0773952ca563b7bf1fecc2a737587257
Author: Andreas Schneider 
Date:   Wed Oct 25 19:39:34 2017 +0200

s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()

Found by cppcheck.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Oct 26 09:34:40 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/modules/vfs_glusterfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 8d12ac6..32074cb 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1099,8 +1099,9 @@ static struct smb_filename *vfs_gluster_getwd(struct 
vfs_handle_struct *handle,
}
 
ret = glfs_getcwd(handle->data, cwd, PATH_MAX - 1);
-   if (ret == 0) {
+   if (ret == NULL) {
free(cwd);
+   return NULL;
}
smb_fname = synthetic_smb_fname(ctx,
ret,


-- 
Samba Shared Repository