[SCM] Samba Shared Repository - branch master updated

2017-06-01 Thread Jeremy Allison
The branch, master has been updated
   via  1f4b07e s4:torture: Fix comparison between pointer and zero 
character constant
   via  1670d00 waf: Do not trhow a format-truncation error for 
test/snprintf.c
   via  94e21c1 replace: Use the same size as d_name member of struct dirent
   via  9e9bff1 password_hash: conditional compilation for crypt_r
  from  5ccfd38 dnsserver: Stop dns_name_equal doing OOB read

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


- Log -
commit 1f4b07e5942235bddcfa999b3575f719752d81c4
Author: Andreas Schneider 
Date:   Thu Jun 1 14:28:08 2017 +0200

s4:torture: Fix comparison between pointer and zero character constant

Fixes building with GCC 7.1

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Jun  1 23:42:58 CEST 2017 on sn-devel-144

commit 1670d00be88108a483f04c9763012504499b99e4
Author: Andreas Schneider 
Date:   Thu Jun 1 14:24:42 2017 +0200

waf: Do not trhow a format-truncation error for test/snprintf.c

This fixes building with GCC 7.1

Error:
../lib/replace/test/testsuite.c:355:6: error: ā€˜%dā€™ directive output
truncated writing 1 byte into a region of size 0
[-Werror=format-truncation=]

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

commit 94e21c139f9b0c1d28ee85fdcb9b7490cc64e27b
Author: Andreas Schneider 
Date:   Thu Jun 1 14:16:56 2017 +0200

replace: Use the same size as d_name member of struct dirent

This fixes an error with GCC 7.1

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

commit 9e9bff1f278ae7c2927cc3fa648f8ec8eb98b8c4
Author: Gary Lockyer 
Date:   Wed May 31 10:35:25 2017 +1200

password_hash: conditional compilation for crypt_r

Add check for crypt_r, and if absent fall back to crypt

Signed-off-by: Gary Lockyer 
Reviewed-by: Volker Lendecke 

---

Summary of changes:
 lib/replace/test/os2_delete.c  |  2 +-
 lib/replace/wscript|  3 ++-
 source4/dsdb/samdb/ldb_modules/password_hash.c | 12 +++-
 source4/torture/masktest.c |  2 +-
 4 files changed, 15 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/test/os2_delete.c b/lib/replace/test/os2_delete.c
index 0816f61..4b99ccf 100644
--- a/lib/replace/test/os2_delete.c
+++ b/lib/replace/test/os2_delete.c
@@ -63,7 +63,7 @@ static int os2_delete(DIR *d)
off_t offsets[READDIR_SIZE];
int i, j;
struct dirent *de;
-   char names[READDIR_SIZE][30];
+   char names[READDIR_SIZE][256];
 
/* scan, remembering offsets */
for (i=0, de=readdir(d); 
diff --git a/lib/replace/wscript b/lib/replace/wscript
index f681d02..eeb1b3e 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -466,6 +466,7 @@ removeea setea
 conf.DEFINE('HAVE_ROBUST_MUTEXES', 1)
 
 conf.CHECK_FUNCS_IN('crypt', 'crypt', checklibc=True)
+conf.CHECK_FUNCS_IN('crypt_r', 'crypt', checklibc=True)
 
 conf.CHECK_VARIABLE('rl_event_hook', define='HAVE_DECL_RL_EVENT_HOOK', 
always=True,
 headers='readline.h readline/readline.h 
readline/history.h')
@@ -707,7 +708,7 @@ def build(bld):
 source='''test/testsuite.c test/strptime.c
 test/os2_delete.c test/getifaddrs.c''',
 deps='replace',
-cflags="-Wno-format-zero-length")
+cflags="-Wno-format-zero-length 
-Wno-format-truncation")
 
 if bld.env.standalone_replace:
 bld.SAMBA_BINARY('replace_testsuite',
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c 
b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 6a1ae3b..8e8dc2c 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -1487,11 +1487,13 @@ static int setup_primary_userPassword_hash(
const char *salt = NULL;/* Randomly generated salt */
const char *cmd = NULL; /* command passed to crypt */
const char *hash = NULL;/* password hash generated by crypt */
-   struct crypt_data crypt_data;   /* working storage used by crypt */
int algorithm = 0;  /* crypt hash algorithm number */
int rounds = 0; /* The number of hash rounds */
DATA_BLOB *hash_blob = NULL;
TALLOC_CTX *frame = talloc_stackframe();
+#ifdef HAVE_CRYPT_R
+   struct 

[SCM] Samba Shared Repository - branch master updated

2017-06-01 Thread Andrew Bartlett
The branch, master has been updated
   via  5ccfd38 dnsserver: Stop dns_name_equal doing OOB read
  from  c47e6b1 ctdb-common: Fix crash in logging initialisation

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


- Log -
commit 5ccfd38156ddf2435df15600638cde8ed020958f
Author: Garming Sam 
Date:   Thu Jun 1 14:36:07 2017 +1200

dnsserver: Stop dns_name_equal doing OOB read

This has been the cause of a large number of flakey autobuilds. Every
now and again dns_name_equal would not be equal between two empty
strings, thus causing failures.

Signed-off-by: Garming Sam 
Reviewed-by: Andrew Bartlett 

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

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Thu Jun  1 19:34:38 CEST 2017 on sn-devel-144

---

Summary of changes:
 source4/rpc_server/dnsserver/dnsdata.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/dnsserver/dnsdata.c 
b/source4/rpc_server/dnsserver/dnsdata.c
index 9b3c9f9..c300643 100644
--- a/source4/rpc_server/dnsserver/dnsdata.c
+++ b/source4/rpc_server/dnsserver/dnsdata.c
@@ -1127,8 +1127,8 @@ bool dns_name_equal(const char *name1, const char *name2)
size_t len1 = strlen(name1);
size_t len2 = strlen(name2);
 
-   if (name1[len1-1] == '.') len1--;
-   if (name2[len2-1] == '.') len2--;
+   if (len1 > 0 && name1[len1-1] == '.') len1--;
+   if (len2 > 0 && name2[len2-1] == '.') len2--;
if (len1 != len2) {
return false;
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2017-06-01 Thread Amitay Isaacs
The branch, master has been updated
   via  c47e6b1 ctdb-common: Fix crash in logging initialisation
  from  822f8cd mit_samba: Fix the MIT KDC build with the latest changes

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


- Log -
commit c47e6b140d0c7cc15a93782957090625a832ba59
Author: Martin Schwenke 
Date:   Thu Jun 1 14:37:40 2017 +1000

ctdb-common: Fix crash in logging initialisation

Setting CTDB_LOGGING to syslog:nonblocking or syslog:udp will cause
ctdbd to crash at startup due to NULL pointer dereference.
Refactoring in commit c9124a001f5abf7bb577a8f5341da4cc7411ed22
introduced this regression.

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

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

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Thu Jun  1 15:26:19 CEST 2017 on sn-devel-144

---

Summary of changes:
 ctdb/common/logging.c | 1 +
 1 file changed, 1 insertion(+)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c
index e1b8e7f..0e3efe0 100644
--- a/ctdb/common/logging.c
+++ b/ctdb/common/logging.c
@@ -354,6 +354,7 @@ static int syslog_log_setup_common(TALLOC_CTX *mem_ctx, 
const char *app_name,
state->app_name = app_name;
talloc_set_destructor(state, syslog_log_state_destructor);
 
+   *result = state;
return 0;
 }
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch v4-5-test updated

2017-06-01 Thread Karolin Seeger
The branch, v4-5-test has been updated
   via  be632f6 s3: VFS: Catia: Ensure path name is also converted.
   via  95e1df5 ctdb-tests: Add some extra tests for "ctdb nodestatus"
   via  29b9e19 ctdb-tools: "ctdb nodestatus" should only display header 
for "all"
   via  36f2b52 ctdb-tools: Stop "ctdb nodestatus" from always showing all 
nodes
   via  c8b18ab ctdb-readonly: Avoid a tight loop waiting for revoke to 
complete
   via  9dca467 Revert "ctdb-readonly: Avoid a tight loop waiting for 
revoke to complete"
  from  7922d48 VERSION: Bump version up to 4.5.11.

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test


- Log -
commit be632f603077393226b847b064bfc5f752f1c914
Author: Jeremy Allison 
Date:   Wed May 24 11:45:35 2017 -0700

s3: VFS: Catia: Ensure path name is also converted.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit fda1e701af804db81dcb3844921e9a327563bc5c)

Autobuild-User(v4-5-test): Karolin Seeger 
Autobuild-Date(v4-5-test): Thu Jun  1 12:59:00 CEST 2017 on sn-devel-144

commit 95e1df5484f0ba1681f7d6dc1783c29320bd526f
Author: Martin Schwenke 
Date:   Wed May 24 20:21:55 2017 +1000

ctdb-tests: Add some extra tests for "ctdb nodestatus"

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

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

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Fri May 26 05:24:34 CEST 2017 on sn-devel-144

(cherry picked from commit ade535371b86294c12ca3f7eb98d8ef7ecd29caa)

commit 29b9e1945600efdbdaebe29817149c2dba98c520
Author: Martin Schwenke 
Date:   Wed May 24 20:27:58 2017 +1000

ctdb-tools: "ctdb nodestatus" should only display header for "all"

The "Number of nodes:" header should only be displayed when "all" is
specified.  This is how the command behaved in Samba <= 4.4.

Printing the number of nodes is not helpful and is rather confusing in
the default case where only the status of the current node is printed.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit 1d10c8e9e637619b754b4a273d3c714fbca7d503)

commit 36f2b52ea78898650af5811801da5988a6786285
Author: Martin Schwenke 
Date:   Wed May 24 20:24:54 2017 +1000

ctdb-tools: Stop "ctdb nodestatus" from always showing all nodes

Exit code should only reflect current or specified nodes too.

Drop an unwanted call to get_nodemap() that overwrites the previously
calculated node map.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit a600d467e2842ab05e429c5a67be5b222ddd1c12)

commit c8b18ab76c6240cc6e992ab51dff379afbd4769f
Author: Amitay Isaacs 
Date:   Thu May 18 11:50:09 2017 +1000

ctdb-readonly: Avoid a tight loop waiting for revoke to complete

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

During revoking readonly delegations, if one of the nodes disappears,
then there is no point re-trying revoking readonly delegation immedately.
The database needs to be recovered before the revoke operation can
succeed.

However, if the revoke is successful, then all the write requests need
to be processed immediately before the read-only requests.  This avoids
starving write requests, in case there are read-only requests coming
from other nodes.

In deferred_call_destructor, the result of revoke is not available and
deferred calls cannot be correctly ordered.  To correctly order the
deferred calls, process them in revokechild_destructor where the result
of revoke is known.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit f5f05a644dadc0b1858c99c5f1f5af1ef80f3a28)

commit 9dca467e98983e9f05d28005978646243ca7e5d8
Author: Amitay Isaacs 
Date:   Thu May 18 10:15:01 2017 +1000

Revert "ctdb-readonly: Avoid a tight loop waiting for revoke to complete"

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

This reverts commit ad758cb869ac83534993caa212abc9fe9905ec68.

This is an incomplete fix and introduces a regression.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit