[SCM] Samba Shared Repository - branch master updated

2019-06-28 Thread Michael Adam
The branch, master has been updated
   via  0b556e7827b vfs_preopen: TALLOC_FREE(fde) before closing the 
underlying fd
   via  c26e42cb53f vfs_preopen: Fix an uninitialized variable read
   via  6bc70dcde26 vfs_preopen: Fix for O_NOFOLLOW
   via  c88240e0e70 smbd: Fix broken brlock for clustering
  from  fee8cf326bf vfs:glusterfs_fuse: treat ENOATTR as ENOENT

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


- Log -
commit 0b556e7827b32192cbbce1464e30764648ea1712
Author: Volker Lendecke 
Date:   Wed Jun 26 17:43:44 2019 +0200

vfs_preopen: TALLOC_FREE(fde) before closing the underlying fd

Without that we might get wrong stuff out of epoll

Signed-off-by: Volker Lendecke 
Reviewed-by: Michael Adam 

Autobuild-User(master): Michael Adam 
Autobuild-Date(master): Fri Jun 28 16:42:42 UTC 2019 on sn-devel-184

commit c26e42cb53f9cfd9a54cacde64817ccf4ddd0412
Author: Volker Lendecke 
Date:   Wed Jun 26 17:43:20 2019 +0200

vfs_preopen: Fix an uninitialized variable read

Signed-off-by: Volker Lendecke 
Reviewed-by: Michael Adam 

commit 6bc70dcde2685e13f2f4cd6d9876e022629004de
Author: Volker Lendecke 
Date:   Wed Jun 26 17:42:54 2019 +0200

vfs_preopen: Fix for O_NOFOLLOW

Since 4301505d977449d core smbd code passes O_NOFOLLOW together with
[O_RDONLY|O_RDWR] as flags. This breaks activating vfs_preopen, we
need to look at *just* the access mode.

Signed-off-by: Volker Lendecke 
Reviewed-by: Michael Adam 

commit c88240e0e70279207611a0aba4554cb907275e42
Author: Volker Lendecke 
Date:   Thu Jun 27 13:21:33 2019 +0200

smbd: Fix broken brlock for clustering

This should have been in f11c5887f4fb4b766, sorry. We now always need
TDB_SEQNUM on brlock.tdb.

Signed-off-by: Volker Lendecke 
Reviewed-by: Michael Adam 

---

Summary of changes:
 source3/locking/brlock.c  | 16 ++--
 source3/modules/vfs_preopen.c |  4 +++-
 2 files changed, 9 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 00462a31c78..b4628831f5b 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -288,16 +288,12 @@ void brl_init(bool read_only)
return;
}
 
-   tdb_flags = 
TDB_DEFAULT|TDB_VOLATILE|TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH;
-
-   if (!lp_clustering()) {
-   /*
-* We can't use the SEQNUM trick to cache brlock
-* entries in the clustering case because ctdb seqnum
-* propagation has a delay.
-*/
-   tdb_flags |= TDB_SEQNUM;
-   }
+   tdb_flags =
+   TDB_DEFAULT|
+   TDB_VOLATILE|
+   TDB_CLEAR_IF_FIRST|
+   TDB_INCOMPATIBLE_HASH|
+   TDB_SEQNUM;
 
db_path = lock_path(talloc_tos(), "brlock.tdb");
if (db_path == NULL) {
diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c
index 24d33fafacd..a2afbf179f8 100644
--- a/source3/modules/vfs_preopen.c
+++ b/source3/modules/vfs_preopen.c
@@ -57,6 +57,7 @@ struct preopen_state {
 static void preopen_helper_destroy(struct preopen_helper *c)
 {
int status;
+   TALLOC_FREE(c->fde);
close(c->fd);
c->fd = -1;
kill(c->pid, SIGKILL);
@@ -274,6 +275,7 @@ static NTSTATUS preopen_init_helpers(TALLOC_CTX *mem_ctx, 
size_t to_read,
result->queue_max = queue_max;
result->template_fname = NULL;
result->fnum_sent = 0;
+   result->fnum_queue_end = 0;
 
for (i=0; ihelpers[i].state = result;
@@ -400,7 +402,7 @@ static int preopen_open(vfs_handle_struct *handle,
return -1;
}
 
-   if (flags != O_RDONLY) {
+   if ((flags & O_ACCMODE) != O_RDONLY) {
return res;
}
 


-- 
Samba Shared Repository



[SCM] Socket Wrapper Repository - branch master updated

2017-07-27 Thread Michael Adam
The branch, master has been updated
   via  fa9cc40 swrap: Protect the FALL_THROUGH define
  from  fafd5ed cmake: Replace deprecated get_target_property()

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


- Log -
commit fa9cc407f1a8bd17433835eedcc0135424d420a1
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Jul 27 13:18:12 2017 +0200

swrap: Protect the FALL_THROUGH define

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 46fb683..280215e 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -107,11 +107,13 @@ enum swrap_dbglvl_e {
 #define DESTRUCTOR_ATTRIBUTE
 #endif
 
-#ifdef HAVE_FALLTHROUGH_ATTRIBUTE
-#define FALL_THROUGH __attribute__ ((fallthrough))
-#else
-#define FALL_THROUGH
-#endif
+#ifndef FALL_THROUGH
+# ifdef HAVE_FALLTHROUGH_ATTRIBUTE
+#  define FALL_THROUGH __attribute__ ((fallthrough))
+# else /* HAVE_FALLTHROUGH_ATTRIBUTE */
+#  define FALL_THROUGH
+# endif /* HAVE_FALLTHROUGH_ATTRIBUTE */
+#endif /* FALL_THROUGH */
 
 #ifdef HAVE_ADDRESS_SANITIZER_ATTRIBUTE
 #define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE __attribute__((no_sanitize_address))


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2017-07-27 Thread Michael Adam
The branch, master has been updated
   via  fafd5ed cmake: Replace deprecated get_target_property()
   via  e961a1c swrap: Add common exit point to swrap_setsockopt
   via  070d84d swrap: Add common exit point to swrap_getsockopt
   via  b585bf0 swrap: Add common exit point to swrap_connect
   via  4c6082d swrap: Add common exit point to swrap_auto_bind
   via  d6253b3 swrap: Fix tab vs space in swrap_auto_bind
  from  ceb1767 swrap: Suppress intentional fall through warning

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


- Log -
commit fafd5ed2dd89b7d951d70d0ac5585939cb2e4dcf
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Jul 27 11:30:23 2017 +0200

cmake: Replace deprecated get_target_property()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit e961a1c8b8e03d9e8f070a686207740b486340ea
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Jul 13 02:43:47 2017 +0200

swrap: Add common exit point to swrap_setsockopt

In preparation of thread safety.

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 070d84d733369a4de8f2b840a1f92065e2f3473d
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Jul 13 02:36:20 2017 +0200

swrap: Add common exit point to swrap_getsockopt

In preparation of thread safety.

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b585bf0a24d19e03f5a9fdc51b6b1bc90e60ddd6
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Jul 13 02:30:14 2017 +0200

swrap: Add common exit point to swrap_connect

In preparation of thread safety.

Signed-off-by: Anoop C S <anoo...@redhat.com>
    Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 4c6082d88e1241fe678687fb0d19480e17e700e5
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Jul 13 02:26:10 2017 +0200

swrap: Add common exit point to swrap_auto_bind

In preparation for thread safety.

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit d6253b326ee53c4278458fc425335b64519d93dd
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jul 13 02:22:14 2017 +0200

swrap: Fix tab vs space in swrap_auto_bind

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 src/CMakeLists.txt   |  7 +---
 src/socket_wrapper.c | 98 +++-
 2 files changed, 67 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3b4d7d0..d96f773 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,9 +23,4 @@ set_target_properties(
 ${LIBRARY_SOVERSION}
 )
 
-# This needs to be at the end
-if (POLICY CMP0026)
-cmake_policy(SET CMP0026 OLD)
-endif()
-get_target_property(SWRAP_LOCATION socket_wrapper LOCATION)
-set(SOCKET_WRAPPER_LOCATION ${SWRAP_LOCATION} PARENT_SCOPE)
+set(SOCKET_WRAPPER_LOCATION 
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}socket_wrapper${CMAKE_SHARED_LIBRARY_SUFFIX}"
 PARENT_SCOPE)
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 29cd3f9..46fb683 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -3173,8 +3173,9 @@ static int swrap_auto_bind(int fd, struct socket_info 
*si, int family)
type = SOCKET_TYPE_CHAR_UDP;
break;
default:
-   errno = ESOCKTNOSUPPORT;
-   return -1;
+   errno = ESOCKTNOSUPPORT;
+   ret = -1;
+   goto done;
}
 
memset(, 0, sizeof(in));
@@ -3194,7 +3195,8 @@ static int swrap_auto_bind(int fd, struct socket_info 
*si, int family)
 
if (si->family != family) {
errno = ENETUNREACH;
-   return -1;
+   ret = -1;
+   goto done;
}
 
switch (si->type) {
@@ -3206,7 +3208,8 @@ static int swrap_auto_bind(int fd, struct socket_info 
*si, int family)
break;
default:
errno = ESOCKTNOSUPPORT;
-   return -1;
+   ret = -1;
+   goto done;

[SCM] Samba Shared Repository - branch master updated

2017-04-12 Thread Michael Adam
The branch, master has been updated
   via  9cf3ac1 s3:tests: fix commment typo in the offline test
  from  9d419c3 winbindd: only use the domain name from lookup sids if the 
domain matches

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


- Log -
commit 9cf3ac1d0c776cd97b2075e95174b3ab41974f89
Author: Michael Adam <ob...@samba.org>
Date:   Tue Apr 11 10:12:51 2017 +0200

s3:tests: fix commment typo in the offline test

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Apr 13 02:44:38 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/script/tests/test_offline.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_offline.sh 
b/source3/script/tests/test_offline.sh
index fbc071a..9809f1b 100755
--- a/source3/script/tests/test_offline.sh
+++ b/source3/script/tests/test_offline.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Blackbox test for shadow_copy2 VFS.
+# Blackbox test for the offline VFS module.
 #
 if [ $# -lt 7 ]; then
 cat <

[SCM] Samba Shared Repository - branch master updated

2017-03-20 Thread Michael Adam
The branch, master has been updated
   via  55546fe idmap_autorid: Use idmap_config_int
   via  adbabd3 idmap_rid: Use idmap_config_int
   via  e190eaa winbind: Add idmap_config_int
   via  0b05785 idmap_autorid: Use idmap_config_bool
   via  b6b04b6 idmap_ad: Use idmap_config_bool
   via  3e72603 idmap_rfc2307: Use idmap_config_bool
   via  cdaec3b idmap: Use idmap_config_bool in idmap_init_domain
   via  66f5e7d winbind: Add idmap_config_bool()
   via  644a997 idmap_ad: Use idmap_config_const_string
   via  b0edb06 idmap_rfc2307: Use idmap_config_const_string
   via  166e8fb idmap_ldap: Use idmap_config_const_string
   via  c0bea5d idmap_ldap: Use idmap_config_const_string
   via  9d22e8a winbind: Use idmap_config_const_string in idmap_init_domain
   via  e78d78a winbind: Use idmap_config_const_string in 
idmap_script_db_init
   via  925335a winbind: Use idmap_config_const_string in idmap_tdb2_db_init
   via  6d33ebd winbind: Use idmap_config_const_string in 
wb_xids2sids_add_dom
   via  3f4b391 winbind: Use idmap_config_const_string in 
idmap_init_named_domain
   via  b8e00f0 winbind: Use idmap_config_const_string in 
domain_has_idmap_config
   via  1c34166 winbind: Add idmap_config_const_string
  from  a181609 lib: Simplify smb_nanosleep

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


- Log -
commit 55546fe458a1925e55323411a35be104c071cabb
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 19:06:49 2017 +0100

idmap_autorid: Use idmap_config_int

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Mar 20 23:28:38 CET 2017 on sn-devel-144

commit adbabd3f4cc780061eda1faaff5ca44d7afdb116
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 19:05:10 2017 +0100

idmap_rid: Use idmap_config_int

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit e190eaa30fcf777ba11a65f11be88390ead7ce0b
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Jan 8 11:52:56 2017 +

winbind: Add idmap_config_int

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 0b05785de6b73a1eb29e21944a7ee6dc3a5ce082
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 19:01:01 2017 +0100

idmap_autorid: Use idmap_config_bool

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b6b04b6bd7960f186cff345398d91ff73303eccd
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:59:06 2017 +0100

idmap_ad: Use idmap_config_bool
    
Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3e72603c1fab8938a60aef31adea7d0ca7771518
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:57:03 2017 +0100

idmap_rfc2307: Use idmap_config_bool

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit cdaec3be3a1f7c0193de2c97bc6fdbebc3451423
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:53:58 2017 +0100

idmap: Use idmap_config_bool in idmap_init_domain

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 66f5e7dbdadf1ba9c619739aa772668e70bb1c27
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Jan 7 15:10:05 2017 +

winbind: Add idmap_config_bool()

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 644a997144fa890857a012355cbd9d406ccbfd3d
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:50:38 2017 +0100

idmap_ad: Use idmap_config_const_string

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b0edb068923a4b974002c6340a82afc028075938
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:48:46 2017 +0100

idmap_rfc2307: Use idmap_config_const_string

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 166e8fb1c139f638e7ab7f5c95c2ca2bb901c69f
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:40:28 2017 +0100

idmap_ldap: Use idmap_config_const_string

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c0bea5d081d224cb6d7ab61acf2097b349bdbaac
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 18 18:38:10 2017 +0100


[SCM] Socket Wrapper Repository - branch master updated

2017-02-10 Thread Michael Adam
The branch, master has been updated
   via  5af1553 Avoid mutex lock wait in socket close failure
  from  888a62e swrap: Add sanity check in socket_wrapper_max_sockets()

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


- Log -
commit 5af15532cefecb5665736f30e00960c17700d1b0
Author: Anoop C S <anoo...@redhat.com>
Date:   Fri Feb 10 21:38:11 2017 +0530

Avoid mutex lock wait in socket close failure

In case of absence to close a socket fd during an exit from
application we try to close the same by traversing the
socket_fds in swrap_destructor. But the early lock taken on
libc_symbol_binding_mutex inside the destructor blocks the
subsequent request for locking the same while loading
libc_close within swrap_close.

Also added a test case to verify this flaw in destructor.

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c   |  4 
 tests/CMakeLists.txt   |  3 ++-
 tests/test_close_failure.c | 50 ++
 3 files changed, 52 insertions(+), 5 deletions(-)
 create mode 100644 tests/test_close_failure.c


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 186b696..3d468c3 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -5656,8 +5656,6 @@ void swrap_destructor(void)
 {
struct socket_info_fd *s = socket_fds;
 
-   SWRAP_LOCK_ALL;
-
while (s != NULL) {
swrap_close(s->fd);
s = socket_fds;
@@ -5671,6 +5669,4 @@ void swrap_destructor(void)
if (swrap.libc.socket_handle) {
dlclose(swrap.libc.socket_handle);
}
-
-   SWRAP_UNLOCK_ALL;
 }
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9292b40..c2bd799 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -35,7 +35,8 @@ set(SWRAP_TESTS
 test_echo_udp_send_recv
 test_echo_udp_sendmsg_recvmsg
 test_swrap_unit
-test_max_sockets)
+test_max_sockets
+test_close_failure)
 
 if (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
 set(SWRAP_TESTS ${SWRAP_TESTS} test_sendmsg_recvmsg_fd)
diff --git a/tests/test_close_failure.c b/tests/test_close_failure.c
new file mode 100644
index 000..0c9d6a7
--- /dev/null
+++ b/tests/test_close_failure.c
@@ -0,0 +1,50 @@
+#include "torture.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static int setup(void **state)
+{
+   torture_setup_socket_dir(state);
+
+   return 0;
+}
+
+static int teardown(void **state)
+{
+   torture_teardown_socket_dir(state);
+
+   return 0;
+}
+
+static void test_close_failure(void **state)
+{
+   int s;
+   int rc;
+
+   (void) state; /* unused */
+   (void) s; /*set but not used */
+
+   s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+
+   assert_int_not_equal(rc, -1);
+
+   /* Do not close the socket here so that destructor
+* handles it and no hang should be observed.*/
+}
+
+int main(void) {
+   int rc;
+
+   const struct CMUnitTest close_failure_tests[] = {
+   cmocka_unit_test_setup_teardown(test_close_failure,
+   setup, teardown),
+   };
+
+   rc = cmocka_run_group_tests(close_failure_tests, NULL, NULL);
+
+   return rc;
+}


-- 
Socket Wrapper Repository



[SCM] Samba Shared Repository - branch master updated

2016-12-08 Thread Michael Adam
The branch, master has been updated
   via  ee0475d lib/util: Fix indentation within routine description for 
dbghdrclass
   via  c832188 lib/util: Fix input arguments description for dbghdrclass() 
routine
   via  701c6ad tevent: remove shebang from tevent.py
  from  ec0297b s4:repl_meta_data: normalize rdn attribute name via the 
schema

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


- Log -
commit ee0475d89dfcbe7451168cefb97ed023c104b01d
Author: Anoop C S <anoo...@redhat.com>
Date:   Tue Dec 6 15:25:46 2016 +0530

lib/util: Fix indentation within routine description for dbghdrclass

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Dec  9 02:02:36 CET 2016 on sn-devel-144

commit c832188b7826ff3f4b0bbdcef278440dcdf6dc51
Author: Anoop C S <anoo...@redhat.com>
Date:   Tue Dec 6 15:20:51 2016 +0530

lib/util: Fix input arguments description for dbghdrclass() routine

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 701c6ad53c6dbe08efd515fdacc72a906293453a
Author: Lukas Slebodnik <lsleb...@redhat.com>
Date:   Mon Dec 5 14:23:40 2016 +0100

tevent: remove shebang from tevent.py

The tevent.py is not a executable python script.
And rpmlint consider it as an error if module file
contians shebang

python2-tevent.x86_64: E: non-executable-script
/usr/lib64/python2.7/site-packages/tevent.py 644 /usr/bin/python
python3-tevent.x86_64: E: non-executable-script
/usr/lib64/python3.5/site-packages/tevent.py 644 /usr/bin/python

Signed-off-by: Lukas Slebodnik <lsleb...@redhat.com>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 lib/tevent/tevent.py |  1 -
 lib/util/debug.c | 32 +++-
 2 files changed, 15 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.py b/lib/tevent/tevent.py
index c296544..7045504 100644
--- a/lib/tevent/tevent.py
+++ b/lib/tevent/tevent.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
 #
 #   Python integration for tevent
 #
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 99b1584..37582db 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -1212,23 +1212,21 @@ void dbgflush( void )
 /***
  Print a Debug Header.
 
- Input:  level - Debug level of the message (not the system-wide debug
-  level. )
- cls   - Debuglevel class of the calling module.
-  file  - Pointer to a string containing the name of the file
-  from which this function was called, or an empty string
-  if the __FILE__ macro is not implemented.
-  func  - Pointer to a string containing the name of the function
-  from which this function was called, or an empty string
-  if the __FUNCTION__ macro is not implemented.
- line  - line number of the call to dbghdr, assuming __LINE__
- works.
-
-  Output: Always true.  This makes it easy to fudge a call to dbghdr()
-  in a macro, since the function can be called as part of a test.
-  Eg: ( (level <= DEBUGLEVEL) && (dbghdr(level,"",line)) )
-
-  Notes:  This function takes care of setting current_msg_level.
+ Input:  level- Debug level of the message (not the system-wide debug
+level. )
+ cls  - Debuglevel class of the calling module.
+ location - Pointer to a string containing the name of the file
+from which this function was called, or an empty string
+if the __FILE__ macro is not implemented.
+ func - Pointer to a string containing the name of the function
+from which this function was called, or an empty string
+if the __FUNCTION__ macro is not implemented.
+
+ Output: Always true.  This makes it easy to fudge a call to dbghdr()
+ in a macro, since the function can be called as part of a test.
+ Eg: ( (level <= DEBUGLEVEL) && (dbghdr(level,"",line)) )
+
+ Notes:  This function takes care of setting current_msg_level.
 
 /
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-12-04 Thread Michael Adam
The branch, master has been updated
   via  01cc499 idmap_hash: stdio.h comes with replace.h
   via  25305d1 idmap_hash: Make lw_map_file static
   via  807f374 winbind: lookup_usergroups_cached doesn't use the "domain" 
parameter
   via  4aa3a7f s3:waf: Remove unneeded CHARSET3 dependency
   via  f858121 s3:waf: Make PARAM and SMBREGISTRY a subsystem of smbconf 
only
   via  4c4fb69 s4:waf: Remove unneded dependency to s3 param
   via  676043c s3:waf samba3util requires CHARSET3
   via  cbcf9fa s3:waf: Move cbuf functions to samba3-util
   via  0c69a00 s3:waf: Move popt_samba3 up in the stack
   via  ed11f46 s3:waf: Reformat vlp
   via  1f1a327 s3:waf: Reformat rpc_open_tcp
   via  6a9785c s3:waf: Reformat versiontest
   via  3970d49 s3:waf: Reformat vfstest
   via  153ecea s3:waf: Reformat pdbtest
   via  ea4deca s3:waf: Reformat msg_source
   via  777a620 s3:waf: Reformat msg_sink
   via  e30120f s3:waf: Reformat msgtest
   via  533479c s3:waf: Reformat smbconftort
   via  7ec6088 s3:waf: Reformat smbtorture3
   via  43825b2 s3:waf: Reformat smbstatus
   via  4190b3c s3:waf: Reformat locktest2
   via  9571948 s3:waf: Reformat smbspool_krb5_wrapper
   via  662b1ff s3:waf: Reformat smbspool
   via  b619b32 s3:waf: Reformat smbclient
   via  a8bf998d s3:waf: Reformat cli_spoolss
   via  00ff779 s3:waf: Reformat libcli_netlogon3
   via  956cb52 s3:waf: Reformat errors3
   via  5ed1661 s3:waf: Reformat CHARSET3
   via  67207a5 s3:waf: Reformat samba3-util
   via  d34e3e0 s3:waf: Reformat trusts_util
   via  6dfeead s3:waf: Reformat DCUTIL
   via  448b51e s3:waf: Reformat SLCACHE
   via  00cd49e s3:waf: Reformat PASSCHANGE
   via  5f2d475 s3:waf: Reformat PLAINTEXT_AUTH
   via  3e4009e s3:waf: Reformat SERVICES
   via  b4770f2 s3:waf: Reformat LIBNMB
   via  aeb8836 s3:waf: Reformat LIBNET_SAMSYNC
   via  a28f75a s3:waf: Reformat LIBNET_DSSYNC
   via  fe36056 s3:waf: Reformat PRINTING
   via  21cbe63 s3:waf: Reformat printing_migrate
   via  6d20de3 s3:waf: Reformat PRINTBACKEND
   via  b21adbe s3:waf: Reformat PRINTBASE
   via  7227a85 s3:waf: Reformat LOCKING
   via  bb6cc0b s3:waf: Reformat smbd_base
   via  230949f s3:waf: Reformat smbconf
   via  24a0b38 s3:waf: Reformat ads
   via  b3f39fd s3:waf: Reformat secrets3
   via  592d5a9 s3:waf: Reformat libsmb
   via  b9ee6e3 s3:waf: Reformat samba3core
   via  1945f7d s3:waf: Reformat messages_dgm
   via  f0db5c5 s3:waf: Reformat TDB_LIB
   via  c4e8acf s3:waf: Reformat samba3-util
   via  6dd83b7 s3:waf: Reformat REG_FULL
   via  3c0990c s3:waf: Reformat REG_SMBCONF
   via  0da031e s3:waf: Reformat smbregistry
   via  ce400d5 s3:waf: Reformat param
   via  226f24c s3:waf: Reformat smbldaphelper
   via  c5b3f7c s3:waf: Reformat pdb
   via  db5bc68 s3:waf: Reformat samba-passdb
   via  c122d58 s3:waf: Reformat TLDAP
   via  08e740e s3:waf: Reformat GROUPDB
   via  a6c998a s3:waf: Reformat AVAHI
   via  39f69b9 s3:waf: Reformat gpo
   via  093a991 s3:waf: Reformat msrpc3
  from  383530c libsocket: Make sure ifr.ifr_name is null-terminated

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


- Log -
commit 01cc499beccf962d62fbe4fb8927f80ed8ab6913
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Nov 22 01:31:19 2016 +0100

idmap_hash: stdio.h comes with replace.h

Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Sun Dec  4 20:20:19 CET 2016 on sn-devel-144

commit 25305d172ea4e984a84af667c4c9787a43ebb9b1
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Nov 22 01:27:40 2016 +0100

idmap_hash: Make lw_map_file static

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 807f37493da8afc419d7e25f15a24f5fb5718d7f
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Nov 4 15:33:11 2016 +0100

winbind: lookup_usergroups_cached doesn't use the "domain" parameter

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 4aa3a7f27548eda68f415a8f5bde013a7a9d58d4
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Nov 22 17:35:31 2016 +0100

s3:waf: Remove unneeded CHARSET3 dependency
    
Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit f858121d8f94bd0da6fb93c4e6ab5f4a0e3c9c51
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Nov 22 13:47:3

[SCM] Samba Shared Repository - branch master updated

2016-11-23 Thread Michael Adam
The branch, master has been updated
   via  b5fe9c6 selftest: Fix timestamps on FreeBSD 11
   via  656f2a9 s3/dump_core: Honour pipe symbol (|) in system-wide 
core_pattern under linux
  from  530c2c8 ldb: version 1.1.28

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


- Log -
commit b5fe9c685fcdf62fb1c42543933d12d018297b04
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Nov 23 13:54:39 2016 +0100

selftest: Fix timestamps on FreeBSD 11

FreeBSD's date does not print the %, and \? does not catch that

Tested this manually:

$ echo 'time: 2016-11-23 12:52:19.123456Z'| sed 's/\..*NZ$/.00Z/'
time: 2016-11-23 12:52:19.123456Z
$ echo 'time: 2016-11-23 12:52:19.%6NZ'| sed 's/\..*NZ$/.00Z/'
time: 2016-11-23 12:52:19.00Z
$ echo 'time: 2016-11-23 12:52:19.6NZ'| sed 's/\..*NZ$/.00Z/'
time: 2016-11-23 12:52:19.00Z
$ echo 'time: 2016-11-23 12:52:19.NZ'| sed 's/\..*NZ$/.00Z/'
time: 2016-11-23 12:52:19.00Z
$

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Nov 24 00:42:55 CET 2016 on sn-devel-144

commit 656f2a9dcd6822e1e8606a56bf4cd8984ce80f5d
Author: Anoop C S <anoo...@redhat.com>
Date:   Wed Nov 16 08:55:13 2016 +

s3/dump_core: Honour pipe symbol (|) in system-wide core_pattern under linux

From man core(5):

"Since  kernel  2.6.19, Linux supports an alternate syntax for the
/proc/sys/kernel/core_pattern file.  If the first character of this
file is a pipe symbol (|), then the remainder of the line is interpreted
as a user-space program to be executed."

Discarding this symbol would result in misleading logs for 
smbd/nmbd/winbindd.
For example even if core_pattern contains '|', smbd logs would suggest the
following:

...
dumping core in /var/log/samba/cores/smbd
...

and coredump may or may not get created at that location depending on which
helper binary is being used for handling coredumps.

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 source3/lib/dumpcore.c| 32 
 testprogs/blackbox/subunit.sh |  2 +-
 2 files changed, 25 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/dumpcore.c b/source3/lib/dumpcore.c
index c72aa88..6c305ab 100644
--- a/source3/lib/dumpcore.c
+++ b/source3/lib/dumpcore.c
@@ -37,6 +37,7 @@
 #endif
 
 static char *corepath;
+static bool using_helper_binary = false;
 
 /**
  * Build up the default corepath as "/cores/"
@@ -169,6 +170,12 @@ static char *get_linux_corepath(void)
/*
 * No absolute path, use the default (cwd)
 */
+   if (result[0] == '|') {
+   /*
+   * Core dump handled by helper binaries
+   */
+   using_helper_binary = true;
+   }
TALLOC_FREE(result);
return NULL;
}
@@ -291,16 +298,25 @@ void dump_core_setup(const char *progname, const char 
*log_file)
}
 
if (*corepath != '\0') {
-   /* The chdir might fail if we dump core before we finish
-* processing the config file.
+   /*
+* Check whether coredump is handled by helper binaries or not.
+* If so skip chdir().
 */
-   if (chdir(corepath) != 0) {
-   DEBUG(0, ("unable to change to %s\n", corepath));
-   DEBUGADD(0, ("refusing to dump core\n"));
-   exit(1);
-   }
+   if (!using_helper_binary) {
+   /* The chdir might fail if we dump core before we finish
+* processing the config file.
+*/
+   if (chdir(corepath) != 0) {
+   DEBUG(0, ("unable to change to %s\n", 
corepath));
+   DEBUGADD(0, ("refusing to dump core\n"));
+   exit(1);
+   }
 
-   DEBUG(0,("dumping core in %s\n", corepath));
+   DEBUG(0,("dumping core in %s\n", corepath));
+   } else {
+   DEBUG(0,("coredump is handled by helper binary "
+"specified at /proc/sys/kernel/co

[SCM] Socket Wrapper Repository - branch master updated

2016-10-27 Thread Michael Adam
The branch, master has been updated
   via  057a956 tests: Clean-up max_sockets test case
  from  63d83be swrap: Fix use-after-free

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


- Log -
commit 057a956ad4cfe2bc6e03ec9033a8a9b15e8c88a1
Author: Anoop C S <anoo...@redhat.com>
Date:   Fri Sep 23 12:38:31 2016 +0530

tests: Clean-up max_sockets test case

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 tests/test_max_sockets.c | 24 
 1 file changed, 4 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tests/test_max_sockets.c b/tests/test_max_sockets.c
index 0aac181..0bc694b 100644
--- a/tests/test_max_sockets.c
+++ b/tests/test_max_sockets.c
@@ -1,24 +1,10 @@
-#include 
-#include 
-#include 
-#include 
-
-#include "config.h"
 #include "torture.h"
 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
+#include 
 #include 
-#ifdef HAVE_RPC_RPC_H
-#include 
-#endif
-
+#include 
 
 #define MAX_SOCKETS 4
 
@@ -52,14 +38,12 @@ static int _socket(int *_s)
 
s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
 
-   if (_s != NULL) {
-   *_s = s;
-   }
-
if (s < 0) {
return -1;
}
 
+   *_s = s;
+
return 0;
 }
 


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2016-10-25 Thread Michael Adam
The branch, master has been updated
   via  63d83be swrap: Fix use-after-free
  from  85c2d66 swrap: fix SWRAP_DLIST_ADD_AFTER

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


- Log -
commit 63d83be5925bcefc64275be5ccb2312596bf5ce8
Author: Anoop C S <anoo...@redhat.com>
Date:   Tue Oct 25 22:33:10 2016 +0530

swrap: Fix use-after-free

This was introduced by commit 9ce583b6cd6f55d473e5b54794fb06450997ebc8

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index d40f8b6..ece5a10 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1733,7 +1733,7 @@ static void swrap_remove_stale(int fd)
SWRAP_DLIST_REMOVE(socket_fds, fi);
free(fi);
 
-   si = [fi->si_index];
+   si = [si_index];
si->refcount--;
 
if (si->refcount > 0) {


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2016-10-25 Thread Michael Adam
The branch, master has been updated
   via  85c2d66 swrap: fix SWRAP_DLIST_ADD_AFTER
  from  9ce583b swrap: fix use-after-free in swrap_remove_stale()

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


- Log -
commit 85c2d663ec4dc7dc0170df676721e9a63f18fe40
Author: Anoop C S <anoo...@redhat.com>
Date:   Tue Oct 25 15:56:20 2016 +0200

swrap: fix SWRAP_DLIST_ADD_AFTER

Pair-Programmed-With: Michael Adam <ob...@samba.org>

Signed-off-by: Anoop C S <anoo...@redhat.com>
    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 40e2f04..d40f8b6 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -211,7 +211,7 @@ enum swrap_dbglvl_e {
 
 #define SWRAP_DLIST_ADD_AFTER(list, item, el) \
 do { \
-   if ((list) != NULL || (el) != NULL) { \
+   if ((list) == NULL || (el) == NULL) { \
SWRAP_DLIST_ADD(list, item); \
} else { \
(item)->prev = (el); \


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2016-10-25 Thread Michael Adam
The branch, master has been updated
   via  9ce583b swrap: fix use-after-free in swrap_remove_stale()
   via  ddba8cf swrap: slightly cleanup logic in swrap_close
   via  3b39c88 swrap: fix use-after-free in swrap_close
  from  d4cdce1 swrap: Fix build on Solaris

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


- Log -
commit 9ce583b6cd6f55d473e5b54794fb06450997ebc8
Author: Michael Adam <ob...@samba.org>
Date:   Tue Oct 25 13:46:18 2016 +0200

swrap: fix use-after-free in swrap_remove_stale()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit ddba8cf2058d662d628fc62f5896b873754ba7c3
Author: Michael Adam <ob...@samba.org>
Date:   Tue Oct 25 13:42:05 2016 +0200

swrap: slightly cleanup logic in swrap_close

This moves the libc_close() to one central point, thereby
grouping the fd-related operations together and the the
socket-info related operations after that.

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 3b39c88b138f88bffc7d71572a9c6a83e54a03c9
Author: Michael Adam <ob...@samba.org>
Date:   Tue Oct 25 13:41:29 2016 +0200

swrap: fix use-after-free in swrap_close

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 82d27e5..40e2f04 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1721,17 +1721,19 @@ static void swrap_remove_stale(int fd)
 {
struct socket_info_fd *fi = find_socket_info_fd(fd);
struct socket_info *si;
+   int si_index;
 
if (fi == NULL) {
return;
}
 
-   si = [fi->si_index];
+   si_index = fi->si_index;
 
SWRAP_LOG(SWRAP_LOG_TRACE, "remove stale wrapper for %d", fd);
SWRAP_DLIST_REMOVE(socket_fds, fi);
free(fi);
 
+   si = [fi->si_index];
si->refcount--;
 
if (si->refcount > 0) {
@@ -1743,7 +1745,7 @@ static void swrap_remove_stale(int fd)
}
 
si->next_free = first_free;
-   first_free = fi->si_index;
+   first_free = si_index;
 }
 
 static int sockaddr_convert_to_un(struct socket_info *si,
@@ -5351,30 +5353,32 @@ static int swrap_close(int fd)
 {
struct socket_info_fd *fi = find_socket_info_fd(fd);
struct socket_info *si = NULL;
+   int si_index;
int ret;
 
if (fi == NULL) {
return libc_close(fd);
}
 
-   si = [fi->si_index];
+   si_index = fi->si_index;
 
SWRAP_DLIST_REMOVE(socket_fds, fi);
free(fi);
 
+   ret = libc_close(fd);
+
+   si = [si_index];
si->refcount--;
 
if (si->refcount > 0) {
/* there are still references left */
-   return libc_close(fd);
+   return ret;
}
 
if (si->myname.sa_socklen > 0 && si->peername.sa_socklen > 0) {
swrap_pcap_dump_packet(si, NULL, SWRAP_CLOSE_SEND, NULL, 0);
}
 
-   ret = libc_close(fd);
-
if (si->myname.sa_socklen > 0 && si->peername.sa_socklen > 0) {
swrap_pcap_dump_packet(si, NULL, SWRAP_CLOSE_RECV, NULL, 0);
swrap_pcap_dump_packet(si, NULL, SWRAP_CLOSE_ACK, NULL, 0);
@@ -5385,7 +5389,7 @@ static int swrap_close(int fd)
}
 
si->next_free = first_free;
-   first_free = fi->si_index;
+   first_free = si_index;
 
return ret;
 }


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2016-10-21 Thread Michael Adam
The branch, master has been updated
   via  86fd744 swrap: Mark flags in swrap_accept4 as unused
   via  46615cd swrap: Fix the build on BSD and Solaris
  from  d8cf3b0 swrap: Handle threads that fork

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


- Log -
commit 86fd744333ddc74d32d301f316ce83e3a2d0c844
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Oct 21 08:04:02 2016 +0200

swrap: Mark flags in swrap_accept4 as unused

This removes a compiler warning on non-Linux systems.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 46615cd9119e0e66175768e1757c9bc3e15b9cc8
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Oct 21 07:56:24 2016 +0200

swrap: Fix the build on BSD and Solaris

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c | 6 ++
 1 file changed, 6 insertions(+)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 6679d5c..fb92904 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -142,6 +142,8 @@ enum swrap_dbglvl_e {
 #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
 #endif
 
+#define UNUSED(x) (void)(x)
+
 #ifdef IPV6_PKTINFO
 # ifndef IPV6_RECVPKTINFO
 #  define IPV6_RECVPKTINFO IPV6_PKTINFO
@@ -512,7 +514,9 @@ struct swrap_libc_symbols {
 #endif
SWRAP_SYMBOL_ENTRY(socket);
SWRAP_SYMBOL_ENTRY(socketpair);
+#ifdef HAVE_TIMERFD_CREATE
SWRAP_SYMBOL_ENTRY(timerfd_create);
+#endif
SWRAP_SYMBOL_ENTRY(write);
SWRAP_SYMBOL_ENTRY(writev);
 };
@@ -2882,6 +2886,7 @@ static int swrap_accept(int s,
 #ifdef HAVE_ACCEPT4
return libc_accept4(s, addr, addrlen, flags);
 #else
+   UNUSED(flags);
return libc_accept(s, addr, addrlen);
 #endif
}
@@ -2899,6 +2904,7 @@ static int swrap_accept(int s,
 #ifdef HAVE_ACCEPT4
ret = libc_accept4(s, _addr.sa.s, _addr.sa_socklen, flags);
 #else
+   UNUSED(flags);
ret = libc_accept(s, _addr.sa.s, _addr.sa_socklen);
 #endif
if (ret == -1) {


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2016-10-20 Thread Michael Adam
The branch, master has been updated
   via  d8cf3b0 swrap: Handle threads that fork
   via  c989bbc cmake: Check for constructor attribute
   via  f5cddcd swrap: Make symbol loading thread-safe
   via  201811d cmake: Link pthread library headers
   via  3507e18 swrap: Fix strict-aliasing issues while loading symbols
  from  b61f5df tests: Add a test for max_sockets

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


- Log -
commit d8cf3b0ca8ce24aaf19e4692882dadffa921f763
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 20 10:37:18 2016 +0200

swrap: Handle threads that fork

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c989bbc9f6afaad9e4b26501d57d7acb1297d1cb
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 20 10:35:50 2016 +0200

cmake: Check for constructor attribute

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit f5cddcd300b779131662519d56ae90fcebe459e1
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 20 10:22:40 2016 +0200

swrap: Make symbol loading thread-safe

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 201811dc614a4787482c3bb2fa14f47112a05a34
Author: Michael Adam <ob...@samba.org>
Date:   Sun Sep 18 20:28:06 2016 +0200

cmake: Link pthread library headers

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 3507e186d08fa8170a3499c9e69a49aa60ff9dcd
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 20 10:56:35 2016 +0200

swrap: Fix strict-aliasing issues while loading symbols

    Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 ConfigureChecks.cmake |  12 ++
 config.h.cmake|   1 +
 src/CMakeLists.txt|   2 +-
 src/socket_wrapper.c  | 434 +-
 tests/CMakeLists.txt  |   3 +-
 5 files changed, 306 insertions(+), 146 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 48455ef..71b34ce 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -172,6 +172,18 @@ int main(void) {
 }" HAVE_SOCKADDR_STORAGE)
 
 check_c_source_compiles("
+void test_constructor_attribute(void) __attribute__ ((constructor));
+
+void test_constructor_attribute(void)
+{
+return;
+}
+
+int main(void) {
+return 0;
+}" HAVE_CONSTRUCTOR_ATTRIBUTE)
+
+check_c_source_compiles("
 void test_destructor_attribute(void) __attribute__ ((destructor));
 
 void test_destructor_attribute(void)
diff --git a/config.h.cmake b/config.h.cmake
index a9b8ce8..6786b8a 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -58,6 +58,7 @@
 / OPTIONS /
 
 #cmakedefine HAVE_GCC_THREAD_LOCAL_STORAGE 1
+#cmakedefine HAVE_CONSTRUCTOR_ATTRIBUTE 1
 #cmakedefine HAVE_DESTRUCTOR_ATTRIBUTE 1
 #cmakedefine HAVE_ADDRESS_SANITIZER_ATTRIBUTE 1
 #cmakedefine HAVE_SOCKADDR_STORAGE 1
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4b22d77..3b4d7d0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(${CMAKE_BINARY_DIR})
 
 add_library(socket_wrapper SHARED socket_wrapper.c)
 
-target_link_libraries(socket_wrapper ${SWRAP_REQUIRED_LIBRARIES})
+target_link_libraries(socket_wrapper ${SWRAP_REQUIRED_LIBRARIES} 
${CMAKE_THREAD_LIBS_INIT})
 
 install(
   TARGETS
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 84dfc07..6679d5c 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -79,6 +79,7 @@
 #ifdef HAVE_RPC_RPC_H
 #include 
 #endif
+#include 
 
 enum swrap_dbglvl_e {
SWRAP_LOG_ERROR = 0,
@@ -94,6 +95,12 @@ enum swrap_dbglvl_e {
 #define PRINTF_ATTRIBUTE(a,b)
 #endif /* HAVE_FUNCTION_ATTRIBUTE_FORMAT */
 
+#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE
+#define CONSTRUCTOR_ATTRIBUTE __attribute__ ((constructor))
+#else
+#define CONSTRUCTOR_ATTRIBUTE
+#endif /* HAVE_CONSTRUCTOR_ATTRIBUTE */
+
 #ifdef HAVE_DESTRUCTOR_ATTRIBUTE
 #define DESTRUCTOR_ATTRIBUTE __attribute__ ((destructor))
 #else
@@ -152,6 +159,22 @@ enum swrap_dbglvl_e {
 # endif
 #endif
 
+/* Macros for accessing mutexes */
+# define SWRAP_LOCK(m) do { \
+   pthread_mutex_lock(&(m ## _mutex)); \
+} while(0)
+
+# define SWRAP_UNLOCK(m) do { \
+   pthread_mutex_unlock(&(m ## _mutex)); \
+} while(0)
+
+/* Add new global locks here please */
+# define SWRAP_LOCK_ALL \
+   SWRAP_LOCK(libc_symbol_binding); \
+
+# define SWRAP_UNLOCK_ALL \
+   SWRAP_UNLOCK(libc_

[SCM] Samba Shared Repository - branch master updated

2016-09-02 Thread Michael Adam
The branch, master has been updated
   via  a7735be kcc: Fix a -Werror,-Wformat-security error
  from  3430c6a s4-dsdb: Change debug level for replication

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


- Log -
commit a7735bedd5b2111fa036625738e5831651eb2007
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Sep 2 09:17:33 2016 +0200

kcc: Fix a -Werror,-Wformat-security error

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Sep  2 13:54:45 CEST 2016 on sn-devel-144

---

Summary of changes:
 source4/dsdb/kcc/garbage_collect_tombstones.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/kcc/garbage_collect_tombstones.c 
b/source4/dsdb/kcc/garbage_collect_tombstones.c
index 8d8a51f..8d2ea8b 100644
--- a/source4/dsdb/kcc/garbage_collect_tombstones.c
+++ b/source4/dsdb/kcc/garbage_collect_tombstones.c
@@ -149,7 +149,7 @@ NTSTATUS dsdb_garbage_collect_tombstones(TALLOC_CTX 
*mem_ctx,
DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT |
DSDB_SEARCH_REVEAL_INTERNALS;
ret = dsdb_search(samdb, tmp_ctx, , part->dn, 
LDB_SCOPE_SUBTREE,
- attrs, flags, filter);
+ attrs, flags, "%s", filter);
 
if (ret != LDB_SUCCESS) {
*error_string = talloc_asprintf(mem_ctx, "Failed to 
search for deleted objects in %s: %s",


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-09-01 Thread Michael Adam
The branch, master has been updated
   via  9f2a8af krb5_wrap: Remove extra parentheses causing compile error
  from  625f080 ctdb-tests: Add a test to ensure that CTDB works with no 
eventscripts

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


- Log -
commit 9f2a8af4b0d7874eff49eca56970153c8fd7b56d
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Sep 1 11:25:32 2016 +0530

krb5_wrap: Remove extra parentheses causing compile error

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Sep  1 21:02:54 CEST 2016 on sn-devel-144

---

Summary of changes:
 lib/krb5_wrap/krb5_samba.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index 24d64cc..841e3f8 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -3118,7 +3118,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context 
context,
if (retval != 0) {
DBG_WARNING("krb5_auth_con_setuseruserkey "
"failed (%s)\n",
-   error_message(retval)));
+   error_message(retval));
goto cleanup_creds;
}
 
@@ -3128,7 +3128,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context 
context,

KRB5_AUTH_CONTEXT_USE_SUBKEY);
if (retval != 0) {
DBG_WARNING("krb5_auth_con_setflags failed 
(%s)\n",
-   error_message(retval)));
+   error_message(retval));
goto cleanup_creds;
}
 
@@ -3160,7 +3160,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context 
context,
retval = ads_setup_auth_context(context, 
auth_context);
if (retval != 0) {
DBG_WARNING("ads_setup_auth_context 
failed (%s)\n",
-   error_message(retval)));
+   error_message(retval));
goto cleanup_creds;
}
} else {


-- 
Samba Shared Repository



[SCM] Resolv Wrapper Repository - branch master updated

2016-09-01 Thread Michael Adam
The branch, master has been updated
   via  d749ca2 Test a URI query with multiple answers
   via  cc7e8b0 Support multiple URI answers
  from  1e16cd1 rwrap: Remove name compression from URI RR

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


- Log -
commit d749ca20c5fced2b1279154ef8a4ca5c5e599dd2
Author: Matt Rogers <mrog...@redhat.com>
Date:   Thu Aug 25 12:59:31 2016 -0400

Test a URI query with multiple answers

Signed-off-by: Matt Rogers <mrog...@redhat.com
Reviewed-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

commit cc7e8b01f88d68c30c84ea9045f8a123f6f30720
Author: Matt Rogers <mrog...@redhat.com>
Date:   Thu Aug 25 12:57:09 2016 -0400

Support multiple URI answers

Add URI record use of recursion to rwrap_get_record(), for collecting
multiple URI answers under a single query.  Increase the
RWRAP_MAX_RECURSION limit to handle more URI records.

Signed-off-by: Matt Rogers <mrog...@redhat.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/resolv_wrapper.c  | 43 ++-
 tests/fake_hosts.in   |  2 ++
 tests/test_dns_fake.c | 33 +++--
 3 files changed, 71 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/resolv_wrapper.c b/src/resolv_wrapper.c
index 7a3c9b7..c6f06e3 100644
--- a/src/resolv_wrapper.c
+++ b/src/resolv_wrapper.c
@@ -151,7 +151,7 @@ static void rwrap_log(enum rwrap_dbglvl_e dbglvl,
}   \
 } while(0);
 
-#define RWRAP_MAX_RECURSION 5
+#define RWRAP_MAX_RECURSION 64
 
 /* Priority and weight can be omitted from the hosts file, but need to be part
  * of the output
@@ -786,6 +786,19 @@ static int rwrap_get_record(const char *hostfile, unsigned 
recursion,
const char *query, int type,
struct rwrap_fake_rr *rr);
 
+static int rwrap_uri_recurse(const char *hostfile, unsigned recursion,
+const char *query, struct rwrap_fake_rr *rr)
+{
+   int rc;
+
+   rc = rwrap_get_record(hostfile, recursion, query, ns_t_uri, rr);
+   if (rc == ENOENT) {
+   rc = 0;
+   }
+
+   return rc;
+}
+
 static int rwrap_srv_recurse(const char *hostfile, unsigned recursion,
 const char *query, struct rwrap_fake_rr *rr)
 {
@@ -826,6 +839,7 @@ static int rwrap_get_record(const char *hostfile, unsigned 
recursion,
char *key = NULL;
char *value = NULL;
int rc = ENOENT;
+   unsigned num_uris = 0;
 
if (recursion >= RWRAP_MAX_RECURSION) {
RWRAP_LOG(RWRAP_LOG_ERROR, "Recursed too deep!\n");
@@ -867,6 +881,18 @@ static int rwrap_get_record(const char *hostfile, unsigned 
recursion,
}
q[0] = '\0';
 
+   if (type == ns_t_uri && recursion > 0) {
+   /* Skip non-URI records. */
+   if (!TYPE_MATCH(type, ns_t_uri, rec_type, "URI", key, 
query)) {
+   continue;
+   }
+   /* Skip previous records based on the recurse depth. */
+   num_uris++;
+   if (num_uris <= recursion) {
+   continue;
+   }
+   }
+
if (TYPE_MATCH(type, ns_t_a, rec_type, "A", key, query)) {
rc = rwrap_create_fake_a_rr(key, value, rr);
break;
@@ -890,6 +916,10 @@ static int rwrap_get_record(const char *hostfile, unsigned 
recursion,
} else if (TYPE_MATCH(type, ns_t_uri,
  rec_type, "URI", key, query)) {
rc = rwrap_create_fake_uri_rr(key, value, rr);
+   if (rc == 0) {
+   /* Recurse to collect multiple URI answers 
under a single key. */
+   rc = rwrap_uri_recurse(hostfile, recursion + 1, 
key, rr + 1);
+   }
break;
} else if (TYPE_MATCH(type, ns_t_soa,
  rec_type, "SOA", key, query)) {
@@ -977,6 +1007,17 @@ static int rwrap_ancount(struct rwrap_fake_rr *rrs, int 
qtype)
int i;
int ancount = 0;
 
+   /* For URI return the number of URIs. */
+   if (qtype == ns_t_uri) {
+   for (i = 0; i < RWRAP_MAX_RECURSION; i++) {
+   if (rwrap_kno

[SCM] Resolv Wrapper Repository - branch master updated

2016-08-29 Thread Michael Adam
The branch, master has been updated
   via  1e16cd1 rwrap: Remove name compression from URI RR
  from  0bd14b6 Add support for the PTR DNS Resource Record type

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


- Log -
commit 1e16cd1195b1c0a048c7974ab4140347320ab46a
Author: Matt Rogers <mrog...@redhat.com>
Date:   Tue Aug 23 00:56:14 2016 -0400

rwrap: Remove name compression from URI RR

Compression is wrong for URI records.

Signed-off-by: Matt Rogers <mrog...@redhat.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/resolv_wrapper.c  | 16 
 tests/test_dns_fake.c | 26 ++
 2 files changed, 10 insertions(+), 32 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/resolv_wrapper.c b/src/resolv_wrapper.c
index 455a0af..7a3c9b7 100644
--- a/src/resolv_wrapper.c
+++ b/src/resolv_wrapper.c
@@ -625,8 +625,7 @@ static ssize_t rwrap_fake_uri(struct rwrap_fake_rr *rr,
uint8_t *a = answer;
ssize_t resp_size;
size_t rdata_size;
-   unsigned char uri_compressed[MAXDNAME];
-   ssize_t compressed_len;
+   size_t uri_len;
 
if (rr->type != ns_t_uri) {
RWRAP_LOG(RWRAP_LOG_ERROR, "Wrong type!\n");
@@ -634,15 +633,8 @@ static ssize_t rwrap_fake_uri(struct rwrap_fake_rr *rr,
}
RWRAP_LOG(RWRAP_LOG_TRACE, "Adding URI RR");
rdata_size = 3 * sizeof(uint16_t);
-
-   /* Prepare the data to write */
-   compressed_len = ns_name_compress(rr->rrdata.uri_rec.uri,
- uri_compressed, MAXDNAME,
- NULL, NULL);
-   if (compressed_len < 0) {
-   return -1;
-   }
-   rdata_size += compressed_len;
+   uri_len = strlen(rr->rrdata.uri_rec.uri) + 1;
+   rdata_size += uri_len;
 
resp_size = rwrap_fake_rdata_common(ns_t_uri, rdata_size,
rr->key, anslen, );
@@ -652,7 +644,7 @@ static ssize_t rwrap_fake_uri(struct rwrap_fake_rr *rr,
 
NS_PUT16(rr->rrdata.uri_rec.prio, a);
NS_PUT16(rr->rrdata.uri_rec.weight, a);
-   memcpy(a, uri_compressed, compressed_len);
+   memcpy(a, rr->rrdata.uri_rec.uri, uri_len);
 
return resp_size;
 }
diff --git a/tests/test_dns_fake.c b/tests/test_dns_fake.c
index d3e9ebe..348135c 100644
--- a/tests/test_dns_fake.c
+++ b/tests/test_dns_fake.c
@@ -362,7 +362,6 @@ static void test_res_fake_uri_query(void **state)
const uint8_t *rrdata;
int prio;
int weight;
-   char uri[MAXDNAME];
 
(void) state; /* unused */
 
@@ -378,8 +377,8 @@ static void test_res_fake_uri_query(void **state)
 
/*
 * The query must finish w/o an error, have one answer and the answer
-* must be a parseable RR of type SRV and have the priority, weight,
-* port and hostname as in the fake hosts file
+* must be a parseable RR of type URI and have the priority, weight, and
+* URI string as in the hosts file.
 */
assert_int_equal(ns_msg_getflag(handle, ns_f_rcode), ns_r_noerror);
assert_int_equal(ns_msg_count(handle, ns_s_an), 1);
@@ -390,15 +389,9 @@ static void test_res_fake_uri_query(void **state)
NS_GET16(prio, rrdata);
NS_GET16(weight, rrdata);
 
-   rv = ns_name_uncompress(ns_msg_base(handle),
-   ns_msg_end(handle),
-   rrdata,
-   uri, MAXDNAME);
-   assert_int_not_equal(rv, -1);
-
assert_int_equal(prio, 2);
assert_int_equal(weight, 5);
-   assert_string_equal(uri, "https://vpn.cwrap.org/VPN;);
+   assert_string_equal(rrdata, "https://vpn.cwrap.org/VPN;);
 }
 
 /*
@@ -417,7 +410,6 @@ static void test_res_fake_uri_query_minimal(void **state)
const uint8_t *rrdata;
int prio;
int weight;
-   char uri[MAXDNAME];
 
(void) state; /* unused */
 
@@ -433,8 +425,8 @@ static void test_res_fake_uri_query_minimal(void **state)
 
/*
 * The query must finish w/o an error, have one answer and the answer
-* must be a parseable RR of type SRV and have the priority, weight,
-* port and hostname as in the fake hosts file
+* must be a parseable RR of type URI and have the priority, weight, and
+* URI string as in the fake hosts file
 */
assert_int_equal(ns_msg_getflag(handle, ns_f_rcode), ns_r_noerror);
assert_int_equal(ns_msg_count(handle, ns_s_an), 1);
@@ -445,15 +437,9 @@ static void test_res_fake_uri_query_minimal(void **state)
NS_GET16(prio

[SCM] Resolv Wrapper Repository - branch master updated

2016-08-29 Thread Michael Adam
The branch, master has been updated
   via  0bd14b6 Add support for the PTR DNS Resource Record type
   via  bdd1166 rwrap: improve debug error messages
  from  02535da Add support for the URI DNS Resource Record type

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


- Log -
commit 0bd14b6fc075aa2a26d605d1aacbc2b5ff8946dc
Author: Jakub Hrozek <jakub.hro...@posteo.se>
Date:   Thu Aug 18 17:49:00 2016 +0200

Add support for the PTR DNS Resource Record type

Signed-off-by: Jakub Hrozek <jakub.hro...@posteo.se>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit bdd11668974c16a011f2dfaefe0aa233c3be1f82
Author: Michael Adam <ob...@samba.org>
Date:   Mon Aug 29 08:16:25 2016 +0200

rwrap: improve debug error messages
    
    Signed-off-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/resolv_wrapper.c  | 93 +++
 tests/fake_hosts.in   |  1 +
 tests/test_dns_fake.c | 44 
 3 files changed, 117 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/resolv_wrapper.c b/src/resolv_wrapper.c
index a07086a..455a0af 100644
--- a/src/resolv_wrapper.c
+++ b/src/resolv_wrapper.c
@@ -192,6 +192,7 @@ struct rwrap_fake_rr {
struct rwrap_uri_rrdata uri_rec;
struct rwrap_soa_rrdata soa_rec;
char cname_rec[MAXDNAME];
+   char ptr_rec[MAXDNAME];
} rrdata;
 
char key[MAXDNAME];
@@ -381,6 +382,16 @@ static int rwrap_create_fake_cname_rr(const char *key,
return 0;
 }
 
+static int rwrap_create_fake_ptr_rr(const char *key,
+   const char *value,
+   struct rwrap_fake_rr *rr)
+{
+   memcpy(rr->rrdata.ptr_rec , value, strlen(value) + 1);
+   memcpy(rr->key, key, strlen(key) + 1);
+   rr->type = ns_t_ptr;
+   return 0;
+}
+
 /* Prepares a fake header with a single response. Advances header_blob */
 static ssize_t rwrap_fake_header(uint8_t **header_blob, size_t remaining,
 size_t ancount, size_t arcount)
@@ -486,9 +497,8 @@ static ssize_t rwrap_fake_a(struct rwrap_fake_rr *rr,
uint8_t *a = answer_ptr;
ssize_t resp_size;
 
-   if (rr == NULL || rr->type != ns_t_a) {
-   RWRAP_LOG(RWRAP_LOG_ERROR,
- "Malformed record, no or wrong value!\n");
+   if (rr->type != ns_t_a) {
+   RWRAP_LOG(RWRAP_LOG_ERROR, "Wrong type!\n");
return -1;
}
RWRAP_LOG(RWRAP_LOG_TRACE, "Adding A RR");
@@ -511,9 +521,8 @@ static ssize_t rwrap_fake_(struct rwrap_fake_rr *rr,
uint8_t *a = answer;
ssize_t resp_size;
 
-   if (rr == NULL || rr->type != ns_t_) {
-   RWRAP_LOG(RWRAP_LOG_ERROR,
- "Malformed record, no or wrong value!\n");
+   if (rr->type != ns_t_) {
+   RWRAP_LOG(RWRAP_LOG_ERROR, "Wrong type!\n");
return -1;
}
RWRAP_LOG(RWRAP_LOG_TRACE, "Adding  RR");
@@ -539,9 +548,8 @@ static ssize_t rwrap_fake_ns(struct rwrap_fake_rr *rr,
unsigned char hostname_compressed[MAXDNAME];
ssize_t compressed_len;
 
-   if (rr == NULL || rr->type != ns_t_ns) {
-   RWRAP_LOG(RWRAP_LOG_ERROR,
- "Malformed record, no or wrong value!\n");
+   if (rr->type != ns_t_ns) {
+   RWRAP_LOG(RWRAP_LOG_ERROR, "Wrong type!\n");
return -1;
}
RWRAP_LOG(RWRAP_LOG_TRACE, "Adding NS RR");
@@ -580,9 +588,8 @@ static ssize_t rwrap_fake_srv(struct rwrap_fake_rr *rr,
unsigned char hostname_compressed[MAXDNAME];
ssize_t compressed_len;
 
-   if (rr == NULL || rr->type != ns_t_srv) {
-   RWRAP_LOG(RWRAP_LOG_ERROR,
- "Malformed record, no or wrong value!\n");
+   if (rr->type != ns_t_srv) {
+   RWRAP_LOG(RWRAP_LOG_ERROR, "Wrong type!\n");
return -1;
}
RWRAP_LOG(RWRAP_LOG_TRACE, "Adding SRV RR");
@@ -621,9 +628,8 @@ static ssize_t rwrap_fake_uri(struct rwrap_fake_rr *rr,
unsigned char uri_compressed[MAXDNAME];
ssize_t compressed_len;
 
-   if (rr == NULL || rr->type != ns_t_uri) {
-   RWRAP_LOG(RWRAP_LOG_ERROR,
- "Malformed record, no or wrong value!\n");
+   if (rr->type != ns_t_uri) {
+   RWRAP_LOG(RWRAP_LOG_ERROR, "Wrong type!\n");
re

[SCM] Samba Shared Repository - branch master updated

2016-08-16 Thread Michael Adam
The branch, master has been updated
   via  b2bf613 idmap: centrally check that unix IDs returned by the idmap 
backends are in range
   via  c21976d idmap: don't generally forbid id==0 from 
idmap_unix_id_is_in_range()
  from  5066a6d s3:lib/pthreadpool: fix the build on older systems

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


- Log -
commit b2bf61307cffd8ff7b6fb9852c107ab763653119
Author: Michael Adam <ob...@samba.org>
Date:   Tue Aug 9 18:25:12 2016 +0200

idmap: centrally check that unix IDs returned by the idmap backends are in 
range

Note: in the long run, it might be good to move this kind of
exit check (before handing the result back to the client)
to the parent winbindd code.

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

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Aug 17 01:21:39 CEST 2016 on sn-devel-144

commit c21976d4b1c604699299f2c0f768c1add93b349d
Author: Michael Adam <ob...@samba.org>
Date:   Mon Aug 15 23:07:33 2016 +0200

idmap: don't generally forbid id==0 from idmap_unix_id_is_in_range()

If the range allows it, then id==0 should not be forbidden.
This seems to have been taken in from idmap_ldap when the
function was originally created.

See 634cd2e0451d4388c3e3f78239495cf595368b15 .
The other backends don't seem to have had that
extra check for id == 0.

The reasoning for this change is that the range check should
apply to all cases. If the range includes the 0, then it
should be possible to get it as result. In particular,
this way, the function becomes applicable also to the
passdb backend case, e.g. in a samba4-ad-dc setup where
the Admin gets uid == 0.

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

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 source3/winbindd/idmap_util.c| 5 -
 source3/winbindd/winbindd_dual_srv.c | 4 
 2 files changed, 4 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_util.c b/source3/winbindd/idmap_util.c
index 3da39e8..196b4ad 100644
--- a/source3/winbindd/idmap_util.c
+++ b/source3/winbindd/idmap_util.c
@@ -34,11 +34,6 @@
  */
 bool idmap_unix_id_is_in_range(uint32_t id, struct idmap_domain *dom)
 {
-   if (id == 0) {
-   /* 0 is not an allowed unix id for id mapping */
-   return false;
-   }
-
if ((dom->low_id && (id < dom->low_id)) ||
(dom->high_id && (id > dom->high_id)))
{
diff --git a/source3/winbindd/winbindd_dual_srv.c 
b/source3/winbindd/winbindd_dual_srv.c
index fb65e9d..0484e19 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -189,6 +189,10 @@ NTSTATUS _wbint_Sids2UnixIDs(struct pipes_struct *p,
for (i=0; i<num_ids; i++) {
struct id_map *m = id_map_ptrs[i];
 
+   if (!idmap_unix_id_is_in_range(m->xid.id, dom)) {
+   m->status = ID_UNMAPPED;
+   }
+
if (m->status == ID_MAPPED) {
ids[i].xid = m->xid;
} else {


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-08-11 Thread Michael Adam
The branch, master has been updated
   via  98d289d script/autobuild.py: include the branch name in the output
  from  c064357 selftest/flapping: add some samba3.blackbox.smbclient_s3 
tests

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


- Log -
commit 98d289d2e5162a23d15562b009d0edf20a55a56b
Author: Stefan Metzmacher <me...@samba.org>
Date:   Wed Aug 10 12:44:26 2016 +0200

script/autobuild.py: include the branch name in the output

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Aug 11 08:38:47 CEST 2016 on sn-devel-144

---

Summary of changes:
 script/autobuild.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/script/autobuild.py b/script/autobuild.py
index 811f906..419fe1a 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -634,8 +634,8 @@ The last 50 lines of log messages:
 f.close()
 
 logs = os.path.join(gitroot, 'logs.tar.gz')
-send_email('autobuild failure on %s for task %s during %s'
-   % (platform.node(), failed_task, failed_stage),
+send_email('autobuild[%s] failure on %s for task %s during %s'
+   % (options.branch, platform.node(), failed_task, failed_stage),
text, logs)
 
 def email_success(elapsed_time, log_base=None):
@@ -666,7 +666,7 @@ The top commit for the tree that was built was:
 ''' % top_commit_msg
 
 logs = os.path.join(gitroot, 'logs.tar.gz')
-send_email('autobuild success on %s' % platform.node(),
+send_email('autobuild[%s] success on %s' % (options.branch, 
platform.node()),
text, logs)
 
 
@@ -768,7 +768,7 @@ else:
 
 AUTOBUILD FAILURE
 
-Your autobuild on %s failed after %.1f minutes
+Your autobuild[%s] on %s failed after %.1f minutes
 when trying to test %s with the following error:
 
%s
@@ -777,7 +777,7 @@ the autobuild has been abandoned. Please fix the error and 
resubmit.
 
 
 
-''' % (platform.node(), elapsed_minutes, failed_task, errstr)
+''' % (options.branch, platform.node(), elapsed_minutes, failed_task, errstr)
 
 cleanup()
 print(errstr)


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-08-08 Thread Michael Adam
The branch, master has been updated
   via  25df582 dbwrap_ctdb: treat empty records in ltdb as non-existing
   via  b17e2f5 s4/torture: add a test for ctdb-tombstrone-record deadlock
  from  14f29c4 buildscripts: Fix the regression with --without-acl-support.

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


- Log -
commit 25df582739918b7afd4e5497eaffe279e2d92cd1
Author: Ralph Boehme <s...@samba.org>
Date:   Mon Aug 8 16:58:51 2016 +0200

dbwrap_ctdb: treat empty records in ltdb as non-existing

When fetching records from remote ctdb nodes via ctdbd_parse() or in
db_ctdb_traverse(), we already check for tombstone records and skip
them. This was originally also done for the ltdb checks.

See also bug: https://bugzilla.samba.org/show_bug.cgi?id=10008
(commit 1cae59ce112ccb51b45357a52b902f80fce1eef1).

Commit 925625b52886d40b50fc631bad8bdc81970f7598 reverted part of the
patch of bug 10008 due to a deadlock it introduced.

This patch re-introduces the consistent treatment of empty records in
the ltdb but avoids the deadlock by correctly signalling
NT_STATUS_NOT_FOUND if an empty record is found authoritatively in
the ltdb and not calling ctdb in this case.

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

Pair-Programmed-With: Michael Adam <ob...@samba.org>

Signed-off-by: Ralph Boehme <s...@samba.org>
    Signed-off-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Aug  9 04:38:44 CEST 2016 on sn-devel-144

commit b17e2f5c740fb081c007ed2e1c23138ffcba1469
Author: Ralph Boehme <s...@samba.org>
Date:   Sat Jul 23 11:08:13 2016 +0200

s4/torture: add a test for ctdb-tombstrone-record deadlock

This tests for a possible deadlock between smbd and ctdb dealing with
ctdb tombstone records.

Commit 925625b52886d40b50fc631bad8bdc81970f7598 explains the deadlock in
more details and contains the fix. It's a fix for a regression
introduced by the patch for bug 10008 (1cae59ce112c).

If you ever want to use this test against that specific commit:

$ git checkout 925625b52886d40b50fc631bad8bdc81970f7598
$ git cherry-pick THIS_COMMIT

This should not deadlock on a ctdb cluster.

$ git revert 925625b52886d40b50fc631bad8bdc81970f7598

This will deadlock.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12005
    
    Pair-Programmed-With: Michael Adam <ob...@samba.org>

Signed-off-by: Ralph Boehme <s...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 source3/lib/dbwrap/dbwrap_ctdb.c | 27 -
 source4/torture/smb2/lock.c  | 64 
 2 files changed, 90 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index d86d078..10f5f50 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1221,6 +1221,7 @@ struct db_ctdb_parse_record_state {
uint32_t my_vnn;
bool ask_for_readonly_copy;
bool done;
+   bool empty_record;
 };
 
 static void db_ctdb_parse_record_parser(
@@ -1240,7 +1241,16 @@ static void db_ctdb_parse_record_parser_nonpersistent(
(struct db_ctdb_parse_record_state *)private_data;
 
if (db_ctdb_can_use_local_hdr(header, state->my_vnn, true)) {
-   state->parser(key, data, state->private_data);
+   /*
+* A record consisting only of the ctdb header can be
+* a validly created empty record or a tombstone
+* record of a deleted record (not vacuumed yet). Mark
+* it accordingly.
+*/
+   state->empty_record = (data.dsize == 0);
+   if (!state->empty_record) {
+   state->parser(key, data, state->private_data);
+   }
state->done = true;
} else {
/*
@@ -1267,6 +1277,7 @@ static NTSTATUS db_ctdb_parse_record(struct db_context 
*db, TDB_DATA key,
state.parser = parser;
state.private_data = private_data;
state.my_vnn = ctdbd_vnn(ctx->conn);
+   state.empty_record = false;
 
if (ctx->transaction != NULL) {
struct db_ctdb_transaction_handle *h = ctx->transaction;
@@ -1298,6 +1309,20 @@ static NTSTATUS db_ctdb_parse_record(struct db_context 
*db, TDB_DATA key,
status = db_ctdb_ltdb_parse(
ctx, key, db_ctdb_parse_record_parser_nonpersistent, );

[SCM] Samba Shared Repository - branch master updated

2016-08-04 Thread Michael Adam
The branch, master has been updated
   via  6147ed7 s3:lib: fix a typo in comment for talloc_sub_basic()
   via  8be379e smbd: remove redundant comment (with typo) from 
token_contains_name()
   via  14a2096 passdb: remove a misleading comment from 
lookup_name_smbconf()
   via  87c38d5 ctdb-packaging: Move ctdb tests to libexec directory
   via  f9c85d0 ctdb-waf: Move ctdb tests to libexec directory
   via  976be8f man: Wrong option for parameter ldap ssl in smb.conf man 
page
   via  dcdef00 tests:blackbox: let samba_dnsupdate.py provide more details
   via  4370870 script/autobuild.py: check for AUTOBUILD_SKIP_SAMBA_O3 
environment variable
   via  62b7e73 tests:samba_tool: make use of assertCmdFail() in gpo.py
   via  fed029a tests:samba_tool: pass stdout and stderr to 
assertCmdSuccess()
  from  9c6a4ea async_req: make async_connect_send() "reentrant"

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


- Log -
commit 6147ed70ff0c207c717bc7a553b5ef7a840e6fb5
Author: Michael Adam <ob...@samba.org>
Date:   Thu Aug 4 00:15:13 2016 +0200

s3:lib: fix a typo in comment for talloc_sub_basic()

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Aug  4 22:08:35 CEST 2016 on sn-devel-144

commit 8be379e2b1408a0800cb5682e6b36dcf7ae3087e
Author: Michael Adam <ob...@samba.org>
Date:   Thu Aug 4 00:13:31 2016 +0200

smbd: remove redundant comment (with typo) from token_contains_name()

The code says it all.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 14a2096a6708ed4bd9eae265a43bab4fee17df8a
Author: Michael Adam <ob...@samba.org>
Date:   Thu Aug 4 00:06:08 2016 +0200

passdb: remove a misleading comment from lookup_name_smbconf()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 87c38d5d741f5e58f643ad4f797c523c67bbab00
Author: Martin Schwenke <mar...@meltin.net>
Date:   Thu Aug 4 13:36:28 2016 +1000

ctdb-packaging: Move ctdb tests to libexec directory

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

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit f9c85d04e9edb3af9479e9c83d5b1ec77b9c2ee2
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Aug 3 13:23:31 2016 +0200

ctdb-waf: Move ctdb tests to libexec directory

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

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 976be8fe39c78acfd3c2a23302d26cc262be0ae0
Author: Marc Muehlfeld <mmuehlf...@samba.org>
Date:   Sat Jul 16 20:14:15 2016 +0200

man: Wrong option for parameter ldap ssl in smb.conf man page

- "ldap ssl" does not accept the value "yes"
- Replaced "start_tls" with "start tls".

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

Signed-off-by: Marc Muehlfeld <mmuehlf...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit dcdef0082a190dd9ed0b365c9103429a3a75adc3
Author: Stefan Metzmacher <me...@samba.org>
Date:   Tue Aug 2 18:38:33 2016 +0200

tests:blackbox: let samba_dnsupdate.py provide more details

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

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 4370870957ffeaaf2c7891e8f39e4043b4881b1b
Author: Stefan Metzmacher <me...@samba.org>
Date:   Mon Aug 1 16:48:53 2016 +0200

script/autobuild.py: check for AUTOBUILD_SKIP_SAMBA_O3 environment variable

We need to skip the samba-o3 target on older systems like sn-devel-104.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12108

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 62b7e73d4007401f52792bc74768dfd8c1472274
Author: Stefan Metzmacher <me...@samba.org>
Date:   Tue Aug 2 12:35:38 2016 +0200

tests:samba_tool: make use of assertCmdFail() in gpo.py

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

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit fed029a624b24e9e0b3124e1b4e0810d32a95f75
Author: Stefan Metzmacher <me...@samba.org>
Date:   T

[SCM] Samba Shared Repository - branch master updated

2016-07-14 Thread Michael Adam
The branch, master has been updated
   via  c3af7a3 lib: Allow NULL blob for messaging_send()
   via  aca68e5 lib: Avoid a "procid_is_local" call
   via  05c400e lib: Print own pid in messaging_init
  from  7c9505e ldb:dlinklist: avoid -Wtautological-compare errors with gcc6

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


- Log -
commit c3af7a377d5e298074123a621e849ddd29deadbd
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Jun 23 13:24:02 2016 +0200

lib: Allow NULL blob for messaging_send()

... something I've wanted to do for ages :-)

Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Jul 14 20:50:15 CEST 2016 on sn-devel-144

commit aca68e5dbb9d3d250464af6248f5ca95d837d108
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Apr 26 16:24:33 2016 +0200

lib: Avoid a "procid_is_local" call

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 05c400e1d8f852b04e5b9e7279fe376f76c63bc4
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Apr 18 16:40:22 2016 +0200

lib: Print own pid in messaging_init

This turned out to be some valuable debugging aid for me

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 source3/lib/messages.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 5d90947..ba97fb5 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -379,6 +379,11 @@ struct messaging_context *messaging_init(TALLOC_CTX 
*mem_ctx,
register_dmalloc_msgs(ctx);
debug_register_msgs(ctx);
 
+   {
+   struct server_id_buf tmp;
+   DBG_DEBUG("my id: %s\n", server_id_str_buf(ctx->id, ));
+   }
+
return ctx;
 }
 
@@ -511,10 +516,12 @@ NTSTATUS messaging_send(struct messaging_context *msg_ctx,
struct server_id server, uint32_t msg_type,
const DATA_BLOB *data)
 {
-   struct iovec iov;
+   struct iovec iov = {0};
 
-   iov.iov_base = data->data;
-   iov.iov_len = data->length;
+   if (data != NULL) {
+   iov.iov_base = data->data;
+   iov.iov_len = data->length;
+   };
 
return messaging_send_iov(msg_ctx, server, msg_type, , 1, NULL, 0);
 }
@@ -545,7 +552,7 @@ int messaging_send_iov_from(struct messaging_context 
*msg_ctx,
return EINVAL;
}
 
-   if (!procid_is_local()) {
+   if (dst.vnn != msg_ctx->id.vnn) {
if (num_fds > 0) {
return ENOSYS;
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-07-13 Thread Michael Adam
The branch, master has been updated
   via  84992e3 rpc_server: add mssing '#pragma GCC diagnostic push'
  from  f818136 python/remove_dc: handle dnsNode objects without dnsRecord 
attribute

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


- Log -
commit 84992e31e15b67cd5823c45a7f9bb4df471a1170
Author: Michael Adam <ob...@samba.org>
Date:   Wed Jul 13 13:22:54 2016 +0200

rpc_server: add mssing '#pragma GCC diagnostic push'

for completeness for later pop.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Ira Cooper <i...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Jul 14 02:02:33 CEST 2016 on sn-devel-144

---

Summary of changes:
 source3/rpc_server/mdssvc/mdssvc.h | 1 +
 1 file changed, 1 insertion(+)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/mdssvc/mdssvc.h 
b/source3/rpc_server/mdssvc/mdssvc.h
index 091cd97..4e08fe1 100644
--- a/source3/rpc_server/mdssvc/mdssvc.h
+++ b/source3/rpc_server/mdssvc/mdssvc.h
@@ -34,6 +34,7 @@
 #undef TRUE
 #undef FALSE
 /* allow building with --picky-developer */
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wcast-qual"
 #include 
 #include 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-06-30 Thread Michael Adam
The branch, master has been updated
   via  f13d07e s3/winbindd: use == -1 instead of < 0 for error checking 
uid_t
  from  8b7d92b librpc: add decode_netlogon_samlogon_response_packet for 
mailslot debugging.

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


- Log -
commit f13d07e459261ba0881ee725e94edd988c57479f
Author: Aurelien Aptel <aap...@suse.com>
Date:   Wed Mar 9 13:43:09 2016 +0100

s3/winbindd: use == -1 instead of < 0 for error checking uid_t

The sign of the uid_t type is left unspecified by POSIX. It's defined as
an unsigned 32b int on Linux, therefore the < 0 check is always
false.

For unsigned version of uid_t, "uid == -1" will implicitely cast -1 to
unsigned making it a valid test for both signed and unsigned version of
uid_t.

This commit makes the cast to (uid_t) explicit anyway.

Signed-off-by: Aurelien Aptel <aap...@suse.com>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>
    
Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Jul  1 05:22:36 CEST 2016 on sn-devel-144

---

Summary of changes:
 source3/winbindd/winbindd_cred_cache.c | 2 +-
 source3/winbindd/winbindd_pam.c| 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cred_cache.c 
b/source3/winbindd/winbindd_cred_cache.c
index e113f99..20b4d55 100644
--- a/source3/winbindd/winbindd_cred_cache.c
+++ b/source3/winbindd/winbindd_cred_cache.c
@@ -503,7 +503,7 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
NTSTATUS ntret;
 
if ((username == NULL && princ_name == NULL) ||
-   ccname == NULL || uid < 0) {
+   ccname == NULL || uid == (uid_t)-1) {
return NT_STATUS_INVALID_PARAMETER;
}
 
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 2cfd88a..8ec4fe4 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -555,7 +555,7 @@ uid_t get_uid_from_request(struct winbindd_request *request)
 
uid = request->data.auth.uid;
 
-   if (uid < 0) {
+   if (uid == (uid_t)-1) {
DEBUG(1,("invalid uid: '%u'\n", (unsigned int)uid));
return -1;
}
@@ -2311,7 +2311,7 @@ enum winbindd_result winbindd_dual_pam_logoff(struct 
winbindd_domain *domain,
 
 #ifdef HAVE_KRB5
 
-   if (state->request->data.logoff.uid < 0) {
+   if (state->request->data.logoff.uid == (uid_t)-1) {
DEBUG(0,("winbindd_pam_logoff: invalid uid\n"));
goto process_result;
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-06-21 Thread Michael Adam
The branch, master has been updated
   via  e29d8f1 libnet: ignore realm setting for domain security joins to 
AD domains if 'winbind rpc only = true'
   via  7720d04 Revert "s3:libnet: accept empty realm for AD domains when 
only security=domain is set."
  from  345cfae smbd: Fix a signed/unsigned hickup

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


- Log -
commit e29d8f108cd090706dc3f54282f5c33ec30df899
Author: Michael Adam <ob...@samba.org>
Date:   Wed Jun 15 23:03:32 2016 +0200

libnet: ignore realm setting for domain security joins to AD domains if 
'winbind rpc only = true'

Inspired by initial patch from Matt Rogers @ RedHat.

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

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Guenther Deschner <g...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Jun 22 05:05:47 CEST 2016 on sn-devel-144

commit 7720d0475517b1f99c0a547c11f0f40b95511d41
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jun 16 11:20:15 2016 +0200

Revert "s3:libnet: accept empty realm for AD domains when only 
security=domain is set."

This reverts commit 234a470f198f8f09f46aaeaf58f966faccedef18.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Guenther Deschner <g...@samba.org>

---

Summary of changes:
 source3/libnet/libnet_join.c | 33 -
 1 file changed, 16 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 0a23e0d..df4fa72 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -2303,6 +2303,7 @@ static WERROR libnet_join_check_config(TALLOC_CTX 
*mem_ctx,
bool valid_security = false;
bool valid_workgroup = false;
bool valid_realm = false;
+   bool ignored_realm = false;
 
/* check if configuration is already set correctly */
 
@@ -2322,11 +2323,26 @@ static WERROR libnet_join_check_config(TALLOC_CTX 
*mem_ctx,
valid_realm = strequal(lp_realm(), 
r->out.dns_domain_name);
switch (lp_security()) {
case SEC_DOMAIN:
+   if (!valid_realm && lp_winbind_rpc_only()) {
+   valid_realm = true;
+   ignored_realm = true;
+   }
case SEC_ADS:
valid_security = true;
}
 
if (valid_workgroup && valid_realm && valid_security) {
+   if (ignored_realm && !r->in.modify_config)
+   {
+   libnet_join_set_error_string(mem_ctx, r,
+   "Warning: ignoring realm when "
+   "joining AD domain with "
+   "'security=domain' and "
+   "'winbind rpc only = yes'. "
+   "(realm set to '%s', "
+   "should be '%s').", lp_realm(),
+   r->out.dns_domain_name);
+   }
/* nothing to be done */
return WERR_OK;
}
@@ -2367,26 +2383,9 @@ static WERROR libnet_join_check_config(TALLOC_CTX 
*mem_ctx,
W_ERROR_HAVE_NO_MEMORY(wrong_conf);
}
 
-   /*
-* We should generate the warning for the special case when
-* domain is AD, "security = domain" and the realm parameter is
-* not set.
-*/
-   if (lp_security() == SEC_DOMAIN &&
-   r->out.domain_is_ad &&
-   !valid_realm) {
-   libnet_join_set_error_string(mem_ctx, r,
-   "Warning: when joining AD domains with 
security=domain, "
-   "\"realm\" should be defined in the 
configuration (%s) "
-   "and configuration modification was not 
requested",
-   wrong_conf);
-   return WERR_OK;
-   }
-
libnet_join_set_error_string(mem_ctx, r,
"Invalid configuration (%s) and configuration 
modification "
"was not requested", wrong_conf);
-
return WERR_CAN_NOT_COMPLETE;
}
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-06-21 Thread Michael Adam
The branch, master has been updated
   via  6083e62 ctdb-daemon: make bool assignment more obvious
  from  af08cb2 source4/scripting: add an option to samba_dnsupdate to add 
ns records.

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


- Log -
commit 6083e62af527a99ec0b696528eaafd95b2590049
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jun 20 10:42:43 2016 +0200

ctdb-daemon: make bool assignment more obvious

(showing what is the rule and what is the exception)

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Jun 21 11:48:29 CEST 2016 on sn-devel-144

---

Summary of changes:
 ctdb/server/ctdbd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index 420add4..e09611f 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -294,10 +294,9 @@ int main(int argc, const char *argv[])
}
 
ctdb->valgrinding = (options.valgrinding == 1);
-   if ((options.valgrinding == 1) || (options.nosetsched == 1)) {
+   ctdb->do_setsched = (options.nosetsched != 1);
+   if (ctdb->valgrinding) {
ctdb->do_setsched = false;
-   } else {
-   ctdb->do_setsched = true;
}
 
ctdb->public_addresses_file = options.public_address_list;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-06-20 Thread Michael Adam
The branch, master has been updated
   via  7d9a876 ctdb-tests: Update local daemons tests to use 
CTDB_NOSETSCHED
   via  fc7e863 ctdb-scripts: Add new configuration variable CTDB_NOSETSCHED
   via  da91b70 ctdb-locking: Avoid real-time in lock helper if nosetsched 
option is set
   via  a21a4de ctdb-locking: Conditionally set real-time priority in lock 
helper
   via  2828b9a ctdb-daemon: Explicitly assign boolean values
   via  fd7bad4 ctdb-daemon: Do explicit check for integer values
  from  2d348bd pidl/ws: fix missing $name when generating MAPI dissector

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


- Log -
commit 7d9a8760400c8135374634767691e7a5f7a3a639
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Mon Jun 20 14:24:07 2016 +1000

ctdb-tests: Update local daemons tests to use CTDB_NOSETSCHED

... instead of --nosetsched command-line option.

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Jun 20 20:22:57 CEST 2016 on sn-devel-144

commit fc7e863ce7ee710159d030b05244879b17d7ceb2
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Mon Jun 20 14:21:18 2016 +1000

ctdb-scripts: Add new configuration variable CTDB_NOSETSCHED

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>

commit da91b707463193540294609d1ca7e043e34cd8ce
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Fri Jun 17 18:35:18 2016 +1000

ctdb-locking: Avoid real-time in lock helper if nosetsched option is set

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>

commit a21a4de2cb13d4f762c7c1192d05edf785091910
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Fri Jun 17 18:33:27 2016 +1000

ctdb-locking: Conditionally set real-time priority in lock helper

    Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 2828b9a8c6c067fe5cb9c5c56f2dd20f715682a5
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Fri Jun 17 18:10:16 2016 +1000

ctdb-daemon: Explicitly assign boolean values
    
Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>

commit fd7bad4229de93dccd82b1499c216fae2cf9ae5e
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Fri Jun 17 18:09:37 2016 +1000

ctdb-daemon: Do explicit check for integer values

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 ctdb/config/ctdbd_wrapper|  1 +
 ctdb/doc/ctdbd.conf.5.xml| 14 
 ctdb/server/ctdb_lock.c  |  8 +
 ctdb/server/ctdb_lock_helper.c   | 51 ++--
 ctdb/server/ctdbd.c  | 10 +++---
 ctdb/tests/simple/scripts/local_daemons.bash |  7 ++--
 6 files changed, 65 insertions(+), 26 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/config/ctdbd_wrapper b/ctdb/config/ctdbd_wrapper
index b6b983c..c007409 100755
--- a/ctdb/config/ctdbd_wrapper
+++ b/ctdb/config/ctdbd_wrapper
@@ -163,6 +163,7 @@ build_ctdb_options ()
 maybe_set "--start-as-stopped "  "$CTDB_START_AS_STOPPED" "yes"
 maybe_set "--no-recmaster"   "$CTDB_CAPABILITY_RECMASTER" "no"
 maybe_set "--no-lmaster" "$CTDB_CAPABILITY_LMASTER"   "no"
+maybe_set "--nosetsched" "$CTDB_NOSETSCHED"   "yes"
 maybe_set "--script-log-level"   "$CTDB_SCRIPT_LOG_LEVEL"
 maybe_set "--max-persistent-check-errors" 
"$CTDB_MAX_PERSISTENT_CHECK_ERRORS"
 }
diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml
index f69f705..2ec76fd 100644
--- a/ctdb/doc/ctdbd.conf.5.xml
+++ b/ctdb/doc/ctdbd.conf.5.xml
@@ -314,6 +314,20 @@
   
 
   
+   CTDB_NOSETSCHED=yes|no
+   
+ 
+   Defaults to no.  Corresponds to --nosetsched.
+ 
+ 
+   Usually CTDB runs with real-time priority.  If you are running
+   CTDB on a platform that does not support real-time priority,
+   you can set this.
+ 
+   
+  
+
+  
CTDB_NOTIFY_SCRIPT=FILENAME

  
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index 7962e94..8f3a18d 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -845,

[SCM] Samba Website Repository - branch master updated

2016-06-10 Thread Michael Adam
The branch, master has been updated
   via  4371055 History: include 4.4.4 in the sidebar release notes list
   via  c722f08 History: fix text for link to 4.4.3 relnotes
  from  8777400 NEWS[4.4.4]: Samba 4.4.4 Available for Download

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


- Log -
commit 4371055be078e3465390397e9ba27fdb90bf51a3
Author: Michael Adam <ob...@samba.org>
Date:   Fri Jun 10 11:03:58 2016 +0200

History: include 4.4.4 in the sidebar release notes list

Signed-off-by: Michael Adam <ob...@samba.org>

commit c722f082c88eafd07d3f64ffa8ac944bc8b7477e
Author: Michael Adam <ob...@samba.org>
Date:   Fri Jun 10 11:02:20 2016 +0200

History: fix text for link to 4.4.3 relnotes

    Signed-off-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 history/header_history.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/history/header_history.html b/history/header_history.html
index 953d930..f5c6418 100755
--- a/history/header_history.html
+++ b/history/header_history.html
@@ -9,7 +9,8 @@
Release Notes


-   samba-4.4.2
+   samba-4.4.4
+   samba-4.4.3
samba-4.4.2
samba-4.4.1 (do not 
use)
samba-4.4.0


-- 
Samba Website Repository



[SCM] Samba Shared Repository - branch master updated

2016-06-02 Thread Michael Adam
The branch, master has been updated
   via  8814b25 lib: replace: snprintf - Fix length calculation for 
hex/octal 64-bit values.
  from  b929008 Improve help wording for samba-tool domain provision as per 
https://lists.samba.org/archive/samba-technical/2016-April/113740.html

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


- Log -
commit 8814b2556583e1f8965e8bf5a93438d46e8d43e6
Author: Lorinczy Zsigmond <lzs...@freemail.c3.hu>
Date:   Thu Jun 2 14:54:05 2016 -0700

lib: replace: snprintf - Fix length calculation for hex/octal 64-bit values.

Prevents truncation due to buffer size being too small.

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

Signed-off-by: Lorinczy Zsigmond <lzs...@freemail.c3.hu>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Jun  3 03:48:58 CEST 2016 on sn-devel-144

---

Summary of changes:
 lib/replace/snprintf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/snprintf.c b/lib/replace/snprintf.c
index 86ba74c..63eb036 100644
--- a/lib/replace/snprintf.c
+++ b/lib/replace/snprintf.c
@@ -804,7 +804,7 @@ static void fmtint(char *buffer, size_t *currlen, size_t 
maxlen,
 {
int signvalue = 0;
unsigned LLONG uvalue;
-   char convert[20];
+   char convert[22+1]; /* 64-bit value in octal: 22 digits + \0 */
int place = 0;
int spadlen = 0; /* amount to space pad */
int zpadlen = 0; /* amount to zero pad */
@@ -834,8 +834,8 @@ static void fmtint(char *buffer, size_t *currlen, size_t 
maxlen,
(caps? "0123456789ABCDEF":"0123456789abcdef")
[uvalue % (unsigned)base  ];
uvalue = (uvalue / (unsigned)base );
-   } while(uvalue && (place < 20));
-   if (place == 20) place--;
+   } while(uvalue && (place < sizeof(convert)));
+   if (place == sizeof(convert)) place--;
convert[place] = 0;
 
zpadlen = max - place;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-06-01 Thread Michael Adam
The branch, master has been updated
   via  f8141e9 ctdb-recoverd: Freeze databases whenever the node is 
INACTIVE
   via  4b5eaf9 ctdb:banning: Improve debug message in ctdb_ban_node_event()
   via  57cb011 ctdb:banning: Improve a debug message
  from  01043fc repl_meta_data: Do rename before deleted object cleanup

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


- Log -
commit f8141e91a693912ea1107a49320e83702a80757a
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Wed Jun 1 12:10:46 2016 +1000

ctdb-recoverd: Freeze databases whenever the node is INACTIVE

If the node becomes stopped or banned after recovery is marked
active, then it will never freeze the databases, and hence the
node will keep banning itself indefinitely, until ctdbd is restarted.

This is a regression from 4.3, introduced with

b4357a79d916b1f8ade8fa78563fbef0ce670aa9

and

d8f3b490bbb691c9916eed0df5b980c1aef23c85

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

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Jun  1 17:36:12 CEST 2016 on sn-devel-144

commit 4b5eaf9a4ee21743f2a0e926fc8720a7ef0d8879
Author: Michael Adam <ob...@samba.org>
Date:   Wed Jun 1 01:16:23 2016 +0200

ctdb:banning: Improve debug message in ctdb_ban_node_event()

Make it more clear what happens when reading the logs.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>

commit 57cb011a0a1815aa29f65116d75c78080bb135dc
Author: Michael Adam <ob...@samba.org>
Date:   Wed Jun 1 00:53:54 2016 +0200

ctdb:banning: Improve a debug message

This adapts the debug message in local_node_got_banned
to reflect what the function is currently doing.
This message was not adapted when the function was changed.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>

---

Summary of changes:
 ctdb/server/ctdb_banning.c  |  6 --
 ctdb/server/ctdb_recoverd.c | 15 +--
 2 files changed, 17 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_banning.c b/ctdb/server/ctdb_banning.c
index a4c56f5..9cd1636 100644
--- a/ctdb/server/ctdb_banning.c
+++ b/ctdb/server/ctdb_banning.c
@@ -42,7 +42,8 @@ static void ctdb_ban_node_event(struct tevent_context *ev,
 
/* Make sure we were able to freeze databases during banning */
if (!ctdb_db_all_frozen(ctdb)) {
-   DEBUG(DEBUG_ERR, ("Banning timed out, but still unable to 
freeze databases\n"));
+   DEBUG(DEBUG_ERR, ("Banning timed out, but not all databases "
+ "frozen yet - banning this node again.\n"));
ctdb_ban_self(ctdb);
return;
}
@@ -60,7 +61,8 @@ void ctdb_local_node_got_banned(struct ctdb_context *ctdb)
 {
struct ctdb_db_context *ctdb_db;
 
-   DEBUG(DEBUG_NOTICE,("This node has been banned - forcing recovery\n"));
+   DEBUG(DEBUG_NOTICE, ("This node has been banned - releasing all public "
+"IPs and setting the generation to INVALID.\n"));
 
/* Reset the generation id to 1 to make us ignore any
   REQ/REPLY CALL/DMASTER someone sends to us.
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 09940dc..cb5f8a3 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -257,6 +257,7 @@ struct ctdb_recoverd {
struct ctdb_iface_list_old *ifaces;
uint32_t *force_rebalance_nodes;
struct ctdb_node_capabilities *caps;
+   bool frozen_on_inactive;
 };
 
 #define CONTROL_TIMEOUT() timeval_current_ofs(ctdb->tunable.recover_timeout, 0)
@@ -3550,11 +3551,18 @@ static void main_loop(struct ctdb_context *ctdb, struct 
ctdb_recoverd *rec,
 
return;
}
-   ret = ctdb_ctrl_freeze(ctdb, CONTROL_TIMEOUT(), 
CTDB_CURRENT_NODE);
+   }
+   if (! rec->frozen_on_inactive) {
+   ret = ctdb_ctrl_freeze(ctdb, CONTROL_TIMEOUT(),
+  CTDB_CURRENT_NODE);
if (ret != 0) {
-   DEBUG(DEBUG_ERR,(__location__ " Failed to 
freeze node in STOPPED or BANNED state\n"));
+   DEBUG(DEBUG_ERR,
+ (__locati

[SCM] Samba Shared Repository - branch master updated

2016-05-24 Thread Michael Adam
The branch, master has been updated
   via  de2bc19 selftest: systematize formatting of if/elseif/else 
indentation in cleanup_child
   via  98304a8 selftest: improve logic in cleanup_child() with early return
   via  e06d016 selftest: improve misleading indentation in cleanup_child()
   via  7a3f0cf selftest: fix printf in cleanup_child()
  from  b2b951d heimdal make kvno unisgned internally

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


- Log -
commit de2bc193ad0a46518e0c34210eadddaa81648758
Author: Michael Adam <ob...@samba.org>
Date:   Sat May 14 00:51:19 2016 +0200

selftest: systematize formatting of if/elseif/else indentation in 
cleanup_child

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue May 24 13:43:35 CEST 2016 on sn-devel-144

commit 98304a84b7d404a6ac675a7474c9b68ff076a90b
Author: Michael Adam <ob...@samba.org>
Date:   Sat May 14 00:49:40 2016 +0200

selftest: improve logic in cleanup_child() with early return
    
    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit e06d01647ea406e38627d644d21d1f9361683550
Author: Michael Adam <ob...@samba.org>
Date:   Sat May 14 00:44:18 2016 +0200

selftest: improve misleading indentation in cleanup_child()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 7a3f0cfd6589023b2e66bf008966bdea785c18b9
Author: Michael Adam <ob...@samba.org>
Date:   Sat May 14 00:38:48 2016 +0200

    selftest: fix printf in cleanup_child()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 selftest/target/Samba.pm | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index 6f37aa3..bb33fb7 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -313,20 +313,21 @@ sub get_interface($)
 sub cleanup_child($$)
 {
 my ($pid, $name) = @_;
-my $childpid = -1;
 
-if (defined($pid)) {
-$childpid = waitpid($pid, WNOHANG);
+if (!defined($pid)) {
+print STDERR "cleanup_child: pid not defined ... not calling 
waitpid\n";
+return -1;
 }
 
+my $childpid = waitpid($pid, WNOHANG);
+
 if ($childpid == 0) {
 } elsif ($childpid < 0) {
-   printf STDERR "%s child process %d isn't here any more\n",
+   printf STDERR "%s child process %d isn't here any more\n", $name, $pid;
return $childpid;
-}
-elsif ($? & 127) {
+} elsif ($? & 127) {
printf STDERR "%s child process %d, died with signal %d, %s coredump\n",
-   $name, $childpid, ($? & 127),  ($? & 128) ? 'with' : 'without';
+   $name, $childpid, ($? & 127),  ($? & 128) ? 'with' : 'without';
 } else {
printf STDERR "%s child process %d exited with value %d\n", $name, 
$childpid, $? >> 8;
 }


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-05-13 Thread Michael Adam
The branch, master has been updated
   via  d36e693 travis: run the samba-o3 target
   via  2317800 autobuild: run the samba-o3 target by default
   via  cc9d380 autobuild: add a target samba-o3 that is built with -O3
  from  8b3ae1b s4:repl_meta_data: squelch compile warning with -O3

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


- Log -
commit d36e69382df033d0187acb5e2b556c27ed6421dd
Author: Michael Adam <ob...@samba.org>
Date:   Fri May 13 00:00:48 2016 +0200

travis: run the samba-o3 target

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri May 13 13:46:12 CEST 2016 on sn-devel-144

commit 23178004888c1e819105919daf38c74ed82b1a5a
Author: Michael Adam <ob...@samba.org>
Date:   Mon Apr 11 10:23:00 2016 +0200

autobuild: run the samba-o3 target by default
    
    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit cc9d38027126e32d89d9486a6d923c1c10ea25c7
Author: Michael Adam <ob...@samba.org>
Date:   Tue Mar 22 18:14:17 2016 +0100

autobuild: add a target samba-o3 that is built with -O3

Only run quicktest against the ad_dc env.
This currently just takes some 6 odd minutes.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

---

Summary of changes:
 .travis.yml |  1 +
 script/autobuild.py | 11 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/.travis.yml b/.travis.yml
index b930cfe..cf1b0d2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,7 @@ env:
   - TASK=samba-ctdb
   - TASK=samba-libs
   - TASK=samba-static
+  - TASK=samba-o3
   - TASK=ldb
   - TASK=tdb
   - TASK=talloc
diff --git a/script/autobuild.py b/script/autobuild.py
index ee16f5b..0af8166 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -24,6 +24,7 @@ builddirs = {
 "ctdb": "ctdb",
 "samba"  : ".",
 "samba-xc" : ".",
+"samba-o3" : ".",
 "samba-ctdb" : ".",
 "samba-libs"  : ".",
 "samba-static"  : ".",
@@ -38,7 +39,7 @@ builddirs = {
 "retry"   : "."
 }
 
-defaulttasks = [ "ctdb", "samba", "samba-xc", "samba-ctdb", "samba-libs", 
"samba-static", "ldb", "tdb", "talloc", "replace", "tevent", "pidl" ]
+defaulttasks = [ "ctdb", "samba", "samba-xc", "samba-o3", "samba-ctdb", 
"samba-libs", "samba-static", "ldb", "tdb", "talloc", "replace", "tevent", 
"pidl" ]
 
 samba_configure_params = " --picky-developer ${PREFIX} ${EXTRA_PYTHON} 
--with-profiling-data"
 
@@ -79,6 +80,14 @@ tasks = {
 " --cross-answers=./bin-xe/cross-answers.txt 
--with-selftest-prefix=./bin-xa/ab" + samba_configure_params, "text/plain"),
("compare-results", "script/compare_cc_results.py 
./bin/c4che/default.cache.py ./bin-xe/c4che/default.cache.py 
./bin-xa/c4che/default.cache.py", "text/plain")],
 
+# test build with -O3 -- catches extra warnings and bugs
+"samba-o3" : [ ("random-sleep", "../script/random-sleep.sh 60 600", 
"text/plain"),
+   ("configure", "ADDITIONAL_CFLAGS='-O3' 
./configure.developer --with-selftest-prefix=./bin/ab" + 
samba_configure_params, "text/plain"),
+   ("make", "make -j", "text/plain"),
+   ("test", "make quicktest FAIL_IMMEDIATELY=1 
TESTS='\(ad_dc\)'", "text/plain"),
+   ("install", "make install", "text/plain"),
+   ("check-clean-tree", "script/clean-source-tree.sh", 
"text/plain"),
+   ("clean", "make clean", "text/plain") ],
 
 "samba-ctdb" : [ ("random-sleep", "script/random-sleep.sh 60 600", 
"text/plain"),
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-05-12 Thread Michael Adam
The branch, master has been updated
   via  8b3ae1b s4:repl_meta_data: squelch compile warning with -O3
   via  3b4eb71 s3:modules/vfs_snapper squelch -O3 compile warning
   via  fb81a0b examples:smbclient:write: fix O3 error unused result of 
fgets
   via  b279aa1 examples:smbclient:read: fix O3 error unused result of fgets
   via  398bb12 examples:smbclient:fstatvfs: fix O3 error unused result of 
fgets
   via  49b9185 examples:smbclient:statvfs: fix O3 error unused result of 
fgets
   via  2ec0ecc examples:smbclient:notify: fix O3 error unused result from 
fgets
   via  5dae286 examples:smbclient:testacl3: fix O3 error unused result 
from fgets
   via  ac64aab s3:vfs:preopen: fix O3 error unused result of write
   via  1f04687 s3:vfs:aio_fork: fix O3 error unused result of write
   via  3776a9c s3:smbfilter: fix O3 error unused result of system()
   via  6bd436f s3:utils:log2pcaphex: fix O3 error uninitialized variable
   via  b7cf771 s3:utils:log2pcaphex: fix O3 error unused result of fgets
   via  8f16d23 s3:samlogon_cache: fix O3 error unused result of truncate
   via  33d20f9 s4:client: fix O3 error unused result of of chdir and system
   via  a7fc5e0 s4:torture:nbench: fix O3 error unused result of asprintf
   via  ea668a2 s4:torture:rpc:samlogon: fix O3 error unused result of 
asprintf
   via  080946c s4:torture:basic:delete: fix O3 error unused result of 
asprintf
   via  ef63ebd s4:torture:basic:dir: fix O3 error unused result of asprintf
   via  f725691 s4:torture:basic: fix O3 error unused result of write
   via  9918234 s4:torture:basic:misc: fix O3 error unused result of 
asprintf
   via  ebfbf6b s4:torture:basic: fix O3 error unused result of asprintf
   via  a6db052 s4:regshell: fix O3 error unused result of asprintf in 
reg_complete_key()
   via  2a2d990 s4:ntvfs: fix O3 error unused result of write error in 
nbench_log()
   via  93b1dac s4:ntvfs: fix O3 error unused result of asprintf in 
cifspsx_file_utime()
   via  fa80f1a s4:ntvfs: fix O3 error unused result of asprintf in 
cifspsx_list_unix
   via  8f4759d s4:ntvfs: fix O3 error unused result of asprintf in 
cifspsx_map_fileinfo
   via  b64a24e s4:ntvfs: fix O3 error unused result of asprintf in 
svfs_file_utime
   via  8e52137 s4:ntvfs: fix O3 error unused result of asprintf
   via  2d8a312 s4:registry:patchfile: fix O3 error unused result of write
   via  c150234 s4:libcli:resolve: fix O3 error unused result of write
   via  258360f lib: add sys_write_v - void variant of sys_write
   via  4680fe0 lib: add sys_read_v - void variant of sys_read
   via  af83bc3 debug: fix -O3 warning - unused return code of write()
   via  0e80775 tdb:torture: fix -O3 error unused result of write
   via  a860245 tdb:torture: fix -O3 error unused result code of read
   via  7740876 tevent:testsuite: fix O3 errors unused result of write
   via  22918a0 tevent:testsuite: fix O3 errors unused result for read
   via  1521e68 tevent:signal: fix -O3 error unused result of read
   via  24b267e tevent:signal: fix -O3 error unused result of write
   via  149fa72 tevent:threads: fix -O3 error unused result of write
  from  a55ac51 s3:rpcclient add -m option

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


- Log -
commit 8b3ae1bb9ce13bb7dd4d024cb4a5a07757986633
Author: Christian Ambach <a...@samba.org>
Date:   Thu May 12 17:10:51 2016 +0200

s4:repl_meta_data: squelch compile warning with -O3

Signed-off-by: Christian Ambach <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri May 13 03:50:10 CEST 2016 on sn-devel-144

commit 3b4eb715c5eab8dc91ee9709c0f56af7570d8b70
Author: Christian Ambach <a...@samba.org>
Date:   Sat Apr 2 02:08:05 2016 +0200

s3:modules/vfs_snapper squelch -O3 compile warning

Signed-off-by: Christian Ambach <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit fb81a0b4e21086dc87f8ce1999266a0e7a5b0763
Author: Michael Adam <ob...@samba.org>
Date:   Tue Apr 5 23:07:11 2016 +0200

examples:smbclient:write: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Christian Ambach <a...@samba.org>

commit b279aa1f7cab0dcdf8466f0bea13faa0cbabacba
Author: Michael Adam <ob...@samba.org>
Date:   Tue Apr 5 22:57:51 2016 +0200

examples:smbclient:read: fix O3 error unused result of fgets

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Christian Ambach <a...@samba.org>

commit 398bb129f5095e22cf45fdcf84b1025268c64c53
Author: Michael Adam <ob...@samba.org>
Date:   Tue Apr 5 22:55:01 2016 +0200


[SCM] Samba Shared Repository - branch master updated

2016-03-15 Thread Michael Adam
The branch, master has been updated
   via  e85e405 smbd: enable multi-channel if 'server multi channel support 
= yes' in the config
   via  8a71e1a param: add parameter "server multi channel support", 
defaults to off.
  from  e64ab0d s3: vfs: vfs_xattr_tdb - cleanup. Remove unneeded variable 
"path".

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


- Log -
commit e85e4055b940ea3be4e5beb12a62ad448dbbc73d
Author: Michael Adam <ob...@samba.org>
Date:   Tue Jan 26 08:16:51 2016 +0100

smbd: enable multi-channel if 'server multi channel support = yes' in the 
config

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>
    
    Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Mar 15 20:58:19 CET 2016 on sn-devel-144

commit 8a71e1a5a803510f60c8610d06e7868739dc31b1
Author: Günther Deschner <g...@samba.org>
Date:   Wed Jan 20 17:44:45 2016 +0100

param: add parameter "server multi channel support", defaults to off.
    
Guenther

Pair-Programmed-With: Michael Adam <ob...@samba.org>

Signed-off-by: Guenther Deschner <g...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

---

Summary of changes:
 .../protocol/servermultichannelsupport.xml  | 21 +
 source3/smbd/smbXsrv_client.c   |  2 ++
 2 files changed, 23 insertions(+)
 create mode 100644 docs-xml/smbdotconf/protocol/servermultichannelsupport.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/protocol/servermultichannelsupport.xml 
b/docs-xml/smbdotconf/protocol/servermultichannelsupport.xml
new file mode 100644
index 000..14db171
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/servermultichannelsupport.xml
@@ -0,0 +1,21 @@
+http://www.samba.org/samba/DTD/samba-doc;>
+
+This boolean parameter controls whether
+smbd
+8 will support
+SMB3 multi-channel.
+
+This parameter has been added with version 4.4.
+
+Warning: Note that this feature is considered experimental in Samba 4.4.
+Use it at your own risk: Even though it may seem to work well in testing,
+it may result in data corruption under some race conditions.
+Future 4.4.x release may improve this situation.
+
+
+
+no
+
diff --git a/source3/smbd/smbXsrv_client.c b/source3/smbd/smbXsrv_client.c
index d8ba2f7..7286b6e 100644
--- a/source3/smbd/smbXsrv_client.c
+++ b/source3/smbd/smbXsrv_client.c
@@ -511,6 +511,8 @@ NTSTATUS smbXsrv_client_create(TALLOC_CTX *mem_ctx,
client->ev_ctx = ev_ctx;
client->msg_ctx = msg_ctx;
 
+   client->server_multi_channel_enabled = 
lp_server_multi_channel_support();
+
client->table = talloc_move(client, );
table = client->table;
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-03-14 Thread Michael Adam
The branch, master has been updated
   via  b7a050d smbd:smb2: remove an unnecessary !! cast.
  from  06aefe4 s3:libnet:libnet_join: update msDS-SupportedEncryptionTypes 
(if required) with machine creds.

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


- Log -
commit b7a050df7816647140e35574ea704ffd13dd87c1
Author: Michael Adam <ob...@samba.org>
Date:   Thu Mar 3 16:57:45 2016 +0100

smbd:smb2: remove an unnecessary !! cast.

Casting to bool is done implcitly upon assignment.
Thanks to Ralph for pointing this out!

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Ralph Boehme <s...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Mar 14 23:01:31 CET 2016 on sn-devel-144

---

Summary of changes:
 source3/smbd/smb2_create.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 17bddc1..9dbed68 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -836,7 +836,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX 
*mem_ctx,
hdr = SMBD_SMB2_IN_HDR_PTR(smb2req);
flags = IVAL(hdr, SMB2_HDR_FLAGS);
replay_operation =
-   !!(flags & SMB2_HDR_FLAG_REPLAY_OPERATION);
+   flags & SMB2_HDR_FLAG_REPLAY_OPERATION;
 
status = smb2srv_open_lookup_replay_cache(
smb2req->xconn, create_guid,


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-03-03 Thread Michael Adam
The branch, master has been updated
   via  b1b70c1 vfs: Fix the vfs_gpfs build
  from  116f415 heimdal asn1: avoid fclose(NULL) caused by missing braces

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


- Log -
commit b1b70c136c68bb7cac0c68a96fa064e0b29bbfa6
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Mar 3 17:19:18 2016 +0100

vfs: Fix the vfs_gpfs build

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Mar  4 02:09:15 CET 2016 on sn-devel-144

---

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


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index af7fd17..cc17d2a 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1403,7 +1403,7 @@ static int vfs_gpfs_chmod(vfs_handle_struct *handle,
struct smb_filename *smb_fname_cpath;
int rc;
 
-   smb_fname_cpath = cp_smb_fname(talloc_tos(), smb_fname);
+   smb_fname_cpath = cp_smb_filename(talloc_tos(), smb_fname);
if (smb_fname_cpath == NULL) {
errno = ENOMEM;
return -1;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-03-02 Thread Michael Adam
The branch, master has been updated
   via  f24567e torture:smb2: skip replay4 if server does not support 
multi-channel
   via  0426519 smbd: fix crash in smbXsrv_client_global_remove()
  from  a5f441d vfs:zfs fix build after get_nt_acl_fn signature change.

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


- Log -
commit f24567e9fd6ad5925691df2ebc23cfd8a127c5a8
Author: Michael Adam <ob...@samba.org>
Date:   Tue Mar 1 23:07:06 2016 +0100

torture:smb2: skip replay4 if server does not support multi-channel

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Mar  2 20:38:49 CET 2016 on sn-devel-144

commit 04265199b389a7b38c3047985da68e8442a0b746
Author: Michael Adam <ob...@samba.org>
Date:   Tue Mar 1 20:40:47 2016 +0100

smbd: fix crash in smbXsrv_client_global_remove()

Probably copy-n-paste error.
Uncovered by the multi-channel-related tests we're
currently writing to exercise this code more.

Pair-Programmed-With: Guenther Deschner <g...@samba.org>

Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: Guenther Deschner <g...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 source3/smbd/smbXsrv_client.c | 8 ++--
 source4/torture/smb2/replay.c | 8 
 2 files changed, 10 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smbXsrv_client.c b/source3/smbd/smbXsrv_client.c
index 2dd4cad..d8ba2f7 100644
--- a/source3/smbd/smbXsrv_client.c
+++ b/source3/smbd/smbXsrv_client.c
@@ -428,7 +428,6 @@ static NTSTATUS smbXsrv_client_global_store(struct 
smbXsrv_client_global0 *globa
 
 static NTSTATUS smbXsrv_client_global_remove(struct smbXsrv_client_global0 
*global)
 {
-   struct smbXsrv_client_globalB global_blob;
TDB_DATA key;
NTSTATUS status;
 
@@ -453,11 +452,8 @@ static NTSTATUS smbXsrv_client_global_remove(struct 
smbXsrv_client_global0 *glob
return status;
}
global->stored = false;
-   if (DEBUGLVL(DBGLVL_DEBUG)) {
-   DBG_DEBUG("key '%s' delete\n",
-   hex_encode_talloc(global->db_rec, key.dptr, key.dsize));
-   NDR_PRINT_DEBUG(smbXsrv_client_globalB, _blob);
-   }
+   DBG_DEBUG("key '%s' delete\n",
+ hex_encode_talloc(global->db_rec, key.dptr, key.dsize));
 
TALLOC_FREE(global->db_rec);
 
diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c
index 26c32d1..21f6f80 100644
--- a/source4/torture/smb2/replay.c
+++ b/source4/torture/smb2/replay.c
@@ -650,12 +650,20 @@ static bool test_replay4(struct torture_context *tctx, 
struct smb2_tree *tree1)
uint16_t curr_cs;
uint32_t share_capabilities;
bool share_is_so;
+   uint32_t server_capabilities;
 
if (smbXcli_conn_protocol(transport1->conn) < PROTOCOL_SMB3_00) {
torture_skip(tctx, "SMB 3.X Dialect family required for "
   "Replay tests\n");
}
 
+   server_capabilities = smb2cli_conn_server_capabilities(
+   tree1->session->transport->conn);
+   if (!(server_capabilities & SMB2_CAP_MULTI_CHANNEL)) {
+   torture_skip(tctx,
+"Server does not support multi-channel.");
+   }
+
share_capabilities = smb2cli_tcon_capabilities(tree1->smbXcli);
share_is_so = share_capabilities & SMB2_SHARE_CAP_SCALEOUT;
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-03-01 Thread Michael Adam
The branch, master has been updated
   via  6af7ebf passdb: Avoid a "ret == true"
   via  bebd35f netlogon_creds_cli: use dbwrap_purge instead of 
dbwrap_delete where appropriate
   via  8f158ba s3:registry: use dbwrap_purge_bystring instead of 
dbwrap_delete_bystring
   via  366b51a dbwrap: add dbwrap_purge[_bystring]
   via  d4408c4 dbwrap_util: improve a debug message in 
dbwrap_delete_action()
  from  1570ae0 lib: Fix 1354521 Unchecked return value

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


- Log -
commit 6af7ebf3364f274e3ae7d4cd818e51424100b6d4
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Mar 1 16:57:45 2016 +0100

passdb: Avoid a "ret == true"

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>
    
    Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Mar  2 01:04:14 CET 2016 on sn-devel-144

commit bebd35f439229b9363dfc2f4ae5744103ba80740
Author: Michael Adam <ob...@samba.org>
Date:   Thu Feb 25 16:15:04 2016 +0100

netlogon_creds_cli: use dbwrap_purge instead of dbwrap_delete where 
appropriate

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

commit 8f158bab9f8dbdbdb460258a08a15d0d6c41cbac
Author: Michael Adam <ob...@samba.org>
Date:   Thu Feb 25 00:58:50 2016 +0100

s3:registry: use dbwrap_purge_bystring instead of dbwrap_delete_bystring

where appropriate

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

commit 366b51a8ff30132185ff126e2cdd51801b07e6f4
Author: Michael Adam <ob...@samba.org>
Date:   Thu Feb 25 00:56:14 2016 +0100

dbwrap: add dbwrap_purge[_bystring]

Variants of dbrwap_delete[_bysrting] that treats NOT FOUND
as success.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

commit d4408c495be851c684e7b4b5ff56e5eb82f16c06
Author: Michael Adam <ob...@samba.org>
Date:   Thu Feb 25 16:02:36 2016 +0100

dbwrap_util: improve a debug message in dbwrap_delete_action()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

---

Summary of changes:
 lib/dbwrap/dbwrap.h   |  2 ++
 lib/dbwrap/dbwrap_util.c  | 20 +++-
 libcli/auth/netlogon_creds_cli.c  | 14 --
 source3/passdb/pdb_interface.c|  2 +-
 source3/registry/reg_backend_db.c |  7 +--
 5 files changed, 27 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap.h b/lib/dbwrap/dbwrap.h
index 5e13a59..2eded04 100644
--- a/lib/dbwrap/dbwrap.h
+++ b/lib/dbwrap/dbwrap.h
@@ -94,6 +94,8 @@ const char *dbwrap_name(struct db_context *db);
 
 /* The following definitions come from lib/dbwrap_util.c  */
 
+NTSTATUS dbwrap_purge(struct db_context *db, TDB_DATA key);
+NTSTATUS dbwrap_purge_bystring(struct db_context *db, const char *key);
 NTSTATUS dbwrap_delete_bystring(struct db_context *db, const char *key);
 NTSTATUS dbwrap_store_bystring(struct db_context *db, const char *key,
   TDB_DATA data, int flags);
diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c
index 901ef56..22f910d 100644
--- a/lib/dbwrap/dbwrap_util.c
+++ b/lib/dbwrap/dbwrap_util.c
@@ -412,7 +412,8 @@ static NTSTATUS dbwrap_delete_action(struct db_context * 
db, void *private_data)
 
status = dbwrap_record_delete(rec);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(5, ("delete_rec returned %s\n", nt_errstr(status)));
+   DBG_INFO("dbwrap_record_delete returned %s\n",
+nt_errstr(status));
}
 
talloc_free(rec);
@@ -527,6 +528,23 @@ NTSTATUS dbwrap_trans_traverse(struct db_context *db,
return dbwrap_trans_do(db, dbwrap_trans_traverse_action, );
 }
 
+NTSTATUS dbwrap_purge(struct db_context *db, TDB_DATA key)
+{
+   NTSTATUS status;
+
+   status = dbwrap_delete(db, key);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+   status = NT_STATUS_OK;
+   }
+
+   return status;
+}
+
+NTSTATUS dbwrap_purge_bystring(struct db_context *db, const char *key)
+{
+   return dbwrap_purge(db, string_term_tdb_data(key));
+}
+
 NTSTATUS dbwrap_delete_bystring(struct db_context *db, const char *key)
 {
return dbwrap_delete(db, string_term_tdb_data(key));
diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
index 7c867cf..38b1351 100644
--- a/libcli/auth/netlogon_creds_cli.c
+++ b/libcli/auth/netlogon_creds_cli.c
@@ -1031,11 +1031,8 @@ struct tevent_req 

[SCM] Samba Shared Repository - branch master updated

2016-02-25 Thread Michael Adam
The branch, master has been updated
   via  cd1335e VFS: Modify rmdir to take a const struct smb_filename * 
instead of const char *
   via  de2bc1b vfs:ceph: Fix mkdir_fn to take struct smb_filename * insted 
of char *
   via  72333a6 vfs:glusterfs: Fix mkdir_fn to take struct smb_filename * 
instead of  char *
  from  0c61dd1 lib/util: Expose strv_addn() for adding string with 
specified length

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


- Log -
commit cd1335e67dbfce0b6894ff209aa805d0314578da
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Feb 24 14:02:45 2016 -0800

VFS: Modify rmdir to take a const struct smb_filename * instead of const 
char *

Preparing to reduce use of lp_posix_pathnames().

Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.

Signed-off-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Feb 25 20:46:49 CET 2016 on sn-devel-144

commit de2bc1bc3890bcdd1b3b97ecc3d7e96f58ff50d3
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Feb 24 14:00:27 2016 -0800

vfs:ceph: Fix mkdir_fn to take struct smb_filename * insted of char *

Missed in previous VFS change.

Signed-off-by: Jeremy Allison <j...@samba.org>

commit 72333a685526f6ac5699f076c8dd0e0ecddd3a33
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Feb 24 13:58:16 2016 -0800

vfs:glusterfs: Fix mkdir_fn to take struct smb_filename * instead of  char *

Missed in previous VFS change.

Signed-off-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 examples/VFS/skel_opaque.c  |  3 ++-
 examples/VFS/skel_transparent.c |  5 +++--
 source3/include/vfs.h   |  8 +--
 source3/include/vfs_macros.h|  8 +++
 source3/modules/vfs_acl_common.c| 10 -
 source3/modules/vfs_acl_tdb.c   |  7 +++---
 source3/modules/vfs_audit.c |  7 +++---
 source3/modules/vfs_cap.c   | 19 +---
 source3/modules/vfs_catia.c | 21 ++
 source3/modules/vfs_ceph.c  | 12 +++
 source3/modules/vfs_default.c   |  5 +++--
 source3/modules/vfs_extd_audit.c|  9 
 source3/modules/vfs_fruit.c |  6 --
 source3/modules/vfs_full_audit.c|  7 +++---
 source3/modules/vfs_glusterfs.c | 10 +
 source3/modules/vfs_media_harmony.c | 25 ++---
 source3/modules/vfs_netatalk.c  |  6 --
 source3/modules/vfs_posix_eadb.c|  6 --
 source3/modules/vfs_shadow_copy2.c  | 24 -
 source3/modules/vfs_snapper.c   | 19 
 source3/modules/vfs_streams_depot.c | 43 +++--
 source3/modules/vfs_syncops.c   |  5 +++--
 source3/modules/vfs_time_audit.c|  8 ---
 source3/modules/vfs_unityed_media.c | 24 ++---
 source3/modules/vfs_xattr_tdb.c |  6 --
 source3/smbd/close.c|  9 
 source3/smbd/vfs.c  |  5 +++--
 source3/torture/cmd_vfs.c   | 20 ++---
 28 files changed, 222 insertions(+), 115 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 9a855bc..8961627 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -165,7 +165,8 @@ static int skel_mkdir(vfs_handle_struct *handle,
return -1;
 }
 
-static int skel_rmdir(vfs_handle_struct *handle, const char *path)
+static int skel_rmdir(vfs_handle_struct *handle,
+   const struct smb_filename *smb_fname)
 {
errno = ENOSYS;
return -1;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index ac8cbc8..ac82432 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -164,9 +164,10 @@ static int skel_mkdir(vfs_handle_struct *handle,
return SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode);
 }
 
-static int skel_rmdir(vfs_handle_struct *handle, const char *path)
+static int skel_rmdir(vfs_handle_struct *handle,
+   const struct smb_filename *smb_fname)
 {
-   return SMB_VFS_NEXT_RMDIR(handle, path);
+   return SMB_VFS_NEXT_RMDIR(handle, smb_fname);
 }
 
 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 48bacb0..b291206 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -175,6 +175,8 @@
const struct smb_filen

[SCM] Samba Shared Repository - branch master updated

2016-02-23 Thread Michael Adam
The branch, master has been updated
   via  b4239ca idmap_script: Parallelize script calls
   via  2f6a69d lib: Avoid an unnecessary cast
   via  3a1685d lib: Remove "includes.h" from util_file.c
   via  b4b8c8c lib: Add file_pload_send/recv
   via  3de5d8f lib: Add "mem_ctx" to file_lines_pload
   via  5276835 lib: Remove an unimplemented prototype
   via  908df8e lib: Extract sys_popen()
   via  8338fe6 lib: Remove sys_waitpid
   via  b7b7b0a lib: Fix whitespace
   via  7377803 lib: Move data_blob_list_item to source4
   via  746f54c smbd: Fix line length & whitespace in write_file
   via  8fc86f4 py_xattr: Fix a "ignoring return value" warning
  from  7b4dfd9 winbindd: return trust parameters when listing trusts

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


- Log -
commit b4239ca096738f553b0f9d7fa6aaa4219b72ef7f
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Feb 17 14:01:47 2016 +0100

idmap_script: Parallelize script calls

Fixes a case I've seen where a user with 200 group memberships timed out and
can now log in.

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Feb 24 01:17:25 CET 2016 on sn-devel-144

commit 2f6a69d807ed1a9ff2413a49f4ef751d9c4851cf
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Feb 22 11:59:52 2016 +0100

lib: Avoid an unnecessary cast

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3a1685db0b42cadcd8616949c73e7e5a06e6057b
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 17:09:43 2016 +0100

lib: Remove "includes.h" from util_file.c

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b4b8c8ca0133132add7c5adfd1099666566b2882
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 17:01:04 2016 +0100

lib: Add file_pload_send/recv

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3de5d8fdfd02fc796e7e06686fb07bbfc47e6851
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 16:29:01 2016 +0100

    lib: Add "mem_ctx" to file_lines_pload

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 52768351bea0e8d3b85bd08ade4ffe34c449a481
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 16:24:29 2016 +0100

lib: Remove an unimplemented prototype

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 908df8ec136626616e9419986f09ff1bf30dbde1
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 15:58:52 2016 +0100

lib: Extract sys_popen()

This was added by Jeremy with 3cf31a194f5, do the (C) accordingly

sys_popen is a pretty isolated functionality, and I'd like to use it
soon without "includes.h", needed by "proto.h"

Except for one malloc->talloc this is supposed to be a 1:1 copy

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 8338fe6ac878ef8c04276229ae6e6a8edf9c3e3a
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 15:46:06 2016 +0100

lib: Remove sys_waitpid

We have waitpid in libreplace

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b7b7b0a819f52fa645bfd5a417a0a1a2684c7a1f
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 14:59:53 2016 +0100

lib: Fix whitespace

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 737780384c0fbf8722239dceed7c8fcfa45552cb
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Feb 20 10:07:11 2016 +0100

lib: Move data_blob_list_item to source4

It's only used in dcesrv_call_state.

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 746f54c1cf6514b547c2df2e56c69671916053b6
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Jan 14 11:51:39 2016 +0100

smbd: Fix line length & whitespace in write_file

No code change intended. This file just looked to hard to read.

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 8fc86f41e4072d5717f0d7a000cdb7461c8effd9
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Jan 13 11

[SCM] Samba Shared Repository - branch master updated

2016-02-16 Thread Michael Adam
The branch, master has been updated
   via  3330c79 tdb: eliminate deprecation warnings in python tests
   via  7b3fb85 ctdb: Fix CID 1353175 Logically dead code
   via  e23ab7d ctdb: Fix CID 1353176 Logically dead code
  from  d3be72a idmap_ad: Fix a copy error

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


- Log -
commit 3330c79324fe8316a2d122d3f2bf47c4e2c75c0c
Author: Michael Adam <ob...@samba.org>
Date:   Mon Feb 15 11:33:10 2016 +0100

tdb: eliminate deprecation warnings in python tests

assertEquals() is superseded by assertEqual()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Feb 16 19:58:39 CET 2016 on sn-devel-144

commit 7b3fb853a42ae02aae7420b09d21aad727284bbe
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 11:20:56 2016 +0100

ctdb: Fix CID 1353175 Logically dead code

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit e23ab7d40801c3121c7df98f6ea4cdc9a5e0bd89
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Feb 16 11:18:40 2016 +0100

ctdb: Fix CID 1353176 Logically dead code

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 ctdb/server/ctdb_takeover.c|  5 ++--
 ctdb/server/ipalloc_common.c   |  7 +++---
 lib/tdb/python/tests/simple.py | 52 +-
 3 files changed, 32 insertions(+), 32 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index cdb4601..62af1e6 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1340,17 +1340,18 @@ create_merged_ip_list(struct ctdb_context *ctdb, struct 
ipalloc_state *ipalloc_s
ctdb->ip_tree = trbt_create(ctdb, 0);
 
for (i=0; i < ctdb->num_nodes; i++) {
-   public_ips = _state->known_public_ips[i];
 
if (ctdb->nodes[i]->flags & NODE_FLAGS_DELETED) {
continue;
}
 
/* there were no public ips for this node */
-   if (public_ips == NULL) {
+   if (ipalloc_state->known_public_ips == NULL) {
continue;
}
 
+   public_ips = _state->known_public_ips[i];
+
for (j=0; j < public_ips->num; j++) {
struct public_ip_list *tmp_ip;
 
diff --git a/ctdb/server/ipalloc_common.c b/ctdb/server/ipalloc_common.c
index c84359b..95d5ecf 100644
--- a/ctdb/server/ipalloc_common.c
+++ b/ctdb/server/ipalloc_common.c
@@ -65,13 +65,12 @@ static bool can_node_host_ip(struct ipalloc_state 
*ipalloc_state,
if (ipalloc_state->noiphost[pnn]) {
return false;
}
-
-   public_ips = _state->available_public_ips[pnn];
-
-   if (public_ips == NULL) {
+   if (ipalloc_state->available_public_ips == NULL) {
return false;
}
 
+   public_ips = _state->available_public_ips[pnn];
+
for (i=0; inum; i++) {
if (ctdb_same_ip(>addr, _ips->ip[i].addr)) {
/* yes, this node can serve this public ip */
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py
index b3136dd..1518078 100644
--- a/lib/tdb/python/tests/simple.py
+++ b/lib/tdb/python/tests/simple.py
@@ -43,7 +43,7 @@ class InternalTdbTests(TestCase):
 self.tdb = tdb.Tdb()
 
 # repr used to crash on internal db
-self.assertEquals(repr(self.tdb), "Tdb()")
+self.assertEqual(repr(self.tdb), "Tdb()")
 
 
 class CommonTdbTests(TestCase):
@@ -111,12 +111,12 @@ class SimpleTdbTests(TestCase):
 
 def test_store(self):
 self.tdb.store(b"bar", b"bla")
-self.assertEquals(b"bla", self.tdb.get(b"bar"))
+self.assertEqual(b"bla", self.tdb.get(b"bar"))
 
 def test_getitem(self):
 self.tdb[b"bar"] = b"foo"
 self.tdb.reopen()
-self.assertEquals(b"foo", self.tdb[b"bar"])
+self.assertEqual(b"foo", self.tdb[b"bar"])
 
 def test_delete(self):
 self.tdb[b"bar"] = b"foo"
@@ -139,21 +139,21 @@ class SimpleTdbTests(TestCase):
 self.tdb[b"brainslug"] = b"2"
 l = list(self.tdb)
 

[SCM] Samba Shared Repository - branch master updated

2016-02-15 Thread Michael Adam
The branch, master has been updated
   via  2267fad tevent: version 0.9.27
  from  279d249 README.Coding: Improve pointer example

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


- Log -
commit 2267faddfa9863b205dfad580fbd45182916cb32
Author: Stefan Metzmacher <me...@samba.org>
Date:   Mon Feb 15 11:40:34 2016 +0100

tevent: version 0.9.27

* Fix bug in poll backend - poll_event_loop_poll()
  exits the for loop on POLLNVAL instead of
  continuing to find an event that is ready.
* Fix ETIME handling for Solaris event ports (bug #11728).

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Feb 16 00:00:51 CET 2016 on sn-devel-144

---

Summary of changes:
 lib/tevent/ABI/{tevent-0.9.26.sigs => tevent-0.9.27.sigs} | 0
 lib/tevent/wscript| 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 copy lib/tevent/ABI/{tevent-0.9.26.sigs => tevent-0.9.27.sigs} (100%)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/ABI/tevent-0.9.26.sigs 
b/lib/tevent/ABI/tevent-0.9.27.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.26.sigs
copy to lib/tevent/ABI/tevent-0.9.27.sigs
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 103cc06..501de16 100755
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tevent'
-VERSION = '0.9.26'
+VERSION = '0.9.27'
 
 blddir = 'bin'
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-02-13 Thread Michael Adam
The branch, master has been updated
   via  9fb98e3 lib/socket: Fix improper use of default interface speed
   via  8b36428 lib:socket: fix CID 1350009 - illegal memory accesses  
(BUFFER_SIZE_WARNING)
  from  92afa1b smbd: Simplify chroot option in smbd

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


- Log -
commit 9fb98e3e056f059e2a5fcdd54a6a0d60ecdb01b7
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Feb 11 14:55:55 2016 +0530

lib/socket: Fix improper use of default interface speed

_get_interfaces() function from interfaces.c uses if_speed
variable to store interface speed and is initialized with a
default value at start. But if_speed populated via one
iteration for a specific IP address will be treated as the
default value for next iteration which is wrong. Therefore
change is to move the initialization cum declaration of
if_speed inside iteration of IP addresses loop.

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

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Sat Feb 13 16:22:22 CET 2016 on sn-devel-144

commit 8b36428b195f6e1d1063f1abccb718f2665d271f
Author: Michael Adam <ob...@samba.org>
Date:   Wed Feb 3 11:41:23 2016 +0100

lib:socket: fix CID 1350009 - illegal memory accesses  (BUFFER_SIZE_WARNING)

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

Pair-Programmed-With: Guenther Deschner <g...@samba.org>

Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: Guenther Deschner <g...@samba.org>
Reviewed-by: Uri Simchoni <u...@samba.org>

---

Summary of changes:
 lib/socket/interfaces.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket/interfaces.c b/lib/socket/interfaces.c
index cf094f0..2cabf46 100644
--- a/lib/socket/interfaces.c
+++ b/lib/socket/interfaces.c
@@ -140,6 +140,11 @@ static void query_iface_speed_from_name(const char *name, 
uint64_t *speed)
return;
}
 
+   if (strlen(name) >= IF_NAMESIZE) {
+   DBG_ERR("Interface name too long.");
+   goto done;
+   }
+
strncpy(ifr.ifr_name, name, IF_NAMESIZE);
 
ifr.ifr_data = (void *)
@@ -184,7 +189,6 @@ static int _get_interfaces(TALLOC_CTX *mem_ctx, struct 
iface_struct **pifaces)
int count;
int total = 0;
size_t copy_size;
-   uint64_t if_speed = 1000 * 1000 * 1000; /* 1GBit */
 
if (getifaddrs() < 0) {
return -1;
@@ -209,6 +213,7 @@ static int _get_interfaces(TALLOC_CTX *mem_ctx, struct 
iface_struct **pifaces)
 
/* Loop through interfaces, looking for given IP address */
for (ifptr = iflist; ifptr != NULL; ifptr = ifptr->ifa_next) {
+   uint64_t if_speed = 1000 * 1000 * 1000; /* 1Gbps */
 
if (!ifptr->ifa_addr || !ifptr->ifa_netmask) {
continue;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-02-03 Thread Michael Adam
The branch, master has been updated
   via  2d80498 smbd: Fix CID 1351215 Improper use of negative value
   via  f193361 smbd: Fix CID 1351216 Dereference null return value
  from  915185a python:tests/core: add tests for arcfour_encrypt() and 
string_to_byte_array()

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


- Log -
commit 2d80498e64bc7f9e1fd2d080825c1e8904018a19
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Feb 3 09:18:14 2016 +0100

smbd: Fix CID 1351215 Improper use of negative value

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Feb  3 15:03:09 CET 2016 on sn-devel-144

commit f1933618500f8c4787f3bf7aa260e21cd6bf7cd8
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Feb 3 09:10:46 2016 +0100

smbd: Fix CID 1351216 Dereference null return value

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 source3/smbd/smbXsrv_client.c | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smbXsrv_client.c b/source3/smbd/smbXsrv_client.c
index 87cc307..0e21fc6 100644
--- a/source3/smbd/smbXsrv_client.c
+++ b/source3/smbd/smbXsrv_client.c
@@ -63,6 +63,9 @@ NTSTATUS smbXsrv_client_global_init(void)
 * This contains secret information like client keys!
 */
global_path = lock_path("smbXsrv_client_global.tdb");
+   if (global_path == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
 
db_ctx = db_open(NULL, global_path,
 0, /* hash_size */
@@ -287,14 +290,20 @@ NTSTATUS smb2srv_client_connection_pass(struct 
smbd_smb2_request *smb2req,
NTSTATUS status;
struct smbXsrv_connection_pass0 pass_info0;
struct smbXsrv_connection_passB pass_blob;
+   ssize_t reqlen;
struct iovec iov;
 
pass_info0.initial_connect_time = global->initial_connect_time;
pass_info0.client_guid = global->client_guid;
-   pass_info0.negotiate_request.length = iov_buflen(smb2req->in.vector,
-
smb2req->in.vector_count);
+
+   reqlen = iov_buflen(smb2req->in.vector, smb2req->in.vector_count);
+   if (reqlen == -1) {
+   return NT_STATUS_INVALID_BUFFER_SIZE;
+   }
+
+   pass_info0.negotiate_request.length = reqlen;
pass_info0.negotiate_request.data = talloc_array(talloc_tos(), uint8_t,
-   pass_info0.negotiate_request.length);
+reqlen);
if (pass_info0.negotiate_request.data == NULL) {
return NT_STATUS_NO_MEMORY;
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-01-26 Thread Michael Adam
The branch, master has been updated
   via  6a24ccc s3:smbd: only process fsctl_network_iface_info if multi 
channel is enabled
   via  e8a051f s3:smbd: implement fsctl_network_iface_info
   via  99d3dbe docs:smb.conf: document new extra syntax for interfaces.
   via  9fcf874 s4:lib:socket: skip extra data in interpret_interface()
   via  8284b34 s3:lib: extend interpret_interface() to optionally read 
speed, caps, and index from config
   via  3785be8 s3:lib: remove an unmotivated comment from 
interpret_interface()
   via  e569ffd s3:lib: copy speed, cap, and index in add_interface()
   via  9f9d6ac smb.h: add linkspeed, capability, and if_index to interface 
struct
   via  549a9ab lib:socket: detect link speed with ethtool ioctl in 
get_interfaces (on linux)
   via  1862aa6 build: detect support for ethtool
   via  64be8e7 lib:socket: set defaults for linkspeed and capability in 
get_interfaces()
   via  235f37b lib:socket: get interface index from kernel
   via  d392e0a lib:socket: add linkspeed, capability and if_index to 
iface_struct
   via  bc9e1fc librpc:idl: define FSCTL_NET_IFACE_NONE_CAPABLE in ioctl.idl
  from  a2894cf s3:lib: add braces around if-block in my_sam_name()

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


- Log -
commit 6a24cccd804eb8b89023fa0265d548fd722d909f
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jan 25 12:01:44 2016 +0100

s3:smbd: only process fsctl_network_iface_info if multi channel is enabled

This effectively disables it for now.
Ultimately, we may want to remove this restriction.
Hence a separate patch.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Jan 26 10:40:44 CET 2016 on sn-devel-144

commit e8a051f58a8f785ba8df66d263a1c632603f3650
Author: Stefan Metzmacher <me...@samba.org>
Date:   Fri Jun 13 17:42:00 2014 +0200

s3:smbd: implement fsctl_network_iface_info

The ioctl used for detecting interfaces for multi-channel.
    
    Pair-Programmed-With: Michael Adam <ob...@samba.org>

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>

commit 99d3dbee9952d2947e64a68380686b12c6a1e7f5
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jan 25 16:35:12 2016 +0100

docs:smb.conf: document new extra syntax for interfaces.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit 9fcf87419f3f68429bb365ffb605be3eacc97e15
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jan 25 16:22:57 2016 +0100

s4:lib:socket: skip extra data in interpret_interface()

This is currently smbd-specific.
No need to duplicate the extended parsing
while these functions have not been merged yet.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit 8284b34f95639ad7c2e3a97b514529201c20e2ed
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jan 25 03:38:54 2016 +0100

s3:lib: extend interpret_interface() to optionally read speed, caps, and 
index from config

New syntax for interfaces parameter:

  interfaces = address[;key=value[,key=value[,...]]]

- keys can be 'speed', 'capability', and 'if_index'.

- speed is in bits per second.

- capability can be RSS and RDMA.

- if_index should be used with care, because
  these indexes should not conicide with indexes
  the kernel sets...

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit 3785be8d4e66f1bf01ec1b64a8e2325e4de08196
Author: Michael Adam <ob...@samba.org>
Date:   Sun Jan 24 13:26:35 2016 +0100

s3:lib: remove an unmotivated comment from interpret_interface()

This seems to be a left-over from historic code.

Signed-off-by: Michael Adam <ob...@samba.org>
    Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit e569ffd83138952454ba9b9fb38ee7d852293697
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jan 25 14:09:37 2016 +0100

s3:lib: copy speed, cap, and index in add_interface()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit 9f9d6ac8c1594f0c090a176d189c99fba3c31966
Author: Michael Adam <ob...@samba.org>
Date:   Mon Jan 25 03:38:16 2016 +0100

smb.h: add linkspeed, capability, and if_index to interface struct

Pair-Programmed-With: Anoop C S <anoo...@redhat.com>

Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: 

[SCM] Samba Shared Repository - branch master updated

2016-01-26 Thread Michael Adam
The branch, master has been updated
   via  07bb954 VERSION: Bump version up to 4.5.0pre1
   via  6c547b3 VERSION: Set version to 4.4.0rc1...
   via  d201a20 WHATSNEW: Add smbstatus changes.
   via  c1bbe58 WHATSNEW: Extend release notes for Samba 4.4.0rc1.
   via  192f151 waf: Only build smb_krb5_wrapper if we have CUPS
   via  91eeeb7 disk_quotas: style fix
   via  6689499 vfs_gpfs: make sure get_quota does not return bogus values
   via  de3c2ed make disk_norm() static
   via  a8eea0c vfs_gpfs: do not call disk_norm() on disk_free_fn
   via  9e60cbf vfs_ceph: do not call disk_norm() on disk_free_fn
   via  279c9ce vfs_fake_dfq: remove quota code from disk_free
   via  19f9b31 smbd: refactor disk_free handling
   via  72231ec vfs_snapper: add get_quota function
   via  cc25335 vfs_shadow_copy2: add get_quota function
   via  22d757c vfs_cap: add get_quota function
   via  c464b9e vfs: add path parameter to get_quota
   via  f71761c selftest: add disk-free and quota tests based on fake_dfq 
VFS module
   via  540dcfa vfs_fake_dfq: add vfs module
   via  345f084 smbd: enable unit-testing of NT_TRANSACT_GET_USER_QUOTA
   via  17c9b8d quotas: correct comment about SMB_GROUP_QUOTA_TYPE
   via  798fcfd loadparm: introduce lp_parm_ulonglong() and 
lpcfg_parm_ulonglong()
   via  7a890a7 smbd:smb2_negprot: implement connection passing based on 
client_guid
   via  cfbf450 smbd:smb2_server: let smbd_server_connection_terminate() 
only call exit_server() for the last connection
   via  a446966 smbd:process: use smbXsrv_client_create.
   via  0010dc8 smbd:process: treat initialized table in 
smbXsrv_connection_init_tables
   via  d77238f smbd: add smbXsrv_client.c
   via  8ab4629 smbd:globals.h: add guid_verified to 
smbXsrv_connection.smb2.client
   via  3590f3f idl:smbXsrv: add smbXsrv_connection_pass structures.
   via  bae1b94 idl:smbXsrv: add smbXsrv_client_global structures
   via  5e91bf0 idl:messagaing: add MSG_SMBXSRV_CONNECTION_PASS
  from  6a24ccc s3:smbd: only process fsctl_network_iface_info if multi 
channel is enabled

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


- Log -
commit 07bb954d929cf2aa61afe469c14ecba449cd5d43
Author: Karolin Seeger <ksee...@samba.org>
Date:   Tue Jan 26 11:17:37 2016 +0100

VERSION: Bump version up to 4.5.0pre1

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Jan 26 19:12:42 CET 2016 on sn-devel-144

commit 6c547b337cdcfa2fc6bd631ef776e48c4077e644
Author: Karolin Seeger <ksee...@samba.org>
Date:   Tue Jan 26 11:08:12 2016 +0100

VERSION: Set version to 4.4.0rc1...

and disable git snapshots for 4.4.0rc1 release.

Signed-off-by: Karolin Seeger <ksee...@samba.org>

commit d201a2080d73bfb73874c526134d38cebbcb572c
Author: Karolin Seeger <ksee...@samba.org>
Date:   Tue Jan 26 10:57:00 2016 +0100

WHATSNEW: Add smbstatus changes.

Signed-off-by: Karolin Seeger <ksee...@samba.org>

commit c1bbe58cd6ea9078bc7c3608d45af640eab2292e
Author: Karolin Seeger <ksee...@samba.org>
Date:   Tue Jan 26 10:52:15 2016 +0100

WHATSNEW: Extend release notes for Samba 4.4.0rc1.

Signed-off-by: Karolin Seeger <ksee...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit 192f1516c378ae942d14921bfcc1e11173da36e6
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Jan 26 11:28:50 2016 +0100

waf: Only build smb_krb5_wrapper if we have CUPS

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit 91eeeb76f0700041bcc7e862dfad5cc949f2c915
Author: Uri Simchoni <u...@samba.org>
Date:   Thu Jan 21 21:09:12 2016 +0200

disk_quotas: style fix

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

commit 6689499488b15ce996c91bc72048e92e765c5eee
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Jan 10 20:28:57 2016 +0200

vfs_gpfs: make sure get_quota does not return bogus values

add implementation of get_quota_fn to vfs_gpfs. The implemetation
returns ENOSYS for the case of user and group quota, to make sure
the default VFS does not accidentally succeed (and return wrong
values which would alter the disk-free calculation)

For other quota types the function calls the underlying VFS as
before.

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

commit de3c2ed0b1a6c786396435d8ea64359c9e17b1ba
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Jan 10 19:54:06 2016 +0200

make disk_norm() static

Now that disk_norm() i

[SCM] Samba Shared Repository - branch master updated

2016-01-25 Thread Michael Adam
The branch, master has been updated
   via  a2894cf s3:lib: add braces around if-block in my_sam_name()
   via  d67d8e1 s3:lib: remove supefluous comments from map_my_name()
   via  6eaf40f s3:lib: fix white spaces in my_sam_name()
   via  dee38e0 vfs_shadow_copy2: documentation for snapsharepath
   via  bbb5a8a vfs_shadow_copy2: add tests for snapsharepath
   via  8433388 vfs_shadow_copy2: add snapsharepath parameter
   via  57dab20 vfs_shadow_copy2: remove basedir state variable
  from  500bc01 s3-parm: clean up defaults when removing global parameters

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


- Log -
commit a2894cf4e0c733b14e645ae492b8cd1c13878900
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jan 21 12:46:40 2016 +0100

s3:lib: add braces around if-block in my_sam_name()

Clean-up after moving the function.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Jan 26 03:19:18 CET 2016 on sn-devel-144

commit d67d8e194b221315cde56f4728935071eecb378b
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jan 21 12:45:42 2016 +0100

s3:lib: remove supefluous comments from map_my_name()

cleanup after moving
    
    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 6eaf40f5a4ac2e7fe3b40176932acf7abd51279a
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jan 21 12:44:19 2016 +0100

s3:lib: fix white spaces in my_sam_name()

Clean-up after function has been moved.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit dee38e04d217a868721b622b5c9c22d3ba381790
Author: Uri Simchoni <u...@samba.org>
Date:   Tue Nov 3 13:21:58 2015 +0200

vfs_shadow_copy2: documentation for snapsharepath

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit bbb5a8a9d545b4e3014bdcb96dd7c7d48cf0b8f7
Author: Uri Simchoni <u...@samba.org>
Date:   Tue Nov 3 11:15:52 2015 +0200

vfs_shadow_copy2: add tests for snapsharepath

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 84333884ff34a75ceec8f966c1f7e6ad5566a4d2
Author: Uri Simchoni <u...@samba.org>
Date:   Tue Nov 3 10:57:13 2015 +0200

vfs_shadow_copy2: add snapsharepath parameter

This new parameter defines how to get from the snapshot's
root directory to the share's root directory. It is an
alternative to the "basedir" parameter, but functionally
    is a superset of basedir.

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 57dab2028d1e2616b65da0c315388233cfd36c1f
Author: Uri Simchoni <u...@samba.org>
Date:   Tue Nov 3 09:15:12 2015 +0200

vfs_shadow_copy2: remove basedir state variable

Remove the basedir state variable from the module-specific data
of vfs_shadow_copy2 - this variable is not being used.

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 docs-xml/manpages/vfs_shadow_copy2.8.xml | 40 
 selftest/target/Samba3.pm|  8 
 source3/lib/util_names.c | 12 ++
 source3/modules/vfs_shadow_copy2.c   | 64 ++--
 source3/script/tests/test_shadow_copy.sh |  1 +
 5 files changed, 98 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_shadow_copy2.8.xml 
b/docs-xml/manpages/vfs_shadow_copy2.8.xml
index 0bb95af..fbc0651 100644
--- a/docs-xml/manpages/vfs_shadow_copy2.8.xml
+++ b/docs-xml/manpages/vfs_shadow_copy2.8.xml
@@ -226,6 +226,46 @@
 
 

+   shadow:snapsharepath = SNAPSHAREPATH
+   
+   
+   
+   With this parameter, one can specify the path of the share's
+   root directory in snapshots, relative to the snapshot's
+   root directory. It is an alternative method to
+   shadow:basedir, allowing greater control.
+   
+   
+   For example, if within each
+   snapshot the files of the share have a
+   path/to/share/ prefix, then
+   shadow:snapsharepath can be
+   set to path/to/share.
+   
+   
+   With this parameter, it is no longer assumed that a
+   snapshot represents an i

[SCM] Samba Shared Repository - branch master updated

2016-01-22 Thread Michael Adam
The branch, master has been updated
   via  a1a8746 s3:smb2_sesssetup: implement SMB3 session bind (disabled)
   via  edd781d s3:smb2_sesssetup: treat BINDING in 
smbd_smb2_session_setup_auth_return
   via  91770e3 s3:smb2_negprot: announce multi channel support (disabled)
   via  d60ffcf smbXsrv: introduce bool 
smbXsrv_client->server_multi_channel_enabled
  from  3e08469 build: fix ldbsearch panic on FC22

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


- Log -
commit a1a8746174dff0b80ef4620894001a610b78f208
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jan 21 18:59:34 2016 +0100

s3:smb2_sesssetup: implement SMB3 session bind (disabled)

This is disabled for now. It will be possible to enabled it
via a config switch once the underpinnings are complete.

Pair-Programmed-With: Stefan Metzmacher <me...@samba.org>
Pair-Programmed-With: Guenther Deschner <g...@samba.org>
    
Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: Stefan Metzmacher <me...@samba.org>

    Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Sat Jan 23 03:22:18 CET 2016 on sn-devel-144

commit edd781d5a886aab4a5002280321006cfbc2c7bc9
Author: Stefan Metzmacher <me...@samba.org>
Date:   Wed Jul 29 17:05:52 2015 +0200

s3:smb2_sesssetup: treat BINDING in smbd_smb2_session_setup_auth_return

This adds smbd_smb2_bind_auth_return(), a
variant of auth_return for session binding.

Pair-Programmed-With: Michael Adam <ob...@samba.org>

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>

commit 91770e3fa76d23b522929c09aa5b587a8d9ffd4f
Author: Michael Adam <ob...@samba.org>
Date:   Thu Jan 21 00:16:33 2016 +0100

s3:smb2_negprot: announce multi channel support (disabled)

This disabled for now. Will be enabled by config setting
once underpinnings are ready.

Pair-Programmed-With: Guenther Deschner <g...@samba.org>

Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: Guenther Deschner <g...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

commit d60ffcfe440c17f30be9e97d7049650d988c9395
Author: Michael Adam <ob...@samba.org>
Date:   Fri Jan 22 12:51:15 2016 +0100

smbXsrv: introduce bool smbXsrv_client->server_multi_channel_enabled

defaulting to false.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Stefan Metzmacher <me...@samba.org>

---

Summary of changes:
 source3/librpc/idl/smbXsrv.idl |   1 +
 source3/smbd/smb2_negprot.c|   8 ++
 source3/smbd/smb2_sesssetup.c  | 205 -
 3 files changed, 211 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/idl/smbXsrv.idl b/source3/librpc/idl/smbXsrv.idl
index 8528770..5fc3603 100644
--- a/source3/librpc/idl/smbXsrv.idl
+++ b/source3/librpc/idl/smbXsrv.idl
@@ -112,6 +112,7 @@ interface smbXsrv
 * one in future.
 */
[ignore] struct smbXsrv_connection  *connections;
+   boolean8server_multi_channel_enabled;
} smbXsrv_client;
 
/* sessions */
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index c04fbca..1582072 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -485,6 +485,14 @@ NTSTATUS smbd_smb2_request_process_negprot(struct 
smbd_smb2_request *req)
xconn->smb2.server.cipher = SMB2_ENCRYPTION_AES128_CCM;
}
 
+   if (protocol >= PROTOCOL_SMB2_22 &&
+   xconn->client->server_multi_channel_enabled)
+   {
+   if (in_capabilities & SMB2_CAP_MULTI_CHANNEL) {
+   capabilities |= SMB2_CAP_MULTI_CHANNEL;
+   }
+   }
+
security_offset = SMB2_HDR_BODY + 0x40;
 
 #if 1
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index a6c66e2..a95f8a1 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -554,6 +554,116 @@ static NTSTATUS smbd_smb2_reauth_generic_return(struct 
smbXsrv_session *session,
return NT_STATUS_OK;
 }
 
+static NTSTATUS smbd_smb2_bind_auth_return(struct smbXsrv_session *session,
+  struct smbXsrv_session_auth0 **_auth,
+  struct smbd_smb2_request *smb2req,
+  struct auth_session_info 
*session_info,
+  uint16_t *out_session_flags,
+  uint64_t *out_session_id)
+{

[SCM] Samba Shared Repository - branch master updated

2016-01-21 Thread Michael Adam
The branch, master has been updated
   via  6ed3985 vfs_shadow_copy2: check crossmountpoints against 
snapdirseverywhere
  from  6cff009 smbcacls: fix uninitialized variable

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


- Log -
commit 6ed39851827f86a6a062942bf6fd82d045f0a1d4
Author: Uri Simchoni <u...@samba.org>
Date:   Tue Nov 3 10:42:00 2015 +0200

vfs_shadow_copy2: check crossmountpoints against snapdirseverywhere

If crossmountpoints is enabled, verify that snapdirseverywhere is
enabled too, since crossmountpoints has no meaning otherwise.

This obviates the check of crossmountpoints against other config
variables.

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Jan 22 01:54:06 CET 2016 on sn-devel-144

---

Summary of changes:
 source3/modules/vfs_shadow_copy2.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index 018ec88..cffca09 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1928,6 +1928,11 @@ static int shadow_copy2_connect(struct vfs_handle_struct 
*handle,
"shadow", "crossmountpoints",
false);
 
+   if (config->crossmountpoints && !config->snapdirseverywhere) {
+   DBG_WARNING("Warning: 'crossmountpoints' depends on "
+   "'snapdirseverywhere'. Disabling 
crossmountpoints.\n");
+   }
+
config->fixinodes = lp_parm_bool(SNUM(handle->conn),
 "shadow", "fixinodes",
 false);
@@ -2018,12 +2023,6 @@ static int shadow_copy2_connect(struct vfs_handle_struct 
*handle,
TALLOC_FREE(config->basedir);
}
 
-   if (config->crossmountpoints && config->basedir != NULL) {
-   DEBUG(1, (__location__ " Warning: 'basedir' is incompatible "
- "with 'crossmountpoints'. Disabling basedir.\n"));
-   TALLOC_FREE(config->basedir);
-   }
-
if (config->basedir == NULL) {
config->basedir = config->mount_point;
}


-- 
Samba Shared Repository



[SCM] pam wrapper repository - branch master updated

2016-01-18 Thread Michael Adam
The branch, master has been updated
   via  31d374c Bump version to 1.0.1
   via  3b1d585 pwrap: Fix a possible timing issue in p_copy()
   via  c91b203 pwrap: Improve p_rmdirs() do avoid timing issues
   via  d3cfb7a pwrap: Remove superfloues lstat()
   via  490ae6a pwrap: Make sure we have a terminating null byte
   via  e2628f0 pam_matrix: Set a secure umask before calling mkstemp()
   via  0b43f0c pwrap: Return EPROTONOSUPPORT in audit_open()
   via  92c01c8 cmake: Link python module against the python library
   via  55ff828 cmake: Do not require a C++ compiler
  from  746496c Initial release of pam_wrapper 1.0.0

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


- Log -
commit 31d374cda4e3ce1f57d290d46ef3a97d6ed0b076
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Jan 18 09:18:56 2016 +0100

Bump version to 1.0.1

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3b1d585468c7fbd6402f75e27096a19f3620b940
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Jan 15 15:20:24 2016 +0100

pwrap: Fix a possible timing issue in p_copy()

Do not rely on stat before open - it is racy.
Open directly and treat failure appropriately.

CID: 47518

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c91b2033bebe69ff5bab67c8db960ac5ec021268
Author: Jakub Hrozek <jakub.hro...@posteo.se>
Date:   Fri Jan 15 12:55:51 2016 +0100

pwrap: Improve p_rmdirs() do avoid timing issues

When calling stat and rmdir, we could run into timing issues that the
stat information is incorrect till we are actually running the rmdir()
command. So we open the directory and have the handle open to avoid
that we work on outdated information. It is unlikely but Coverity
complains and we thought better fix it.

CID: 47519

Signed-off-by: Jakub Hrozek <jakub.hro...@posteo.se>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit d3cfb7af2a8f5ce844c46ce8c5fade8df1e2e429
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Jan 15 11:11:50 2016 +0100

pwrap: Remove superfloues lstat()

There is no need to check if the file exists, just try to open it.

CID: 47520

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 490ae6a25ddf21963095d6d3c66a086fbc6147f9
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Jan 15 11:44:14 2016 +0100

pwrap: Make sure we have a terminating null byte

This is just to silence Coverity.

CID: 47508

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit e2628f07ce78abfbe5e29b4d3b6db707c2677063
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Jan 15 11:38:00 2016 +0100

pam_matrix: Set a secure umask before calling mkstemp()
    
    CID: 47516

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 0b43f0cd311d352806f5cd4f867a4a8efb29546e
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Jan 14 17:04:33 2016 +0100

pwrap: Return EPROTONOSUPPORT in audit_open()

I don't know why but returning EINVAL doesn't work. It treats it as
    success and tries to write to it.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 92c01c80103034d4a3cdd92aa4d00c34d687300d
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Jan 14 17:04:07 2016 +0100

    cmake: Link python module against the python library

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 55ff828e58ff9a29badb19f6d5b68e7fe7a990f8
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Jan 14 13:46:01 2016 +0100

cmake: Do not require a C++ compiler

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 CMakeLists.txt |   4 +-
 ChangeLog  |   5 ++
 src/modules/CMakeLists.txt |   2 +-
 src/modules/pam_matrix.c   |   2 +-
 src/pam_wrapper.c  | 208 ++---
 src/python/CMakeLists.txt  |   4 +-
 6 files changed, 111 insertions(+), 114 deletions(-)


Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8709a14..1674909 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ set(APPLICATION_NAME $

[SCM] Samba Shared Repository - branch master updated

2016-01-13 Thread Michael Adam
The branch, master has been updated
   via  7362c27 vfs_shadow_copy2: add a blackbox test suite
   via  8a49a63 vfs_shadow_copy2: fix case where snapshots are outside the 
share
   via  3703bca vfs_shadow_copy2: add shadow_copy2_do_convert()
  from  fba90fd s3:smbd_smb2_reauth_generic_return: make use of 
smb2req->xconn

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


- Log -
commit 7362c27a62e3802fc8df975ce50115b683811f4a
Author: Uri Simchoni <u...@samba.org>
Date:   Thu Oct 29 22:24:30 2015 +0200

vfs_shadow_copy2: add a blackbox test suite

Add a blackbox test suite for vfs_shadow_copy2, testing
parameters mountpoint, basedir, snapdir, snapdirseverywhere,
and testing correct wide-link processing.

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

Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Jan 13 17:11:38 CET 2016 on sn-devel-144

commit 8a49a63a5a5d8014d32179df1789186223443b35
Author: Uri Simchoni <u...@samba.org>
Date:   Mon Nov 2 09:08:53 2015 +0200

vfs_shadow_copy2: fix case where snapshots are outside the share

Adjust the connect path to the root of the share in the snapshot,
or to the root of the snapshot if the snapshot is "inside" the
share.

This way snapshot symlink regarded as "wide links" if and only if
they point outside the snapshot or they were wide links when
the snapshot was taken.

This allows mounting the snapshots outside the share's root.

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3703bca4d9e494aec0b40243add3e076cf353601
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Nov 1 22:28:46 2015 +0200

vfs_shadow_copy2: add shadow_copy2_do_convert()

Add a new routine shadow_copy2_do_convert() which is
like shadow_copy2_convert(), but beside calculating the
path of the snapshot file, it also returns the minimum length
of the subpath which is both inside the share and inside the
same snapshot as the file in question, i.e. (at least in the
classical case) the subdirectory of the the snapshot file's
snapshot directory that corresponds to the file's share root.

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

    Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 selftest/target/Samba3.pm|  69 
 source3/modules/vfs_shadow_copy2.c   | 107 +---
 source3/script/tests/test_shadow_copy.sh | 290 +++
 source3/selftest/tests.py|   1 +
 4 files changed, 441 insertions(+), 26 deletions(-)
 create mode 100755 source3/script/tests/test_shadow_copy.sh


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 0906620..cd293a6 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1126,6 +1126,15 @@ sub provision()
my $widelinks_linkdir="$shrdir/widelinks_foo";
push(@dirs,$widelinks_linkdir);
 
+   my $shadow_tstdir="$shrdir/shadow";
+   push(@dirs,$shadow_tstdir);
+   my $shadow_mntdir="$shadow_tstdir/mount";
+   push(@dirs,$shadow_mntdir);
+   my $shadow_basedir="$shadow_mntdir/base";
+   push(@dirs,$shadow_basedir);
+   my $shadow_shrdir="$shadow_basedir/share";
+   push(@dirs,$shadow_shrdir);
+
# this gets autocreated by winbindd
my $wbsockdir="$prefix_abs/winbindd";
my $wbsockprivdir="$lockdir/winbindd_privileged";
@@ -1392,6 +1401,10 @@ sub provision()
# fruit:copyfile is a global option
fruit:copyfile = yes
 
+   #this does not mean that we use non-secure test env,
+   #it just means we ALLOW one to be configured.
+   allow insecure wide links = yes
+
# Begin extra options
$extra_options
# End extra options
@@ -1553,6 +1566,62 @@ sub provision()
shell_snap:delete command = $fake_snap_pl --delete
# a relative path here fails, the snapshot dir is no longer found
shadow:snapdir = $shrdir/.snapshots
+
+[shadow1]
+   path = $shadow_shrdir
+   comment = previous versions snapshots under mount point
+   vfs objects = shadow_copy2
+   shadow:mountpoint = $shadow_mntdir
+
+[shadow2]
+   path = $shadow_shrdir
+   comment = previous versions snapshots outside mount point
+

[SCM] Samba Shared Repository - branch master updated

2016-01-12 Thread Michael Adam
The branch, master has been updated
   via  3ac2d4b ctdb-tests: Fix some incorrect memory allocations
   via  a7ce00c ctdb-scripts: Use more unique temporary file names
   via  4afe822 ctdb-scripts: Don't remove temporary files before use
   via  2083883 ctdb-scripts: Superficial clean-ups to 10.interface
   via  c23744c ctdb-scripts: Clarify logic for success of interface 
monitoring
   via  d8e4c5a ctdb-scripts: Fix regression in updateip code
   via  18b0aea ctdb-ipalloc: Fix a memory leak
   via  24160ee ctdb-daemon: Don't leak memory if not using recovery lock
   via  56ce230 ctdb-recoverd: Fix some uninitialised memory issues
   via  8f73ae0 ctdb-daemon: Drop the "schedule for deletion" messages to 
DEBUG level
  from  9790abd ctdb/web: Fix typo.

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


- Log -
commit 3ac2d4b59eff58f06af1eef19cef0d444f4257ca
Author: Martin Schwenke <mar...@meltin.net>
Date:   Tue Dec 1 15:32:07 2015 +1100

ctdb-tests: Fix some incorrect memory allocations

These allocate enough memory but things get confusing if they're used
as a guide when updating the code.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Jan 12 22:19:16 CET 2016 on sn-devel-144

commit a7ce00cc0392cbbc009e2dbe8d58258d6ba0566f
Author: Martin Schwenke <mar...@meltin.net>
Date:   Thu Dec 10 15:03:46 2015 +1100

ctdb-scripts: Use more unique temporary file names

Consider this sequence of events:

1. Instance of script running update_tickles() hangs
2. Script debugging is launched asynchronously
3. New instance of script is launched, creates temporary file(s)
4. Original hung script makes progress before asynchronous script
   debugging kills it, so it removes temporary file(s)
5. New instance of script produces error due to missing files(s)

This is obviously rare.

Use more unique filenames to avoid step (4) removing the file(s)
belonging to other instances of the script.

This requires some extra cleanup to avoid too many temporary files
(which is why unique filenames were not originally usd).  It is
sufficient to remove files modified at least 10 minutes ago.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 4afe822397a0fe8f3e528077089577c89c9895e5
Author: Martin Schwenke <mar...@meltin.net>
Date:   Thu Dec 10 14:58:53 2015 +1100

ctdb-scripts: Don't remove temporary files before use

They will be clobbered by the redirect anyway.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 20838833f3fe3053c7f6aed8ac598319a3ecc346
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Dec 18 13:16:27 2015 +1100

ctdb-scripts: Superficial clean-ups to 10.interface

Whitespace and indentation improvements.

Remove comments describing events, since the README covers that much
better.
    
    Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c23744c61db321a911653d58ed258a3003cf798b
Author: Martin Schwenke <mar...@meltin.net>
Date:   Wed Dec 16 19:18:49 2015 +1100

ctdb-scripts: Clarify logic for success of interface monitoring

The current code uses so many shell idioms that it is difficult to
    follow.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit d8e4c5a468286ecc1c38ecd66a3606e84db02373
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Dec 18 15:33:38 2015 +1100

ctdb-scripts: Fix regression in updateip code

Regression introduced in commit
6471541d6d2bc9f2af0ff92b280abbd1d933cf88.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 18b0aeaae0ba42549a9542b8c08923211e2976ad
Author: Martin Schwenke <mar...@meltin.net>
Date:   Tue Dec 1 14:38:48 2015 +1100

ctdb-ipalloc: Fix a memory leak

Commit cfa0ffe78073f9e3a014bb127fb9a4b7ad95fceb introduced a memory
leak.  Never assume...

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 24160ee6a4a0727840d73955b99aef690450f345
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon Jan 11 13:41:30 2016 +1100

    ctdb-daemon: Don't leak memory if not using recovery lock

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 56ce23

[SCM] Samba Shared Repository - branch master updated

2016-01-11 Thread Michael Adam
The branch, master has been updated
   via  9790abd ctdb/web: Fix typo.
  from  7c4d802 talloc: Fix a documentation typo

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


- Log -
commit 9790abd6a402243179003a47026769d2576e9626
Author: Karolin Seeger <ksee...@samba.org>
Date:   Mon Jan 11 11:43:49 2016 +0100

ctdb/web: Fix typo.

assinged -> assigned

Signed-off-by: Karolin Seeger <ksee...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Jan 11 21:40:36 CET 2016 on sn-devel-144

---

Summary of changes:
 ctdb/web/iscsi.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/web/iscsi.html b/ctdb/web/iscsi.html
index 1385e18..2926eaa 100644
--- a/ctdb/web/iscsi.html
+++ b/ctdb/web/iscsi.html
@@ -10,7 +10,7 @@ You can use CTDB to create a HA iSCSI Target.
 
 Since the iSCSI Target is not
 clusterized nor integrated with CTDB in the same sense Samba is, this
-implementation will only create a HA solution for iSCSI where each public 
address is assinged its own iscsi target name and the LUNs that are created are 
only accessible through one specific target (i.e. one public address at a time).
+implementation will only create a HA solution for iSCSI where each public 
address is assigned its own iscsi target name and the LUNs that are created are 
only accessible through one specific target (i.e. one public address at a time).
 
 
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-01-11 Thread Michael Adam
   via  e1bb009 nwrap: Fix memory leak inside nwrap_getaddrinfo()
   via  0f1ffb9 nwrap: Use nwrap_vector_foreach instead of for loop
   via  9d71542 nwrap: Fix memory leak when getline() is used.
   via  4505dcd nwrap: Add basic locking for support multithreaded 
applications
   via  1017031 nwrap: Add BSD libc support for gethost*_r functios.
   via  960345e nwrap: Use nwrap vectors as memory backend for 
getaddrinfo() and gethostbyname()
   via  090dec2 nwrap: Add string manipulation functions.
   via  270d6f9 nwrap: Add nwrap_add_hname() and nwrap_add_hname_alias().
   via  442fc3f nwrap: Add function nwrap_add_ai
   via  15c1453 nwrap: Add a hash table to the nwrap structure
   via  f3da6e4 nwrap: Simplify file loading.
   via  ff65d01 nwrap: Add nwrap vector memory management functions
   via  6706ee4 nwrap: Check for setspent and getspnam functions
   via  22f159f src: Add configure check for shadow.h
   via  07b nwrap: Add support for getspnam()
   via  608fa20 nwrap: Add (set|get|end)spent functions
   via  e971a44 nwrap: Add nss_wrapper_shadow_enabled() function
   via  4be5853 nwrap: Add shadow file parser
   via  2a53352 nwrap: Remove unused struct member in nwrap_main
   via  90585c4 nwrap: Implement nwrap_files_initgroups()
   via  80abc70 nwrap: Remove unneeded memcpy in getgrouplist()
   via  a104389 nwrap: Avoid a string comparsion in getgrouplist()
   via  1c346a0 nwrap: Use ssize_t for aliases_count
   via  02b5410 nwrap: Prevent compilation failure on machine without IPv4
   via  90dbe7b nwrap: Replace free() calls by SAFE_FREE macro where 
possible.
   via  ea741de nwrap: Fix the handle loops for older gcc versions.
   via  77d0fce torture: add torture comment output of name/ip to 
WinsBy{Ip,Name} tests
   via  71ffd3b torture: Fix winbind.wbclient.ResolveWinsByIp test
   via  fcb1ca8 torture: fix check_pw_with_krb5 in the rpc:lsa test
   via  688590f torture: fix check_dom_trust_pw in the rpc:lsa test
   via  38c2305 torture: fix the ldap.netlogon-udp test
   via  9b443d2 torture: fix the ldap.cldap test
  from  2e2d4be s3:wscript: fix spaces

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


- Log -
commit 7cec3092ffd8fa6f0f14194be7856ab087ac75a9
Author: Michael Adam <ob...@samba.org>
Date:   Wed Dec 16 17:47:04 2015 +0100

nss_wrapper: bump version to 1.1.2

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Jan 11 15:30:49 CET 2016 on sn-devel-144

commit da292b606230190e65f7ef17d23f8c7a65135ecb
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 17 08:46:33 2015 +0100

nwrap: Fix segfaults while reloading hosts file

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 19b2dcbeb230adc956d023dfea0d1aad9bb2a1ca
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Nov 24 17:32:47 2015 +0100

nwrap: Don't fail if we want to add an existing entry

Pair-Programmed-With: Michael Adam <ob...@samba.org>
Signed-off-by: Andreas Schneider <a...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>

commit 9b7902090d2d594d25d517759dba78ced0f9124b
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Nov 23 08:33:02 2015 +0100

nwrap: Fix the build on Solaris

    Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 5f621977fd52b6da94707733bc273636a7ba2fde
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 20 09:38:16 2015 +0100

nwrap: Don't leak memory from gethostbyname*() functions

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b54bbb2b832570070c1310b22792d0c6586cde85
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 20 08:51:49 2015 +0100

nwrap: Fix the build on FreeBSD

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 766e795518127bf0febd3c0da436adb1a376771d
Author: Michael Adam <ob...@samba.org>
Date:   Fri Nov 20 09:01:01 2015 +0100

nwrap: fix a copy and paste error in the destructor.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 554963d8877d2260ec36ff4bc097499606386d11
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Nov 19 09:02:46 2015 +0100

nwrap: Cleanup shadow getspnam() memory

Signed-off-by: Andreas Schneider <a...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>


[SCM] Samba Shared Repository - branch master updated

2016-01-07 Thread Michael Adam
The branch, master has been updated
   via  11de99a asn1: Clean up includes
   via  fe3c270 smbcontrol: Use procid_is_local
   via  2948fb3 net: Use procid_is_local
  from  8108f0d s3: smbclient: asn1_extract_blob() stops further asn1 
processing by setting has_error.

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


- Log -
commit 11de99a6d83c0ec34481847d2adff9a99f41385d
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Jan 5 22:00:58 2016 +0100

asn1: Clean up includes

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Jan  7 19:12:22 CET 2016 on sn-devel-144

commit fe3c270ea6e9e58100f97833119a1e6d9f8b1de9
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Oct 14 11:49:57 2015 +0200

smbcontrol: Use procid_is_local

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 2948fb347a8cd44deb358b65ad95125ab2b60c42
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Oct 14 11:49:57 2015 +0200

net: Use procid_is_local

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 lib/util/asn1.c  | 7 +--
 lib/util/asn1.h  | 5 +
 source3/utils/net_serverid.c | 2 +-
 source3/utils/smbcontrol.c   | 2 +-
 4 files changed, 12 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index fed6590..9ce7c23 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -17,8 +17,11 @@
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "includes.h"
-#include "../lib/util/asn1.h"
+#include "replace.h"
+#include "system/locale.h"
+#include "lib/util/asn1.h"
+#include "lib/util/debug.h"
+#include "lib/util/samba_util.h"
 
 struct nesting {
off_t start;
diff --git a/lib/util/asn1.h b/lib/util/asn1.h
index 4eb8506..128858f 100644
--- a/lib/util/asn1.h
+++ b/lib/util/asn1.h
@@ -20,6 +20,11 @@
 #ifndef _ASN_1_H
 #define _ASN_1_H
 
+#include "replace.h"
+#include 
+#include "lib/util/data_blob.h"
+
+
 struct nesting;
 struct asn1_data;
 typedef struct asn1_data ASN1_DATA;
diff --git a/source3/utils/net_serverid.c b/source3/utils/net_serverid.c
index 630a7de..f228c91 100644
--- a/source3/utils/net_serverid.c
+++ b/source3/utils/net_serverid.c
@@ -51,7 +51,7 @@ static int net_serverid_wipe_fn(struct db_record *rec,
 {
NTSTATUS status;
 
-   if (id->vnn != get_my_vnn()) {
+   if (!procid_is_local(id)) {
return 0;
}
status = dbwrap_record_delete(rec);
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index d1eb7dd..ad602b3 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -325,7 +325,7 @@ static int stack_trace_server(const struct server_id *id,
  uint32_t msg_flags,
  void *priv)
 {
-   if (id->vnn == get_my_vnn()) {
+   if (procid_is_local(id)) {
print_stack_trace(procid_to_pid(id), (int *)priv);
}
return 0;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-12-28 Thread Michael Adam
The branch, master has been updated
   via  1be7e8b smbd: remove function name from a DBG_INFO in a recent 
commit
  from  d4c2395 smbd: do not disable "store dos attributes" on-the-fly

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


- Log -
commit 1be7e8b9d89fb061ca5707831b6a1151def89be4
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Dec 27 07:17:58 2015 +0200

smbd: remove function name from a DBG_INFO in a recent commit

We now have  embedded automatically into DBG_XXX-
generated messages.

Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Dec 29 04:18:19 CET 2015 on sn-devel-144

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 942d286..ecc211c 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -279,7 +279,7 @@ static bool get_ea_dos_attribute(connection_struct *conn,
   SAMBA_XATTR_DOS_ATTRIB, attrstr,
   sizeof(attrstr));
if (sizeret == -1) {
-   DBG_INFO("get_ea_dos_attribute: Cannot get attribute "
+   DBG_INFO("Cannot get attribute "
 "from EA on file %s: Error = %s\n",
 smb_fname_str_dbg(smb_fname), strerror(errno));
return False;
@@ -413,7 +413,7 @@ static bool set_ea_dos_attribute(connection_struct *conn,
files_struct *fsp = NULL;
 
if((errno != EPERM) && (errno != EACCES)) {
-   DBG_INFO("set_ea_dos_attributes: Cannot set "
+   DBG_INFO("Cannot set "
 "attribute EA on file %s: Error = %s\n",
 smb_fname_str_dbg(smb_fname), strerror(errno));
return false;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-12-23 Thread Michael Adam
The branch, master has been updated
   via  ada59ec s3:smbd: fix a corner case of the symlink verification
  from  2efa2e0 s3: smbd: Replace lp_posix_pathnames() with 
req->posix_pathnames in dir.c. Only one remaining.

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


- Log -
commit ada59ec7b3a5ed0478d11da2fe0c90991d137288
Author: Michael Adam <ob...@samba.org>
Date:   Wed Dec 23 18:01:23 2015 +0100

s3:smbd: fix a corner case of the symlink verification

Commit 7606c0db257b3f9d84da5b2bf5fbb4034cc8d77d fixes the
path checks in check_reduced_name[_with_privilege]() to
prevent unintended access via wide links.

The fix fails to correctly treat a corner case where the share
path is "/". This case is important for some real world
scenarios, notably the use of the glusterfs VFS module:

For the share path "/", the newly introduced checks deny all
operations in the share.

This change fixes the checks for the corner case.
The point is that the assumptions on which the original
checks are based are not true for the rootdir "/" case.
This is the case where the rootdir starts _and ends_ with
a slash. Hence a subdirectory does not continue with a
slash after the rootdir, since the candidate path has
been normalized.

This fix just omits the string comparison and the
next character checks in the case of rootdir "/",
which is correct because we know that the candidate
path is normalized and hence starts with a '/'.

The patch is fairly minimal, but changes indentation,
hence best viewed with 'git show -w'.

A side effect is that the rootdir="/" case needs
one strncmp less.

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

Pair-Programmed-With: Jose A. Rivera <jar...@samba.org>

Signed-off-by: Michael Adam <ob...@samba.org>
Signed-off-by: Jose A. Rivera <jar...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Dec 24 00:57:31 CET 2015 on sn-devel-144

---

Summary of changes:
 source3/smbd/vfs.c | 78 +-
 1 file changed, 53 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 27b38d6..1a2ee3d 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -982,7 +982,6 @@ NTSTATUS 
check_reduced_name_with_privilege(connection_struct *conn,
struct smb_filename *smb_fname_cwd = NULL;
struct privilege_paths *priv_paths = NULL;
int ret;
-   bool matched;
 
DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n",
fname,
@@ -1077,18 +1076,32 @@ NTSTATUS 
check_reduced_name_with_privilege(connection_struct *conn,
}
 
rootdir_len = strlen(conn_rootdir);
-   matched = (strncmp(conn_rootdir, resolved_name, rootdir_len) == 0);
-
-   if (!matched || (resolved_name[rootdir_len] != '/' &&
-resolved_name[rootdir_len] != '\0')) {
-   DEBUG(2, ("check_reduced_name_with_privilege: Bad access "
-   "attempt: %s is a symlink outside the "
-   "share path\n",
-   dir_name));
-   DEBUGADD(2, ("conn_rootdir =%s\n", conn_rootdir));
-   DEBUGADD(2, ("resolved_name=%s\n", resolved_name));
-   status = NT_STATUS_ACCESS_DENIED;
-   goto err;
+
+   /*
+* In the case of rootdir_len == 1, we know that conn_rootdir is
+* "/", and we also know that resolved_name starts with a slash.
+* So, in this corner case, resolved_name is automatically a
+* sub-directory of the conn_rootdir. Thus we can skip the string
+* comparison and the next character checks (which are even
+* wrong in this case).
+*/
+   if (rootdir_len != 1) {
+   bool matched;
+
+   matched = (strncmp(conn_rootdir, resolved_name,
+   rootdir_len) == 0);
+
+   if (!matched || (resolved_name[rootdir_len] != '/' &&
+resolved_name[rootdir_len] != '\0')) {
+   DEBUG(2, ("check_reduced_name_with_privilege: Bad "
+   "access attempt: %s is a symlink outside the "
+   "share path\n",
+   dir_name));
+   DEBUGADD(2, ("conn_rootdir =%s\n", conn_rootdir));
+   

[SCM] NSS Wrapper Repository - branch master updated

2015-12-17 Thread Michael Adam
The branch, master has been updated
   via  03018f8 Bump version to 1.1.2
   via  a93a07d tests: Add reload test for the hosts file
   via  6406714 nwrap: Fix segfaults while reloading hosts file
  from  581a412 tests: Add the same alias again

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


- Log -
commit 03018f8b035cd2b627298cf47290f2563f821e76
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 17 09:00:30 2015 +0100

Bump version to 1.1.2

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit a93a07d5e122b50dcec2e8fe7dbee022e5d5d301
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 17 08:56:05 2015 +0100

tests: Add reload test for the hosts file

With this valgrind should show issues if the hash table is not
recreated.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 64067145b4e013d4223bf17011984988bddbe43e
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 17 08:46:33 2015 +0100

nwrap: Fix segfaults while reloading hosts file

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 CMakeLists.txt   |  4 ++--
 ChangeLog|  5 +
 src/nss_wrapper.c| 13 
 tests/test_getaddrinfo.c | 51 
 4 files changed, 71 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1ed061..8b352cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
 
 set(APPLICATION_VERSION_MAJOR "1")
 set(APPLICATION_VERSION_MINOR "1")
-set(APPLICATION_VERSION_PATCH "1")
+set(APPLICATION_VERSION_PATCH "2")
 
 set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
 
@@ -19,7 +19,7 @@ set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO
 # Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 # Increment REVISION.
-set(LIBRARY_VERSION "0.2.1")
+set(LIBRARY_VERSION "0.2.2")
 set(LIBRARY_SOVERSION "0")
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
diff --git a/ChangeLog b/ChangeLog
index 139d4fa..8d55fc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 ChangeLog
 ==
 
+version 1.1.2 (released 2015-12-17)
+  * Fixed segfault while reloading hosts file
+  * Fixed issue where are not fault tolerant if an alias has already
+been added
+
 version 1.1.1 (released 2015-11-23)
   * Fixed nss_wrapper build on Solaris
 
diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index f48b9cc..c4f1b33 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -2890,6 +2890,7 @@ static void nwrap_he_unload(struct nwrap_cache *nwrap)
struct nwrap_entdata *ed;
struct nwrap_entlist *el;
size_t i;
+   int rc;
 
nwrap_vector_foreach (ed, nwrap_he->entries, i)
{
@@ -2915,6 +2916,18 @@ static void nwrap_he_unload(struct nwrap_cache *nwrap)
 
nwrap_he->num = 0;
nwrap_he->idx = 0;
+
+   /*
+* If we unload the file, the pointers in the hash table point to
+* invalid memory. So we need to destroy the hash table and recreate
+* it.
+*/
+   hdestroy();
+   rc = hcreate(max_hostents);
+   if (rc == 0) {
+   NWRAP_LOG(NWRAP_LOG_ERROR, "Failed to initialize hash table");
+   exit(-1);
+   }
 }
 
 
diff --git a/tests/test_getaddrinfo.c b/tests/test_getaddrinfo.c
index b200275..438ea12 100644
--- a/tests/test_getaddrinfo.c
+++ b/tests/test_getaddrinfo.c
@@ -5,8 +5,10 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -83,6 +85,54 @@ static void test_nwrap_getaddrinfo(void **state)
freeaddrinfo(res);
 }
 
+/*
+ * The purpose of this test is to verify that reloading of the hosts
+ * file (triggered by a timestamp change) correctly frees and re-creates
+ * the internal data structures, so we do not end up using invalid memory.
+ */
+static void test_nwrap_getaddrinfo_reload(void **state)
+{
+   struct addrinfo hints;
+   struct addrinfo *res = NULL;
+   const char *env;
+   char touch_cmd[1024];
+   int rc;
+
+   (void) state; /* unused */
+
+   /* IPv4 */
+   memset(, 0, sizeof(struct addrinfo));
+   hints.ai_family = AF_UNSPEC;/* Allow IPv4 or IPv6 */
+   hints.ai_socktype = S

[SCM] pam wrapper repository - branch master updated

2015-12-10 Thread Michael Adam
The branch, master has been updated
   via  59ecbfa py: Make sure we do not use failed uninitialized
   via  52ec969 py: Make sure we do not dereference a NULL pointer
   via  776a184 libpamtest: Do not call pam_end() if tc is not set
   via  927a070 libpamtest: Make sure reply is initialized
  from  d98750e tests: Do not run python test if python is not present

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


- Log -
commit 59ecbfa4fb64785c24fe3ce4bfa96a23f804eac3
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 10 17:32:18 2015 +0100

py: Make sure we do not use failed uninitialized

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 52ec969c2c074f2716c8c3bccd7940a84ddee92b
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 10 17:30:57 2015 +0100

py: Make sure we do not dereference a NULL pointer

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 776a18460f3e259a12a8b07ee52d70676fdb7258
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 10 17:13:52 2015 +0100

libpamtest: Do not call pam_end() if tc is not set

This fixes a build warning.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 927a070eb6d80fb155ccc033704522d336789c28
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 10 17:10:55 2015 +0100

libpamtest: Make sure reply is initialized

Fixes a build warning

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/libpamtest.c   | 6 +++---
 src/python/pypamtest.c | 9 +++--
 2 files changed, 10 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/libpamtest.c b/src/libpamtest.c
index 612cdc1..6d6efc6 100644
--- a/src/libpamtest.c
+++ b/src/libpamtest.c
@@ -70,7 +70,7 @@ enum pamtest_err _pamtest_conv(const char *service,
pam_handle_t *ph;
struct pam_conv conv;
size_t tcindex;
-   struct pam_testcase *tc;
+   struct pam_testcase *tc = NULL;
bool call_pam_end = true;
 
conv.conv = conv_fn;
@@ -101,7 +101,7 @@ enum pamtest_err _pamtest_conv(const char *service,
}
}
 
-   if (call_pam_end == true) {
+   if (call_pam_end == true && tc != NULL) {
rv = pam_end(ph, tc->op_rv);
if (rv != PAM_SUCCESS) {
return PAMTEST_ERR_END;
@@ -198,7 +198,7 @@ static int pamtest_simple_conv(int num_msg,
 {
int i, ri;
int ret;
-   struct pam_response *reply;
+   struct pam_response *reply = NULL;
const char *prompt;
struct pamtest_conv_ctx *cctx = \
(struct pamtest_conv_ctx *) appdata_ptr;
diff --git a/src/python/pypamtest.c b/src/python/pypamtest.c
index 1538294..a1b5dd6 100644
--- a/src/python/pypamtest.c
+++ b/src/python/pypamtest.c
@@ -261,7 +261,12 @@ set_pypamtest_exception(PyObject *exc,
/* repr_fmt is fixed and contains just %d expansions, so this is safe */
char test_repr[256] = { '\0' };
const char *strerr;
-   const struct pam_testcase *failed;
+   const struct pam_testcase *failed = NULL;
+
+   if (exc == NULL) {
+   PyErr_BadArgument();
+   return;
+   }
 
strerr = pamtest_strerror(perr);
 
@@ -275,7 +280,7 @@ set_pypamtest_exception(PyObject *exc,
}
}
 
-   if (test_repr[0] != '\0') {
+   if (test_repr[0] != '\0' && failed != NULL) {
PyErr_Format(exc,
 "Error [%d]: Test case %s retured [%d]",
 perr, test_repr, failed->op_rv);


-- 
pam wrapper repository



[SCM] pam wrapper repository - branch master updated

2015-12-10 Thread Michael Adam
The branch, master has been updated
   via  7267de3 py: Fix strict aliasing rules in initpypamtest()
   via  7505e1c py: Fix strict aliasing rules in set_pypamtest_exception()
  from  59ecbfa py: Make sure we do not use failed uninitialized

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


- Log -
commit 7267de3e692d4e07645488cde7f54c2d4ffa426d
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 10 17:36:09 2015 +0100

py: Fix strict aliasing rules in initpypamtest()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 7505e1c7f93fae556bb92b19922791bc703b6be1
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Dec 10 17:35:51 2015 +0100

py: Fix strict aliasing rules in set_pypamtest_exception()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/python/pypamtest.c | 26 ++
 1 file changed, 18 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/python/pypamtest.c b/src/python/pypamtest.c
index a1b5dd6..a773733 100644
--- a/src/python/pypamtest.c
+++ b/src/python/pypamtest.c
@@ -260,6 +260,10 @@ set_pypamtest_exception(PyObject *exc,
PyObject *obj = NULL;
/* repr_fmt is fixed and contains just %d expansions, so this is safe */
char test_repr[256] = { '\0' };
+   union {
+   char *str;
+   PyObject *obj;
+   } pypam_str_object;
const char *strerr;
const struct pam_testcase *failed = NULL;
 
@@ -291,7 +295,8 @@ set_pypamtest_exception(PyObject *exc,
PyErr_SetObject(exc, obj);
}
 
-   Py_XDECREF(test_repr);
+   pypam_str_object.str = test_repr;
+   Py_XDECREF(pypam_str_object.obj);
Py_XDECREF(obj);
 }
 
@@ -1008,6 +1013,10 @@ PyMODINIT_FUNC initpypamtest(void)
 #endif
 {
PyObject *m;
+   union {
+   PyTypeObject *type_obj;
+   PyObject *obj;
+   } pypam_object;
int ret;
 
 #if IS_PYTHON3
@@ -1069,18 +1078,19 @@ PyMODINIT_FUNC initpypamtest(void)
RETURN_ON_ERROR;
}
 
-   if (PyType_Ready(_test_case) < 0) {
+   pypam_object.type_obj = _test_case;
+   if (PyType_Ready(pypam_object.type_obj) < 0) {
RETURN_ON_ERROR;
}
-   Py_INCREF(_test_case);
-   PyModule_AddObject(m, "TestCase", (PyObject *) _test_case);
+   Py_INCREF(pypam_object.obj);
+   PyModule_AddObject(m, "TestCase", pypam_object.obj);
 
-   if (PyType_Ready(_test_result) < 0) {
+   pypam_object.type_obj = _test_result;
+   if (PyType_Ready(pypam_object.type_obj) < 0) {
RETURN_ON_ERROR;
}
-   Py_INCREF(_test_result);
-   PyModule_AddObject(m, "TestResult",
-  (PyObject *) _test_result);
+   Py_INCREF(pypam_object.obj);
+   PyModule_AddObject(m, "TestResult", pypam_object.obj);
 
 #if IS_PYTHON3
return m;


-- 
pam wrapper repository



[SCM] Samba Shared Repository - branch master updated

2015-11-24 Thread Michael Adam
The branch, master has been updated
   via  1582006 s3: smbd: have_file_open_below() fails to enumerate open 
files below an open directory handle.
  from  9883599 smbd:dir: remove an extra empty line in files_below_forall()

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


- Log -
commit 158200611271bd80d80280c88578dfd5380f8fd0
Author: Jeremy Allison <j...@samba.org>
Date:   Mon Nov 23 14:00:56 2015 -0800

s3: smbd: have_file_open_below() fails to enumerate open files below an 
open directory handle.

There are three issues:

1). The memcmp checking that the open file path has the open
directory path as its parent compares using the wrong length
(it uses the full open file path which will never compare as
the same).

2). The files_below_forall() function doesn't fill in the
callback function or callback data when calling share_mode_forall(),
leading to a crash (which we never saw, as the previous issue (1)
meant the callback function would never be invoked).

3). When invoking the callback function from files_below_forall_fn()
we were passing in the wrong private_data pointer (needs to be
the one from the state, not the private_data passed into
files_below_forall_fn()).

Found when running the torture test smb2.rename.rename_dir_openfile
when fixing bug #11065.

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

Signed-off-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Ralph Boehme <s...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Nov 24 19:36:20 CET 2015 on sn-devel-104

---

Summary of changes:
 source3/smbd/dir.c | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 0972340..2ab3768 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1912,14 +1912,14 @@ static int files_below_forall_fn(struct file_id fid,
return 0;
}
 
-   if (memcmp(state->dirpath, fullpath, len) != 0) {
+   if (memcmp(state->dirpath, fullpath, state->dirpath_len) != 0) {
/*
 * Not a parent
 */
return 0;
}
 
-   return state->fn(fid, data, private_data);
+   return state->fn(fid, data, state->private_data);
 }
 
 static int files_below_forall(connection_struct *conn,
@@ -1929,7 +1929,10 @@ static int files_below_forall(connection_struct *conn,
void *private_data),
  void *private_data)
 {
-   struct files_below_forall_state state = {};
+   struct files_below_forall_state state = {
+   .fn = fn,
+   .private_data = private_data,
+   };
int ret;
char tmpbuf[PATH_MAX];
char *to_free;
@@ -1963,7 +1966,9 @@ static int have_file_open_below_fn(struct file_id fid,
 static bool have_file_open_below(connection_struct *conn,
 const struct smb_filename *name)
 {
-   struct have_file_open_below_state state = {};
+   struct have_file_open_below_state state = {
+   .found_one = false,
+   };
int ret;
 
if (!VALID_STAT(name->st)) {


-- 
Samba Shared Repository



[SCM] NSS Wrapper Repository - branch master updated

2015-11-24 Thread Michael Adam
The branch, master has been updated
   via  581a412 tests: Add the same alias again
   via  604a7ae nwrap: Don't fail if we want to add an existing entry
  from  0b3d6ec Bump version to 1.1.1

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


- Log -
commit 581a4123d0aff4349814c6d1f7504390ffcb9429
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Nov 24 17:33:49 2015 +0100

tests: Add the same alias again

We should be fault tolerant here.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 604a7ae8cf438d428e25841c729a73d50ed86cff
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Nov 24 17:32:47 2015 +0100

nwrap: Don't fail if we want to add an existing entry

    Pair-Programmed-With: Michael Adam <ob...@samba.org>
Signed-off-by: Andreas Schneider <a...@samba.org>
Signed-off-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/nss_wrapper.c | 6 --
 tests/hosts.in| 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index a080b80..f48b9cc 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -2622,12 +2622,14 @@ static bool nwrap_ed_inventarize_add_to_existing(struct 
nwrap_entdata *const ed,
for (cursor = el; cursor->next != NULL; cursor = cursor->next)
{
if (cursor->ed == ed) {
-   return false;
+   /* The entry already exists in this list. */
+   return true;
}
}
 
if (cursor->ed == ed) {
-   return false;
+   /* The entry already exists in this list. */
+   return true;
}
 
el_new = nwrap_entlist_init(ed);
diff --git a/tests/hosts.in b/tests/hosts.in
index 0d97bbc..9f767c3 100644
--- a/tests/hosts.in
+++ b/tests/hosts.in
@@ -5,7 +5,7 @@
 ::13beteigeuze.galaxy.site beteigeuze mail   
 127.0.0.14 krikkit.galaxy.site
 ::14 krikkit.galaxy.site
-127.1.1.1  pumpkin.bunny.net
+127.1.1.1  pumpkin.bunny.net pumpkin.bunny.net
 127.0.0.66 pumpkin.bunny.net
 2666::22   pumpkin.bunny.net
 DEAD:BEEF:1:2:3::4 pumpkin.bunny.net


-- 
NSS Wrapper Repository



[SCM] Samba Shared Repository - branch master updated

2015-11-24 Thread Michael Adam
The branch, master has been updated
   via  9883599 smbd:dir: remove an extra empty line in files_below_forall()
  from  3b2ae07 build:wafsamba: Ensure that check_group_ordering can be 
overridden

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


- Log -
commit 9883599fc94fbf7a490fd773e6661613bf4d6ba8
Author: Michael Adam <ob...@samba.org>
Date:   Tue Nov 24 11:30:05 2015 +0100

smbd:dir: remove an extra empty line in files_below_forall()

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Volker Lendecke <v...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Nov 24 15:59:47 CET 2015 on sn-devel-104

---

Summary of changes:
 source3/smbd/dir.c | 1 -
 1 file changed, 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 3f99f88..0972340 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1940,7 +1940,6 @@ static int files_below_forall(connection_struct *conn,
  , _free);
if (state.dirpath_len == -1) {
return -1;
-
}
 
ret = share_mode_forall(files_below_forall_fn, );


-- 
Samba Shared Repository



[SCM] NSS Wrapper Repository - branch master updated

2015-11-20 Thread Michael Adam
The branch, master has been updated
   via  75a22b4 tests: add __sha512_crypt to suppression file.
   via  bfd11d7 tests: Set the valgrind suppression file
   via  50101ce tests: Add valgrind suppression for glibc error
  from  23a7a85 nwrap: Don't leak memory from gethostbyname*() functions

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


- Log -
commit 75a22b46dc995baa4f9f362e4113ef86f4d605d6
Author: Michael Adam <ob...@samba.org>
Date:   Fri Nov 20 10:51:11 2015 +0100

tests: add __sha512_crypt to suppression file.

While the manpage crypt(3) states that the function
returns a pointer to static memory, this does not
seem to be true for the __sha512 variant.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit bfd11d7a1511a678539597905c2fce2ab033aa4c
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 20 09:59:58 2015 +0100

tests: Set the valgrind suppression file

You can run 'make ExperimentalMemcheck' with valgrind suppression now.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 50101ce09b125892456085ea69cd4cc55ea2691c
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 20 09:22:36 2015 +0100

tests: Add valgrind suppression for glibc error

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 CMakeLists.txt  |  9 +
 tests/valgrind.supp | 24 
 2 files changed, 33 insertions(+)


Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f73a46c..c23802e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,15 @@ install(
 
 if (UNIT_TESTING)
 find_package(CMocka REQUIRED)
+
+file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/tests/valgrind.supp" 
VALGRIND_SUPPRESSION_FILE)
+# add the valgrind suppressions
+set(MEMORYCHECK_SUPPRESSIONS_FILE
+${VALGRIND_SUPPRESSION_FILE}
+CACHE
+FILEPATH
+"Path to the memory checking command, used for memory error 
detection.")
+
 include(AddCMockaTest)
 add_subdirectory(tests)
 endif (UNIT_TESTING)
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
index 95c980b..aac3f28 100644
--- a/tests/valgrind.supp
+++ b/tests/valgrind.supp
@@ -13,3 +13,27 @@
fun:_dlerror_run
fun:dlopen@@GLIBC_2.2.5
 }
+
+{
+   glibc_dlopen_alloc
+   Memcheck:Leak
+   fun:calloc
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.2.5
+}
+
+{
+   glibc_dlclose_alloc
+   Memcheck:Leak
+   fun:calloc
+   fun:_dlerror_run
+   fun:dlclose
+}
+
+{
+   glibc___sha512_crypt_alloc
+   Memcheck:Leak
+   fun:malloc
+   fun:realloc
+   fun:__sha512_crypt
+}


-- 
NSS Wrapper Repository



[SCM] NSS Wrapper Repository - branch master updated

2015-11-20 Thread Michael Adam
The branch, master has been updated
   via  23a7a85 nwrap: Don't leak memory from gethostbyname*() functions
  from  3ddf857 nwrap: Fix the build on FreeBSD

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


- Log -
commit 23a7a85a7688f1c6948db55eacb1101ba808d6db
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 20 09:38:16 2015 +0100

nwrap: Don't leak memory from gethostbyname*() functions

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/nss_wrapper.c | 3 +++
 1 file changed, 3 insertions(+)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index a8c97e1..be977df 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -5577,6 +5577,9 @@ void nwrap_destructor(void)
nwrap_he_global.num = 0;
}
 
+   free(user_addrlist.items);
+   free(user_addrlist2.items);
+
hdestroy();
NWRAP_UNLOCK_ALL;
 }


-- 
NSS Wrapper Repository



[SCM] NSS Wrapper Repository - branch master updated

2015-11-20 Thread Michael Adam
The branch, master has been updated
   via  3ddf857 nwrap: Fix the build on FreeBSD
   via  b2ae3be nwrap: fix a copy and paste error in the destructor.
  from  18c1d17 nwrap: Cleanup shadow  getspnam() memory

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


- Log -
commit 3ddf8573866601088be02df44f0b04300b502058
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 20 08:51:49 2015 +0100

nwrap: Fix the build on FreeBSD

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b2ae3be3ebfece9d59df6f9f945ecff6fb05c586
Author: Michael Adam <ob...@samba.org>
Date:   Fri Nov 20 09:01:01 2015 +0100

nwrap: fix a copy and paste error in the destructor.

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 src/nss_wrapper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 914cd26..a8c97e1 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -5551,6 +5551,7 @@ void nwrap_destructor(void)
nwrap_pw_global.num = 0;
}
 
+#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM)
if (nwrap_sp_global.cache != NULL) {
struct nwrap_cache *c = nwrap_sp_global.cache;
 
@@ -5560,8 +5561,9 @@ void nwrap_destructor(void)
c->fd = -1;
}
 
-   nwrap_he_global.num = 0;
+   nwrap_sp_global.num = 0;
}
+#endif /* defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) */
 
if (nwrap_he_global.cache != NULL) {
struct nwrap_cache *c = nwrap_he_global.cache;


-- 
NSS Wrapper Repository



[SCM] Samba Shared Repository - branch master updated

2015-11-20 Thread Michael Adam
The branch, master has been updated
   via  0111773 samba-tool:provision: fix bug 11600
  from  8fdda6f ctdb-scripts: Drop creation of database directories

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


- Log -
commit 0111773310ea1ef63ab0d7b256f29aa7e27b545b
Author: Rowland Penny <repenny241...@gmail.com>
Date:   Mon Nov 16 16:22:31 2015 +

samba-tool:provision: fix bug 11600

If you join a second DC after changing the name of
the 'Default Domain Policy' or 'Default Domain Controllers
Policy' the join will fail as the search is hardcoded to
these names, this fix changes the search to the objects name.

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

Signed-off-by: Rowland Penny <repenny241...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Sat Nov 21 04:44:58 CET 2015 on sn-devel-104

---

Summary of changes:
 python/samba/provision/__init__.py | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/provision/__init__.py 
b/python/samba/provision/__init__.py
index 953bd0f..b36a7d2 100644
--- a/python/samba/provision/__init__.py
+++ b/python/samba/provision/__init__.py
@@ -276,16 +276,15 @@ def find_provision_key_parameters(samdb, secretsdb, 
idmapdb, paths, smbconf,
 names.domainlevel = int(res6[0]["msDS-Behavior-Version"][0])
 
 # policy guid
-res7 = samdb.search(expression="(displayName=Default Domain Policy)",
+res7 = samdb.search(expression="(name={%s})" % DEFAULT_POLICY_GUID,
 base="CN=Policies,CN=System," + basedn,
 scope=ldb.SCOPE_ONELEVEL, attrs=["cn","displayName"])
 names.policyid = str(res7[0]["cn"]).replace("{","").replace("}","")
 # dc policy guid
-res8 = samdb.search(expression="(displayName=Default Domain Controllers"
-   " Policy)",
-base="CN=Policies,CN=System," + basedn,
-scope=ldb.SCOPE_ONELEVEL,
-attrs=["cn","displayName"])
+res8 = samdb.search(expression="(name={%s})" % DEFAULT_DC_POLICY_GUID,
+base="CN=Policies,CN=System," + basedn,
+scope=ldb.SCOPE_ONELEVEL,
+attrs=["cn","displayName"])
 if len(res8) == 1:
 names.policyid_dc = str(res8[0]["cn"]).replace("{","").replace("}","")
 else:


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-11-19 Thread Michael Adam
The branch, master has been updated
   via  5036c6e build:wafsamba: remove check_orphaned_targets
  from  155eeac lib: Fix memalign_array overflow protection

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


- Log -
commit 5036c6e7447b7ad53886c759a7a3f5c29ae57779
Author: Thomas Nagy <tn...@waf.io>
Date:   Sat Nov 14 15:23:27 2015 +0100

build:wafsamba: remove check_orphaned_targets

The function check_orphaned_targets is not used and has
no specification, so it can be removed safely.

Signed-off-by: Thomas Nagy <tn...@waf.io>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Nov 19 13:10:53 CET 2015 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/samba_deps.py | 19 ---
 1 file changed, 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_deps.py 
b/buildtools/wafsamba/samba_deps.py
index 9e5eab7..6976a9a 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -302,23 +302,6 @@ def check_duplicate_sources(bld, tgt_list):
 
 return True
 
-
-def check_orphaned_targets(bld, tgt_list):
-'''check if any build targets are orphaned'''
-
-target_dict = LOCAL_CACHE(bld, 'TARGET_TYPE')
-
-debug('deps: checking for orphaned targets')
-
-for t in tgt_list:
-if getattr(t, 'samba_used', False):
-continue
-type = target_dict[t.sname]
-if not type in ['BINARY', 'LIBRARY', 'MODULE', 'ET', 'PYTHON']:
-if re.search('^PIDL_', t.sname) is None:
-Logs.warn("Target %s of type %s is unused by any other target" 
% (t.sname, type))
-
-
 def check_group_ordering(bld, tgt_list):
 '''see if we have any dependencies that violate the group ordering
 
@@ -1151,8 +1134,6 @@ def check_project_rules(bld):
 
 debug('deps: project rules stage1 completed')
 
-#check_orphaned_targets(bld, tgt_list)
-
 if not check_duplicate_sources(bld, tgt_list):
 Logs.error("Duplicate sources present - aborting")
 sys.exit(1)


-- 
Samba Shared Repository



[SCM] Samba Website Repository - branch master updated

2015-11-13 Thread Michael Adam
The branch, master has been updated
   via  2dfe26d History: fix text for link to 4.1.21 relnotes
  from  a95eee2 History: fix text for link to 4.2.5 relnotes

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


- Log -
commit 2dfe26db8e95de24bdd0024eb1db43ead85f0d3f
Author: Michael Adam <ob...@samba.org>
Date:   Fri Nov 13 19:14:12 2015 +0100

History: fix text for link to 4.1.21 relnotes

(copy'n'paste error from 4.1.20)

Signed-off-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 history/header_history.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/history/header_history.html b/history/header_history.html
index 927af7f..926ee31 100755
--- a/history/header_history.html
+++ b/history/header_history.html
@@ -17,7 +17,7 @@
samba-4.2.2
samba-4.2.1
samba-4.2.0
-   samba-4.1.20
+   samba-4.1.21
samba-4.1.20
samba-4.1.19
samba-4.1.18


-- 
Samba Website Repository



[SCM] Samba Shared Repository - branch master updated

2015-11-09 Thread Michael Adam
The branch, master has been updated
   via  be670ef ctdb-scripts: Add support for CTDB_DBDIR in tmpfs
   via  f05c6d3 ctdb-scripts: Improve CTDB wrapper shutdown code
   via  3a7c73f ctdb-tests: Fix "setreclock" test
   via  1ed577e ctdb-tests: Fix the name of the "setreclock" test
   via  af26da1 vfs_acl_*: Only sha256 needed
   via  dee23e9 vfs_cap: Fix a warning
   via  9b2a4b1 lib: messages.h references struct iovec
   via  c66592b lib: Move some procid functions out of util.c
   via  f0bfd61 lib: Increase a debuglevel
   via  c526f5f vfs_fruit: Fix a typo
  from  c315fce Fix various spelling errors

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


- Log -
commit be670ef0103878d8d939de5972b567c4db404082
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Oct 23 14:04:04 2015 +1100

ctdb-scripts: Add support for CTDB_DBDIR in tmpfs

The tmpfs is mounted and unmounted by ctdbd_wrapper.  Format is
CTDB_DBDIR=tmpfs:.  The only default for the tmpfs is
mode=700 - to override, specify a different value in .

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>
    
    Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Nov  9 10:58:32 CET 2015 on sn-devel-104

commit f05c6d32cce334d29e373f1e74f0b52cab14409d
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Oct 23 14:04:04 2015 +1100

ctdb-scripts: Improve CTDB wrapper shutdown code

This will make it easier to run things after CTDB is stopped.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3a7c73ff7ba8d66b5e0430c188e8ba0657252cea
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Oct 30 13:06:24 2015 +1100

ctdb-tests: Fix "setreclock" test

1. Waiting for generation to change isn't enough.  It now changes
   early in recovery and reclock might not have been set on all nodes.
   So wait until recovery is complete before checking reclock.

2. Use onnode -p when setting reclock on all nodes.  That will cause
   it to be set quickly on all nodes, to avoid the situation where the
   recovery master is the late in the list and resets the reclock on
   earlier nodes back to the old value.  This shouldn't matter if (1)
   is done but it can't hurt.

    Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 1ed577efa0e99ee55d78a261ffb9c6497701173f
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon Nov 9 11:35:03 2015 +1100

ctdb-tests: Fix the name of the "setreclock" test

It currently claims to test "setrecmaster".

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit af26da1e479c05090023e7066a1dfb0806e14ea4
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Nov 8 11:34:40 2015 +0100

vfs_acl_*: Only sha256 needed

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit dee23e94722e9b5243619711ae10d38820c4fd66
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Nov 8 10:43:59 2015 +0100

vfs_cap: Fix a warning

    clang warns about increased alignment cast. talloc_size does align properly.

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 9b2a4b1fb1d4291cc0b1e9a9f8078eb15f4b8d68
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Nov 2 12:46:35 2015 +0100

lib: messages.h references struct iovec

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c66592bcf75e205fcf8c3c09897f5db4f71824d6
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Nov 6 16:59:44 2015 +0100

    lib: Move some procid functions out of util.c

Including proto.h just for pid_to_procid() is a pain...

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit f0bfd61556f9fce1e7543e96e1c14b730226ee4c
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Nov 6 15:39:45 2015 +0100

lib: Increase a debuglevel

We do this every time when a process exits. If that process has
properly cleaned up after itself, we spit out this message.

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c526f5f28cac1aeda4cbe4ac2d70c0f2e9a65a4d
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Nov 8 10:16:04 2015 +0100

vfs_fruit: Fix a typo
 

[SCM] NSS Wrapper Repository - branch master updated

2015-11-06 Thread Michael Adam
The branch, master has been updated
   via  b10d23b nwrap: Better check service string sanity.
   via  db42fc7 nwrap: Fix memory leak in nwrap_gethostbyname_r()
   via  7cc2b35 nwrap: Fix memory leak in nwrap_files_gethostbyname()
  from  dcc2c37 nwrap: Fix memory leak in nwrap_he_unload()

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


- Log -
commit b10d23be266109e2569b4f814d554fc2b706a2a3
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Tue Oct 13 14:41:14 2015 +0200

nwrap: Better check service string sanity.

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

Patch use strtol() instead of atoi() to convert strings to numbers.
This helps better check sanity of service input string.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit db42fc7286ed2de4b9a3d14ce76ebd55ac5c5d48
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Mon Oct 12 10:36:04 2015 +0200

nwrap: Fix memory leak in nwrap_gethostbyname_r()

Fix reimplements how memory is used.
Results from vector are copied to user provided buf.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit 7cc2b350274a2fbad6aee25fd0374827e34f3a1d
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Oct 8 15:27:47 2015 +0200

nwrap: Fix memory leak in nwrap_files_gethostbyname()

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/nss_wrapper.c | 79 ++-
 1 file changed, 55 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 3496162..21fc108 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -604,6 +604,8 @@ struct nwrap_vector {
 item != NULL; \
 (item) = (vect).items[++iter])
 
+#define nwrap_vector_is_initialized(vector) ((vector)->items != NULL)
+
 static inline bool nwrap_vector_init(struct nwrap_vector *const vector)
 {
if (vector == NULL) {
@@ -3323,10 +3325,16 @@ static int nwrap_files_gethostbyname(const char *name, 
int af,
SAFE_FREE(h_name_lower);
 
/* Always cleanup vector and results */
-   if (!nwrap_vector_init(addr_list)) {
-   NWRAP_LOG(NWRAP_LOG_DEBUG,
- "Unable to initialize memory for addr_list vector");
-   goto no_ent;
+   if (!nwrap_vector_is_initialized(addr_list)) {
+   if (!nwrap_vector_init(addr_list)) {
+   NWRAP_LOG(NWRAP_LOG_DEBUG,
+ "Unable to initialize memory for addr_list 
vector");
+   goto no_ent;
+   }
+   } else {
+   /* When vector is initialized data are valid no more.
+* Quick way how to free vector is: */
+   addr_list->count = 0;
}
 
/* Iterate through results */
@@ -3398,7 +3406,21 @@ static int nwrap_gethostbyname_r(const char *name,
return -1;
}
 
-   memset(buf, '\0', buflen);
+   if (buflen < (addr_list->count * sizeof(void *))) {
+   SAFE_FREE(addr_list->items);
+   SAFE_FREE(addr_list);
+   return ERANGE;
+   }
+
+   /* Copy all to user provided buffer and change
+* pointers in returned structure.
+* +1 is for ending NULL pointer. */
+   memcpy(buf, addr_list->items, (addr_list->count + 1) * sizeof(void *));
+
+   free(addr_list->items);
+   free(addr_list);
+
+   ret->h_addr_list = (char **)buf;
*result = ret;
return 0;
 }
@@ -5055,33 +5077,42 @@ static int nwrap_getaddrinfo(const char *node,
}
 
if (service != NULL && service[0] != '\0') {
-   if (isdigit((int)service[0])) {
-   port = (unsigned short)atoi(service);
-   } else {
-   const char *proto = NULL;
-   struct servent *s;
+   const char *proto = NULL;
+   struct servent *s;
+   char *end_ptr;
+   long sl;
 
-   if (hints->ai_protocol != 0) {
-   struct protoent *pent;
+   errno = 0;
+   sl = strtol(service, _ptr, 10);
 
-   pent = getprotobynumber(hints->ai_protocol);
-   if (pent !=

[SCM] NSS Wrapper Repository - branch master updated

2015-11-05 Thread Michael Adam
The branch, master has been updated
   via  dcc2c37 nwrap: Fix memory leak in nwrap_he_unload()
   via  7a7bf7b nwrap: Rename cont to vector in nwrap_vector_add_item()
   via  c3a8b23 nwrap: Fix memory leak inside nwrap_getaddrinfo()
   via  c0d418c nwrap: Use nwrap_vector_foreach instead of for loop
   via  04fcf29 nwrap: Fix memory leak when getline() is used.
  from  99af0e0 tests: add test for merging with empty vectors left and 
right.

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


- Log -
commit dcc2c378276a9059336d521a4b8f8d1fa64d6368
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Oct 8 15:00:33 2015 +0200

nwrap: Fix memory leak in nwrap_he_unload()

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 7a7bf7bffa7daead410948b6c1e13a0cab3e5de8
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Oct 8 14:09:11 2015 +0200

nwrap: Rename cont to vector in nwrap_vector_add_item()

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c3a8b23e64ad641754e8c09fea407c4370703024
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Oct 8 14:02:56 2015 +0200

nwrap: Fix memory leak inside nwrap_getaddrinfo()

Memory leak was introduced by deep copy code.
Item ai_tmp->ai_addr should not have deep copy.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c0d418ce0b3f494eb09d0d8aff8c965207b80411
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Oct 8 14:00:38 2015 +0200

nwrap: Use nwrap_vector_foreach instead of for loop

Replace for loop by nwrap_vector_foreach in nwrap_lines_unload().

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 04fcf2958abade59e4fb0fe5f8eb0f47cf6ff64b
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Oct 8 11:36:33 2015 +0200

nwrap: Fix memory leak when getline() is used.

getline() allocates memory even if return code is < 0.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/nss_wrapper.c | 35 +++
 1 file changed, 19 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index bf51ec2..3496162 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -622,32 +622,32 @@ static inline bool nwrap_vector_init(struct nwrap_vector 
*const vector)
return true;
 }
 
-static bool nwrap_vector_add_item(struct nwrap_vector *cont, void *const item)
+static bool nwrap_vector_add_item(struct nwrap_vector *vector, void *const 
item)
 {
-   assert (cont != NULL);
+   assert (vector != NULL);
 
-   if (cont->items == NULL) {
-   nwrap_vector_init(cont);
+   if (vector->items == NULL) {
+   nwrap_vector_init(vector);
}
 
-   if (cont->count == cont->capacity) {
+   if (vector->count == vector->capacity) {
/* Items array _MUST_ be NULL terminated because it's passed
 * as result to caller which expect NULL terminated array from 
libc.
 */
-   void **items = realloc(cont->items, sizeof(void *) * 
((cont->capacity * 2) + 1));
+   void **items = realloc(vector->items, sizeof(void *) * 
((vector->capacity * 2) + 1));
if (items == NULL) {
return false;
}
-   cont->items = items;
+   vector->items = items;
 
/* Don't count ending NULL to capacity */
-   cont->capacity *= 2;
+   vector->capacity *= 2;
}
 
-   cont->items[cont->count] = item;
+   vector->items[vector->count] = item;
 
-   cont->count += 1;
-   cont->items[cont->count] = NULL;
+   vector->count += 1;
+   vector->items[vector->count] = NULL;
 
return true;
 }
@@ -928,12 +928,13 @@ static void *_nwrap_load_lib_function(enum nwrap_lib lib, 
const char *fn_name)
 static void nwrap_lines_unload(struct nwrap_cache *const nwrap)
 {
size_t p;
-   for (p = 0; p < nwrap->lines.count; p++) {
+   void *item;
+   nwrap_vector_fo

[SCM] Samba Website Repository - branch master updated

2015-11-04 Thread Michael Adam
The branch, master has been updated
   via  a95eee2 History: fix text for link to 4.2.5 relnotes
  from  0a760eb NEWS[uid_wrapper-1.2.0]: uid_wrapper-1.2.0 has been released

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


- Log -
commit a95eee24fecdddfd9b03320caf88c9448ad29710
Author: Michael Adam <ob...@samba.org>
Date:   Wed Nov 4 13:19:22 2015 +0100

History: fix text for link to 4.2.5 relnotes

Signed-off-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 history/header_history.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/history/header_history.html b/history/header_history.html
index b12fc0a..927af7f 100755
--- a/history/header_history.html
+++ b/history/header_history.html
@@ -11,7 +11,7 @@

samba-4.3.1
samba-4.3.0
-   samba-4.2.4
+   samba-4.2.5
samba-4.2.4
samba-4.2.3
samba-4.2.2


-- 
Samba Website Repository



[SCM] Samba Shared Repository - branch master updated

2015-10-31 Thread Michael Adam
The branch, master has been updated
   via  f30a8a2 s4.torture.smb2/session: Add torture assert for close
   via  e8a2dda s4.torture.smb2/session: Add torture assert for unlink
   via  9582a48 s4.torture.smb2/session : Replace CHECK_STATUS with torture 
macros
  from  9e87465 smbd: Fix/simplify scavenger routines

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


- Log -
commit f30a8a28322b1a83909388f983800f99a8c77c14
Author: Anoop C S <anoo...@redhat.com>
Date:   Mon Oct 26 16:33:11 2015 +0530

s4.torture.smb2/session: Add torture assert for close

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Sat Oct 31 15:52:22 CET 2015 on sn-devel-104

commit e8a2ddafe40f46ca89d699ee770d2b399e87af3f
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Oct 29 20:20:52 2015 +0530

s4.torture.smb2/session: Add torture assert for unlink

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>

commit 9582a484b41b94ec8a6451ac98822d781598eaac
Author: Anoop C S <anoo...@redhat.com>
Date:   Thu Oct 8 19:02:06 2015 +0530

s4.torture.smb2/session : Replace CHECK_STATUS with torture macros

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>

---

Summary of changes:
 source4/torture/smb2/session.c | 235 +++--
 1 file changed, 158 insertions(+), 77 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c
index 798230b..7bb9f64 100644
--- a/source4/torture/smb2/session.c
+++ b/source4/torture/smb2/session.c
@@ -38,14 +38,6 @@
ret = false; \
}} while (0)
 
-#define CHECK_STATUS(status, correct) do { \
-   if (!NT_STATUS_EQUAL(status, correct)) { \
-   torture_result(tctx, TORTURE_FAIL, __location__": Incorrect 
status %s - should be %s", \
-  nt_errstr(status), nt_errstr(correct)); \
-   ret = false; \
-   goto done; \
-   }} while (0)
-
 #define CHECK_CREATED(__io, __created, __attribute)\
do {\
CHECK_VAL((__io)->out.create_action, NTCREATEX_ACTION_ ## 
__created); \
@@ -85,7 +77,8 @@ bool test_session_reconnect1(struct torture_context *tctx, 
struct smb2_tree *tre
 smb2_util_oplock_level("b"));
 
status = smb2_create(tree, mem_ctx, );
-   CHECK_STATUS(status, NT_STATUS_OK);
+   torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+   "smb2_create failed");
_h1 = io1.out.file.handle;
h1 = &_h1;
CHECK_CREATED(, CREATED, FILE_ATTRIBUTE_ARCHIVE);
@@ -105,7 +98,10 @@ bool test_session_reconnect1(struct torture_context *tctx, 
struct smb2_tree *tre
qfinfo.generic.level = RAW_FILEINFO_POSITION_INFORMATION;
qfinfo.generic.in.file.handle = _h1;
status = smb2_getinfo_file(tree, mem_ctx, );
-   CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED);
+   torture_assert_ntstatus_equal_goto(tctx, status,
+  NT_STATUS_USER_SESSION_DELETED,
+  ret, done, "smb2_getinfo_file "
+  "returned unexpected status");
h1 = NULL;
 
smb2_oplock_create_share(, fname,
@@ -113,7 +109,9 @@ bool test_session_reconnect1(struct torture_context *tctx, 
struct smb2_tree *tre
 smb2_util_oplock_level("b"));
 
status = smb2_create(tree2, mem_ctx, );
-   CHECK_STATUS(status, NT_STATUS_OK);
+   torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+   "smb2_create failed");
+
CHECK_CREATED(, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level("b"));
_h2 = io2.out.file.handle;
@@ -168,7 +166,8 @@ bool test_session_reconnect2(struct torture_context *tctx, 
struct smb2_tree *tre
io1.in.create_options |= NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
 
status = smb2_create(tree, mem_ctx, );
-   CHECK_STATUS(status, NT_STATUS_OK);
+   torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+  

[SCM] Samba Shared Repository - branch master updated

2015-10-28 Thread Michael Adam
The branch, master has been updated
   via  f33e618 ctdb-include: Remove unused header file 
include/ctdb_typesafe_cb.h
   via  20b82ea ctdb-include: Remove unused header file include/ctdb.h
  from  2666d06 build:wafsamba: removed most import * statements

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


- Log -
commit f33e618879ae3b154158258c8771478ee2b323ee
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Tue Oct 13 15:36:38 2015 +1100

ctdb-include: Remove unused header file include/ctdb_typesafe_cb.h

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Oct 28 15:59:02 CET 2015 on sn-devel-104

commit 20b82ea28ebf51cd82923f95b7f29aff86079a84
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Tue Oct 13 15:22:57 2015 +1100

ctdb-include: Remove unused header file include/ctdb.h

This was part of libctdb which has been removed.

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Martin Schwenke <mar...@meltin.net>

---

Summary of changes:
 ctdb/include/ctdb.h  | 1236 --
 ctdb/include/ctdb_typesafe_cb.h  |  177 --
 source3/lib/ctdbd_conn.c |1 -
 source3/lib/dbwrap/dbwrap_ctdb.c |1 -
 4 files changed, 1415 deletions(-)
 delete mode 100644 ctdb/include/ctdb.h
 delete mode 100644 ctdb/include/ctdb_typesafe_cb.h


Changeset truncated at 500 lines:

diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h
deleted file mode 100644
index c3da068..000
--- a/ctdb/include/ctdb.h
+++ /dev/null
@@ -1,1236 +0,0 @@
-/*
-   ctdb database library
-
-   Copyright (C) Ronnie sahlberg 2010
-   Copyright (C) Rusty Russell 2010
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _CTDB_H
-#define _CTDB_H
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-/**
- * ctdb - a library for accessing tdbs controlled by ctdbd
- *
- * ctdbd (clustered tdb daemon) is a daemon designed to syncronize TDB
- * databases across a cluster.  Using this library, you can communicate with
- * the daemon to access the databases, pass messages across the cluster, and
- * control the daemon itself.
- *
- * The general API is event-driven and asynchronous: you call the
- * *_send functions, supplying callbacks, then when the ctdbd file
- * descriptor is usable, call ctdb_service() to perform read from it
- * and call your callbacks, which use the *_recv functions to unpack
- * the replies from ctdbd.
- *
- * There is also a synchronous wrapper for each function for trivial
- * programs; these can be found in the section marked "Synchronous API".
- */
-
-/**
- * ctdb_log_fn_t - logging function for ctdbd
- * @log_priv: private (typesafe) arg via ctdb_connect
- * @severity: syslog-style severity
- * @format: printf-style format string.
- * @ap: arguments for formatting.
- *
- * The severity passed to log() are as per syslog(3).  In particular,
- * LOG_DEBUG is used for tracing, LOG_WARNING is used for unusual
- * conditions which don't necessarily return an error through the API,
- * LOG_ERR is used for errors such as lost communication with ctdbd or
- * out-of-memory, LOG_ALERT is used for library usage bugs, LOG_CRIT is
- * used for libctdb internal consistency checks.
- *
- * The log() function can be typesafe: the @log_priv arg to
- * ctdb_donnect and signature of log() should match.
- */
-typedef void (*ctdb_log_fn_t)(void *log_priv,
- int severity, const char *format, va_list ap);
-
-/**
- * ctdb_connect - connect to ctdb using the specified domain socket.
- * @addr: the socket address, or NULL for default
- * @log: the logging function
- * @log_priv: the private argument to the logging function.
- *
- * Returns a ctdb context if successful or NULL.  Use ctdb_disconnect() to
- * release the returned ctdb_connection when finished.
- *
- * See Also:
- * ctdb_log_fn_t, ctdb_

[SCM] Samba Shared Repository - branch master updated

2015-10-28 Thread Michael Adam
The branch, master has been updated
   via  6e3cb6b s4:torture: fix a comment typo.
   via  1466e27 build:wafsamba: Removed hard-coded class names from build 
scripts
  from  6404c07 ldb: Fix a "ignoring return value" warning

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


- Log -
commit 6e3cb6b24ff53453c52251965bcf955e2e59fa37
Author: Michael Adam <ob...@samba.org>
Date:   Wed Oct 28 20:41:33 2015 +0100

s4:torture: fix a comment typo.

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Ralph Boehme <s...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Oct 29 00:42:49 CET 2015 on sn-devel-104

commit 1466e27fa612b0e09e78dea75c65516e76529ff6
Author: Thomas Nagy <tn...@waf.io>
Date:   Wed Oct 28 21:04:28 2015 +0100

build:wafsamba: Removed hard-coded class names from build scripts

Using hard-coded class names prevents subclassing and make it hard
to reason about the workflow. The wscript files read during the build
must be read during the installation phase as well.

Signed-off-by: Thomas Nagy <tn...@waf.io>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 buildtools/wafsamba/samba_utils.py | 7 +++
 source4/torture/basic/misc.c   | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_utils.py 
b/buildtools/wafsamba/samba_utils.py
index f7bb11c..36d3929 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -2,7 +2,7 @@
 # and for SAMBA_ macros for building libraries, binaries etc
 
 import os, sys, re, fnmatch, shlex
-import Build, Options, Utils, Task, Logs
+import Build, Options, Utils, Task, Logs, Configure
 from TaskGen import feature, before
 from Configure import conf, ConfigurationContext
 from Logs import debug
@@ -656,11 +656,10 @@ def PROCESS_SEPARATE_RULE(self, rule):
 You should have file named wscript__rule in the current 
directory
 where stage is either 'configure' or 'build'
 '''
-ctxclass = self.__class__.__name__
 stage = ''
-if ctxclass == 'ConfigurationContext':
+if isinstance(self, Configure.ConfigurationContext):
 stage = 'configure'
-elif ctxclass == 'BuildContext':
+elif isinstance(self, Build.BuildContext):
 stage = 'build'
 file_path = os.path.join(self.curdir, WSCRIPT_FILE+'_'+stage+'_'+rule)
 txt = load_file(file_path)
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index 721727b..98423df 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -234,7 +234,7 @@ bool torture_holdcon(struct torture_context *tctx)
 /*
   open a file N times on the server and just hold them open
   used for testing performance when there are N file handles
-  alopenn
+  open
  */
 bool torture_holdopen(struct torture_context *tctx,
  struct smbcli_state *cli)


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-10-16 Thread Michael Adam
The branch, master has been updated
   via  2bad085 build: Build *_wrapper without -DNDEBUG for in-tree use
   via  8bb44c5 ntlm auth: spelling fixes
   via  7163e08 samba-tool --help: possessive pronoun "its" has no 
apostrophe
   via  6456b06 ctdb-scripts: Lock debugging should print kernel stack for 
process in D state
   via  dfc84fd ctdb-daemon: Change handling of default capabilities
  from  5aab31a ctdb-recovery: Update vnnmap before database recovery

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


- Log -
commit 2bad085305f8ddad5e46a567c63a244362699187
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Aug 10 12:40:13 2015 +1200

build: Build *_wrapper without -DNDEBUG for in-tree use

These binaires are not installed, so are only used in make test,
and there we need debug output.

Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Fri Oct 16 16:36:22 CEST 2015 on sn-devel-104

commit 8bb44c53b49b1131c5d3ff3b3eb0f5c635519fb5
Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
Date:   Thu Oct 1 17:24:02 2015 +1300

ntlm auth: spelling fixes

Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 7163e08caa154b2680eba850c9e6766d1929fb91
Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
Date:   Thu Aug 20 10:00:11 2015 +1200

samba-tool --help: possessive pronoun "its" has no apostrophe

"it's" is reserved for the contraction of "it is".

This *is* somewhat illogical, which is how you know its proper
English.

Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 6456b062948e1e3058c7900ff039016db3421df5
Author: Martin Schwenke <mar...@meltin.net>
Date:   Wed Oct 14 15:06:56 2015 +1100

ctdb-scripts: Lock debugging should print kernel stack for process in D 
state

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

commit dfc84fdd45a9bd763289b4965bc2d0a3e7071ff0
Author: Martin Schwenke <mar...@meltin.net>
Date:   Thu Oct 8 20:25:20 2015 +1100

ctdb-daemon: Change handling of default capabilities

Centrally define all the default capabilities to make the defaults
crystal clear.  Capability-related command-line options now have a
direct correspondence rather than a reverse correspondence.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 ctdb/config/debug_locks.sh| 21 ++---
 ctdb/include/ctdb_protocol.h  |  5 -
 ctdb/server/ctdbd.c   |  8 
 lib/nss_wrapper/wscript   |  1 -
 lib/resolv_wrapper/wscript|  1 -
 lib/socket_wrapper/wscript|  1 -
 lib/uid_wrapper/wscript   |  1 -
 python/samba/netcmd/domain.py |  2 +-
 source4/auth/ntlm/auth_unix.c |  6 +++---
 9 files changed, 30 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/config/debug_locks.sh b/ctdb/config/debug_locks.sh
index 3b66b6a..8e33751 100755
--- a/ctdb/config/debug_locks.sh
+++ b/ctdb/config/debug_locks.sh
@@ -2,7 +2,7 @@
 
 # This script parses /proc/locks and finds the processes that are holding
 # locks on CTDB databases.  For all those processes the script dumps a
-# stack trace using gstack.
+# stack trace.
 #
 # This script can be used only if Samba is configured to use fcntl locks
 # rather than mutex locks.
@@ -56,8 +56,23 @@ loadconfig ctdb
# For each process waiting, log stack trace
for pid in $pids ; do
echo "- Stack trace for PID=$pid -"
-   gstack $pid
-   # gcore -o /var/log/core-deadlock-ctdb $pid
+   read x x state x capabilities = CTDB_CAP_DEFAULT;
-   if (options.no_lmaster == 0) {
-   ctdb->capabilities |= CTDB_CAP_LMASTER;
+   if (options.no_lmaster != 0) {
+   ctdb->capabilities &= ~CTDB_CAP_LMASTER;
}
-   if (options.no_recmaster == 0) {
-   ctdb->capabilities |= CTDB_CAP_RECMASTER;
+   if (options.no_recmaster != 0) {
+   ctdb->capabilities &= ~CTDB_CAP_RECMASTER;
}
if (options.lvs != 0) {
ctdb->capabilities |= CTDB_CAP_LVS;
diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript
index b25b83d.

[SCM] Socket Wrapper Repository - branch master updated

2015-10-14 Thread Michael Adam
The branch, master has been updated
   via  84a4e23 tests: Add test for TCP_NODELAY setsockopt()
   via  96dbeb7 tests: Add test for TCP_NODELAY getsockopt()
   via  1db6130 swrap: Add support for TCP_NODELAY in getsockopt()
   via  e9e0dac swrap: Add support for TCP_NODELAY in setsockopt()
  from  40b1926 Bump version to 1.1.4

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


- Log -
commit 84a4e23728a558984f449610b9e84933acfb0515
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 8 11:02:10 2015 +0200

tests: Add test for TCP_NODELAY setsockopt()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 96dbeb75f78665cf81a4ef8e3842e819043f8d51
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Sep 14 22:07:09 2015 +0200

tests: Add test for TCP_NODELAY getsockopt()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 1db61302b6036bdfabf0e3a1507e0e5573a57368
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Sep 14 22:06:52 2015 +0200

swrap: Add support for TCP_NODELAY in getsockopt()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit e9e0dac6d719304af8174f4b9119709afe71f508
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 8 10:51:02 2015 +0200

swrap: Add support for TCP_NODELAY in setsockopt()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/socket_wrapper.c | 53 
 tests/test_echo_tcp_socket_options.c | 49 +
 2 files changed, 102 insertions(+)


Changeset truncated at 500 lines:

diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 45282ed..aad5f3e 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -248,6 +248,7 @@ struct socket_info
int connected;
int defer_connect;
int pktinfo;
+   int tcp_nodelay;
 
/* The unix path so we can unlink it on close() */
struct sockaddr_un un_addr;
@@ -3350,6 +3351,29 @@ static int swrap_getsockopt(int s, int level, int 
optname,
   optval,
   optlen);
}
+   } else if (level == IPPROTO_TCP) {
+   switch (optname) {
+#ifdef TCP_NODELAY
+   case TCP_NODELAY:
+   /*
+* This enables sending packets directly out over TCP.
+* As a unix socket is doing that any way, report it as
+* enabled.
+*/
+   if (optval == NULL || optlen == NULL ||
+   *optlen < (socklen_t)sizeof(int)) {
+   errno = EINVAL;
+   return -1;
+   }
+
+   *optlen = sizeof(int);
+   *(int *)optval = si->tcp_nodelay;
+
+   return 0;
+#endif /* TCP_NODELAY */
+   default:
+   break;
+   }
}
 
errno = ENOPROTOOPT;
@@ -3388,6 +3412,35 @@ static int swrap_setsockopt(int s, int level, int 
optname,
   optname,
   optval,
   optlen);
+   } else if (level == IPPROTO_TCP) {
+   switch (optname) {
+#ifdef TCP_NODELAY
+   case TCP_NODELAY: {
+   int i;
+
+   /*
+* This enables sending packets directly out over TCP.
+* A unix socket is doing that any way.
+*/
+   if (optval == NULL || optlen == 0 ||
+   optlen < (socklen_t)sizeof(int)) {
+   errno = EINVAL;
+   return -1;
+   }
+
+   i = *discard_const_p(int, optval);
+   if (i != 0 && i != 1) {
+   errno = EINVAL;
+   return -1;
+   }
+   si->tcp_nodelay = i;
+
+   return 0;
+   }
+#endif /* TCP_NODELAY */
+   default:
+   break;
+   }
}
 
switch (si->family) {
diff --git a/tests/test_echo_tcp_socket_options.c 
b/tests/test_echo_tcp_socket_options.c
index f068fb8..dfa46fe 100644
--- a

[SCM] NSS Wrapper Repository - branch master updated

2015-10-12 Thread Michael Adam
The branch, master has been updated
   via  99af0e0 tests: add test for merging with empty vectors left and 
right.
   via  f69f5e6 tests: improve nwrap_vector tests
  from  dff6144 tests: Add missing include for crypt.h in test_shadow

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


- Log -
commit 99af0e0df68f19522d87f0d27f68769ec3af7193
Author: Michael Adam <ob...@samba.org>
Date:   Fri Oct 9 10:16:44 2015 +0200

tests: add test for merging with empty vectors left and right.

Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

commit f69f5e625974175923d8dcfca1eb2e21ab3ddb6e
Author: Michael Adam <ob...@samba.org>
Date:   Fri Oct 9 10:10:44 2015 +0200

tests: improve nwrap_vector tests

Improves ordering and adds some additional checks.

    Signed-off-by: Michael Adam <ob...@samba.org>
Reviewed-by: Andreas Schneider <a...@samba.org>

---

Summary of changes:
 tests/test_nwrap_vector.c | 64 +++
 1 file changed, 54 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tests/test_nwrap_vector.c b/tests/test_nwrap_vector.c
index 4e9f066..26baf01 100644
--- a/tests/test_nwrap_vector.c
+++ b/tests/test_nwrap_vector.c
@@ -21,19 +21,21 @@ static void test_nwrap_vector_basic_add(void **state)
nwrap_vector_add_item(, string);
assert_null(v.items[1]);
assert_int_equal(v.count, 1);
+   assert_string_equal(v.items[0], string);
assert_int_equal(v.capacity, DEFAULT_VECTOR_CAPACITY);
 
assert_string_equal(v.items[0], "string!");
 
nwrap_vector_add_item(, string2);
+   assert_null(v.items[2]);
+   assert_int_equal(v.count, 2);
assert_string_equal(v.items[0], string);
assert_string_equal(v.items[1], string2);
-   assert_null(v.items[2]);
 
free(v.items);
 }
 
-static void test_nwrap_vector_merge(void **state)
+static void test_nwrap_vector_merge_empty(void **state)
 {
struct nwrap_vector v1;
struct nwrap_vector v2;
@@ -44,24 +46,64 @@ static void test_nwrap_vector_merge(void **state)
 
nwrap_vector_init();
assert_non_null(v1.items);
+   assert_int_equal(v1.count, 0);
 
nwrap_vector_init();
assert_non_null(v2.items);
+   assert_int_equal(v2.count, 0);
+
+   nwrap_vector_merge(, );
+   assert_int_equal(v1.count, 0);
+   assert_null(v1.items[0]);
 
nwrap_vector_add_item(, string);
nwrap_vector_add_item(, string2);
+   assert_int_equal(v1.count, 2);
+
+   nwrap_vector_merge(, );
+   assert_int_equal(v1.count, 2);
+   assert_string_equal(v1.items[0], string);
+   assert_string_equal(v1.items[1], string2);
+   assert_null(v1.items[2]);
+
+   nwrap_vector_merge(, );
+   assert_int_equal(v2.count, 2);
+   assert_string_equal(v2.items[0], string);
+   assert_string_equal(v2.items[1], string2);
+   assert_null(v2.items[2]);
 
+   free(v1.items);
+   free(v2.items);
+}
+
+static void test_nwrap_vector_merge(void **state)
+{
+   struct nwrap_vector v1;
+   struct nwrap_vector v2;
+   char string[] = "string!";
+   char string2[] = "2string!";
+
+   (void) state; /* unused */
+
+   nwrap_vector_init();
+   assert_non_null(v1.items);
+   nwrap_vector_add_item(, string);
+   nwrap_vector_add_item(, string2);
+   assert_int_equal(v1.count, 2);
+
+   nwrap_vector_init();
+   assert_non_null(v2.items);
nwrap_vector_add_item(, string2);
nwrap_vector_add_item(, string);
+   assert_int_equal(v2.count, 2);
 
nwrap_vector_merge(, );
-
+   assert_int_equal(v1.count, 4);
assert_string_equal(v1.items[0], string);
assert_string_equal(v1.items[1], string2);
assert_string_equal(v1.items[2], string2);
assert_string_equal(v1.items[3], string);
assert_null(v1.items[4]);
-   assert_int_equal(v1.count, 4);
 
free(v1.items);
free(v2.items);
@@ -80,20 +122,21 @@ static void test_nwrap_vector_merge_max(void **state)
nwrap_vector_init();
assert_non_null(v1.items);
 
-   nwrap_vector_init();
-   assert_non_null(v2.items);
-
for (p = 0; p < 64; ++p) {
nwrap_vector_add_item(, string);
}
-   nwrap_vector_merge(, );
+   assert_int_equal(v1.count, 64);
+
+   nwrap_vector_init();
+   assert_non_null(v2.items);
 
+   nwrap_vector_merge(, );
+   assert_int_equal(v2.count, 64);
for (p = 0; p < 64; ++p) {
assert_string_equal(v2.items[p], string);
}
-   assert_int_equal(v2.count, 64);
-   nwrap_vector_add_item(, string2);

[SCM] NSS Wrapper Repository - branch master updated

2015-10-08 Thread Michael Adam
The branch, master has been updated
   via  dff6144 tests: Add missing include for crypt.h in test_shadow
  from  4f751e2 nwrap: Modify AUTHORS file.

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


- Log -
commit dff6144df484168d27192e9a97ae43ce8136
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Oct 8 11:42:42 2015 +0200

tests: Add missing include for crypt.h in test_shadow

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 tests/test_shadow.c | 2 ++
 1 file changed, 2 insertions(+)


Changeset truncated at 500 lines:

diff --git a/tests/test_shadow.c b/tests/test_shadow.c
index 492fb32..7af120b 100644
--- a/tests/test_shadow.c
+++ b/tests/test_shadow.c
@@ -9,6 +9,8 @@
 #include 
 #include 
 
+#include 
+
 static void test_nwrap_getspent(void **state)
 {
struct spwd *sp;


-- 
NSS Wrapper Repository



[SCM] Samba Shared Repository - branch master updated

2015-10-07 Thread Michael Adam
The branch, master has been updated
   via  6d37cd3 s3:smbd: pass expected_seq_low to smbd_initialize_smb2
  from  9893888 Change the libreadline word-break character set to only 
space, TAB and NL so that we can attempt to do tab completion across 
backslashes.

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


- Log -
commit 6d37cd3d56cac1ac78f25394a72c68191e50e901
Author: Ralph Boehme <s...@samba.org>
Date:   Wed Oct 7 06:55:44 2015 +0100

s3:smbd: pass expected_seq_low to smbd_initialize_smb2

This is in preparation of multi-channel connection passing. This commit
should have been part of 1bb46da.

Signed-off-by: Ralph Boehme <s...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Oct  7 11:29:11 CEST 2015 on sn-devel-104

---

Summary of changes:
 source3/smbd/smb2_server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 7120ce5..29131ea 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -3161,7 +3161,7 @@ void smbd_smb2_process_negprot(struct smbXsrv_connection 
*xconn,
DEBUG(10,("smbd_smb2_first_negprot: packet length %u\n",
 (unsigned int)size));
 
-   status = smbd_initialize_smb2(xconn, 0);
+   status = smbd_initialize_smb2(xconn, expected_seq_low);
if (!NT_STATUS_IS_OK(status)) {
smbd_server_connection_terminate(xconn, nt_errstr(status));
return;


-- 
Samba Shared Repository



[SCM] NSS Wrapper Repository - branch master updated

2015-10-07 Thread Michael Adam
The branch, master has been updated
   via  4f751e2 nwrap: Modify AUTHORS file.
   via  3bf0d8f TESTS: Add new test which checks multithread support.
   via  5dc7e5d nwrap: Add basic locking for support multithreaded 
applications
   via  ffc262d TESTS: Add test for getaddrinfo.
   via  f839fb8 TESTS: Add test_nwrap_gethostbyname_multiple test
   via  c28adab nwrap: Add BSD libc support for gethost*_r functios.
   via  4c956bf nwrap: Use nwrap vectors as memory backend for 
getaddrinfo() and gethostbyname()
   via  f067a6e nwrap: Add string manipulation functions.
   via  8710061 nwrap: Add nwrap_add_hname() and nwrap_add_hname_alias().
   via  449f8d9 nwrap: Add function nwrap_add_ai
   via  0ff0c85 nwrap: Add a hash table to the nwrap structure
   via  6215857 nwrap: Simplify file loading.
   via  69efe68 nwrap: Add nwrap vector memory management functions
  from  827183d tests: Only run shadow test when shadow.h is available

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


- Log -
commit 4f751e256734082f3d4ae4b2dbf35d239840d694
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Mon Mar 30 16:08:25 2015 +0200

nwrap: Modify AUTHORS file.

Assign emails to authors.
Also add me (Robin Hack) as a author.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3bf0d8f63d340a844f6c1510b6eebe35581982e5
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Tue Mar 24 16:45:19 2015 +0100

TESTS: Add new test which checks multithread support.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 5dc7e5dbf725718a34db3dce26cbb5aa67ee4efa
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Tue Mar 24 17:54:34 2015 +0100

nwrap: Add basic locking for support multithreaded applications

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit ffc262d08c16d98f67b0005145b1690ec0b9c4b5
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Mon Mar 30 14:36:29 2015 +0200

TESTS: Add test for getaddrinfo.

Test tries to get multiple and mixed (ipv4 and ipv6) records.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit f839fb8fbd69c0d2614c92b7f852a735912d75bc
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Tue Mar 24 12:03:14 2015 +0100

TESTS: Add test_nwrap_gethostbyname_multiple test

Test cover multiple records support.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit c28adabf78fa8a5f62b7782c5c650db6b8ef361f
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Fri Mar 27 15:51:11 2015 +0100

nwrap: Add BSD libc support for gethost*_r functios.

BSD libc stores data in thread local storage.
    
    Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 4c956bf0c1e79862263ef848e15e0bd70bf72a9f
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Thu Jul 16 16:10:20 2015 +0200

nwrap: Use nwrap vectors as memory backend for getaddrinfo() and 
gethostbyname()

Previous patches introduced nwrap vectors and hash functions.
This patch will join all together.

Main purpose of this patch is:
- support more records per hostname.
  For example: hostname now can have associated IPv4 and IPv6 address.
- better handling of big number of hostname records

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit f067a6e867db3752592f21bba567fb14bfbc174d
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Tue Mar 24 15:14:35 2015 +0100

nwrap: Add string manipulation functions.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewed-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 8710061f0ad45b5956ff98312dbe39ea1984304c
Author: Robin Hack <hack.ro...@gmail.com>
Date:   Wed Jul 15 15:05:28 2015 +0200

nwrap: Add nwrap_add_hname() and nwrap_add_hname_alias().
    
    Functions adds a hostname or an alias to the hash table.

Signed-off-by: Robin Hack <hack.ro...@gmail.com>
Reviewe

[SCM] NSS Wrapper Repository - branch master updated

2015-10-06 Thread Michael Adam
The branch, master has been updated
   via  827183d tests: Only run shadow test when shadow.h is available
   via  d2de6c7 nwrap: Check for setspent and getspnam functions
   via  03dc910 src: Add configure check for shadow.h
  from  0f179c8 tests: Add test for getspnam() function

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


- Log -
commit 827183dde440b3244e766fa680b874ecd4a628c5
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Oct 6 10:53:00 2015 +0200

tests: Only run shadow test when shadow.h is available

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit d2de6c71699c0a2700b2829d296136f619e333eb
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Oct 6 10:34:20 2015 +0200

nwrap: Check for setspent and getspnam functions

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 03dc910bd3c21b34021a6e0836faa2412eb5ea0e
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Oct 6 10:19:48 2015 +0200

src: Add configure check for shadow.h

This is the first part to fix FreeBSD.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 ConfigureChecks.cmake |  4 
 config.h.cmake|  7 +++
 src/nss_wrapper.c | 22 ++
 tests/CMakeLists.txt  | 13 +
 4 files changed, 42 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index b74ed8d..1b6ba01 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -49,6 +49,7 @@ endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2)
 # HEADERS
 check_include_file(sys/types.h HAVE_SYS_TYPES_H)
 check_include_file(pwd.h HAVE_PWD_H)
+check_include_file(shadow.h HAVE_SHADOW_H)
 check_include_file(grp.h HAVE_GRP_H)
 check_include_file(nss.h HAVE_NSS_H)
 check_include_file(nss_common.h HAVE_NSS_COMMON_H)
@@ -62,6 +63,9 @@ check_function_exists(getpwnam_r HAVE_GETPWNAM_R)
 check_function_exists(getpwuid_r HAVE_GETPWUID_R)
 check_function_exists(getpwent_r HAVE_GETPWENT_R)
 
+check_function_exists(setspent HAVE_SETSPENT)
+check_function_exists(getspnam HAVE_GETSPNAM)
+
 check_function_exists(getgrnam_r HAVE_GETGRNAM_R)
 check_function_exists(getgrgid_r HAVE_GETGRGID_R)
 check_function_exists(getgrent_r HAVE_GETGRENT_R)
diff --git a/config.h.cmake b/config.h.cmake
index b94b621..f00c2a4 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -16,6 +16,7 @@
 
 #cmakedefine HAVE_SYS_TYPES_H 1
 #cmakedefine HAVE_PWD_H 1
+#cmakedefine HAVE_SHADOW_H 1
 #cmakedefine HAVE_GRP_H 1
 #cmakedefine HAVE_NSS_H 1
 #cmakedefine HAVE_NSS_COMMON_H 1
@@ -31,6 +32,12 @@
 /* Define to 1 if you have the `getpwent_r' function. */
 #cmakedefine HAVE_GETPWENT_R 1
 
+/* Define to 1 if you have the `setspent' function. */
+#cmakedefine HAVE_SETSPENT 1
+
+/* Define to 1 if you have the `getspnam' function. */
+#cmakedefine HAVE_GETSPNAM 1
+
 /* Define to 1 if you have the `getgrnam_r' function. */
 #cmakedefine HAVE_GETGRNAM_R 1
 
diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index ca57dfb..e985bb3 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -61,7 +61,9 @@
 
 #include 
 #include 
+#ifdef HAVE_SHADOW_H
 #include 
+#endif /* HAVE_SHADOW_H */
 
 #include 
 #include 
@@ -501,6 +503,7 @@ static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, 
char *line);
 static void nwrap_pw_unload(struct nwrap_cache *nwrap);
 
 /* shadow */
+#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM)
 struct nwrap_sp {
struct nwrap_cache *cache;
 
@@ -514,6 +517,7 @@ struct nwrap_sp nwrap_sp_global;
 
 static bool nwrap_sp_parse_line(struct nwrap_cache *nwrap, char *line);
 static void nwrap_sp_unload(struct nwrap_cache *nwrap);
+#endif /* defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) */
 
 /* group */
 struct nwrap_gr {
@@ -1279,6 +1283,7 @@ static void nwrap_init(void)
nwrap_pw_global.cache->unload = nwrap_pw_unload;
 
/* shadow */
+#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM)
nwrap_sp_global.cache = &__nwrap_cache_sp;
 
nwrap_sp_global.cache->path = getenv("NSS_WRAPPER_SHADOW");
@@ -1286,6 +1291,7 @@ static void nwrap_init(void)
nwrap_sp_global.cache->private_data = _sp_global;
nwrap_sp_global.cache->parse_line = nwrap_sp_parse_line;
nwrap_sp_global.cache->unload = nwrap_sp_unload;
+#endif /* defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) */
 
/* group */
nwrap_gr_global.cache = &__nwrap_cache_gr;
@@ -1322,6 +1328,7 @@ bool nss_wrapper_enabled(void)
return true;
 }
 
+#if defi

[SCM] Samba Shared Repository - branch master updated

2015-10-06 Thread Michael Adam
The branch, master has been updated
   via  1bb46da s3:smb3: rename smbd_smb2_first_negprot and pass expected 
seq_low
   via  c0aa94e s3:smbd: add expected_seq_low arg to smbd_initialize_smb2
  from  8de1ed6 s4: fix linking smbtorture on Solaris.

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


- Log -
commit 1bb46dae829d9cd74534669371246ada86b5841a
Author: Ralph Boehme <s...@samba.org>
Date:   Sun Sep 27 02:01:47 2015 +0200

s3:smb3: rename smbd_smb2_first_negprot and pass expected seq_low

This is in preperation of connection passing where we have to set
seq_low to the mid from the negprot we've handed over.

Pair-Programmed-With: Stefan Metzmacher <me...@samba.org>

Signed-off-by: Ralph Boehme <s...@samba.org>
Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>
    
Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Oct  7 00:54:34 CEST 2015 on sn-devel-104

commit c0aa94ece086cb32df1819ef455343e9acb3832b
Author: Ralph Boehme <s...@samba.org>
Date:   Sun Sep 27 01:58:46 2015 +0200

s3:smbd: add expected_seq_low arg to smbd_initialize_smb2

This is in preparation of connection passing for multichannel where we
have to set seq_low to the mid of the passed negprot.

Pair-Programmed-With: Stefan Metzmacher <me...@samba.org>

Signed-off-by: Ralph Boehme <s...@samba.org>
Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 source3/smbd/globals.h  |  5 +++--
 source3/smbd/process.c  |  2 +-
 source3/smbd/smb2_negprot.c |  2 +-
 source3/smbd/smb2_server.c  | 12 +++-
 4 files changed, 12 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index b107049..b567a58 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -226,8 +226,9 @@ NTSTATUS smbd_add_connection(struct smbXsrv_client *client, 
int sock_fd,
 
 void reply_smb2002(struct smb_request *req, uint16_t choice);
 void reply_smb20ff(struct smb_request *req, uint16_t choice);
-void smbd_smb2_first_negprot(struct smbXsrv_connection *xconn,
-const uint8_t *inpdu, size_t size);
+void smbd_smb2_process_negprot(struct smbXsrv_connection *xconn,
+  uint64_t expected_seq_low,
+  const uint8_t *inpdu, size_t size);
 
 DATA_BLOB smbd_smb2_generate_outbody(struct smbd_smb2_request *req, size_t 
size);
 
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 74d34ef..8d9275c 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1893,7 +1893,7 @@ static void process_smb(struct smbXsrv_connection *xconn,
if (smbd_is_smb2_header(inbuf, nread)) {
const uint8_t *inpdu = inbuf + NBT_HDR_SIZE;
size_t pdulen = nread - NBT_HDR_SIZE;
-   smbd_smb2_first_negprot(xconn, inpdu, pdulen);
+   smbd_smb2_process_negprot(xconn, 0, inpdu, pdulen);
return;
} else if (nread >= smb_size && valid_smb_header(inbuf)
&& CVAL(inbuf, smb_com) != 0x72) {
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index 18382a9..c04fbca 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -60,7 +60,7 @@ static void reply_smb20xx(struct smb_request *req, uint16_t 
dialect)
 
req->outbuf = NULL;
 
-   smbd_smb2_first_negprot(req->xconn, smb2_inpdu, len);
+   smbd_smb2_process_negprot(req->xconn, 0, smb2_inpdu, len);
return;
 }
 
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index a53ddf8..7120ce5 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -200,11 +200,12 @@ bool smbd_is_smb2_header(const uint8_t *inbuf, size_t 
size)
return true;
 }
 
-static NTSTATUS smbd_initialize_smb2(struct smbXsrv_connection *xconn)
+static NTSTATUS smbd_initialize_smb2(struct smbXsrv_connection *xconn,
+uint64_t expected_seq_low)
 {
TALLOC_FREE(xconn->transport.fde);
 
-   xconn->smb2.credits.seq_low = 0;
+   xconn->smb2.credits.seq_low = expected_seq_low;
xconn->smb2.credits.seq_range = 1;
xconn->smb2.credits.granted = 1;
xconn->smb2.credits.max = lp_smb2_max_credits();
@@ -3149,8 +3150,9 @@ static NTSTATUS smbd_smb2_request_next_incoming(struct 
smbXsrv_connection *xconn
return NT_STATUS_OK;
 }
 
-void smbd_smb2_first_negprot(struct smbXsrv_co

[SCM] Samba Shared Repository - branch master updated

2015-10-06 Thread Michael Adam
The branch, master has been updated
   via  8de1ed6 s4: fix linking smbtorture on Solaris.
  from  5d7eaf9 vfs_fruit: return value of ad_pack in vfs_fruit.c

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


- Log -
commit 8de1ed6d6e660760483a17f34842979384a655f9
Author: Tom Schulz <sch...@adi.com>
Date:   Mon Oct 5 22:19:49 2015 +0200

s4: fix linking smbtorture on Solaris.

Don't test getgrouplist if we do not have it.

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

Signed-off-by: Tom Schulz <sch...@adi.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Ralph Boehme <s...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Oct  6 19:15:22 CEST 2015 on sn-devel-104

---

Summary of changes:
 source4/torture/local/nss_tests.c | 4 
 1 file changed, 4 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source4/torture/local/nss_tests.c 
b/source4/torture/local/nss_tests.c
index e814dba..2cd6122 100644
--- a/source4/torture/local/nss_tests.c
+++ b/source4/torture/local/nss_tests.c
@@ -698,6 +698,7 @@ static bool test_group_r_cross(struct torture_context *tctx)
return true;
 }
 
+#ifdef HAVE_GETGROUPLIST
 static bool test_getgrouplist(struct torture_context *tctx,
  const char *user,
  gid_t gid,
@@ -732,6 +733,7 @@ static bool test_getgrouplist(struct torture_context *tctx,
 
return true;
 }
+#endif /* HAVE_GETGROUPLIST */
 
 static bool test_user_in_group(struct torture_context *tctx,
   const struct passwd *pwd,
@@ -759,12 +761,14 @@ static bool test_membership_user(struct torture_context 
*tctx,
int g, i;
bool primary_group_had_user_member = false;
 
+#ifdef HAVE_GETGROUPLIST
torture_assert(tctx, test_getgrouplist(tctx,
   pwd->pw_name,
   pwd->pw_gid,
   _groups,
   _user_groups),
   "failed to test getgrouplist");
+#endif /* HAVE_GETGROUPLIST */
 
for (g=0; g < num_user_groups; g++) {
torture_assert(tctx, test_getgrgid(tctx, user_groups[g], NULL),


-- 
Samba Shared Repository



[SCM] NSS Wrapper Repository - branch master updated

2015-10-05 Thread Michael Adam
The branch, master has been updated
   via  0f179c8 tests: Add test for getspnam() function
   via  bb8fa5d nwrap: Add support for getspnam()
   via  857bc98 tests: Add test for (set|get|end)spent functions
   via  b96ecdc nwrap: Add (set|get|end)spent functions
   via  f848d19 nwrap: Add nss_wrapper_shadow_enabled() function
   via  3358c87 nwrap: Add shadow file parser
   via  bf99c1a nwrap: Remove unused struct member in nwrap_main
  from  59cec08 nwrap: Implement nwrap_files_initgroups()

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


- Log -
commit 0f179c86eea00fbbf6b45eb3505297d48110ba73
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Sep 14 18:26:41 2015 +0200

tests: Add test for getspnam() function

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit bb8fa5de6c5e781b3e5cda1f324f615b3e41cfce
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Sep 17 10:39:15 2015 +0200

nwrap: Add support for getspnam()

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 857bc98b3c048a4ff5d2eab6f0cb143fe29c1299
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Sep 17 10:44:30 2015 +0200

tests: Add test for (set|get|end)spent functions

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b96ecdc8f1aaab4269f6bc514a7760ef7f767fcb
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Sep 17 10:38:49 2015 +0200

nwrap: Add (set|get|end)spent functions

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit f848d190a5ac2c798d11f8a035a8edbdd5d7adf3
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Sep 17 10:37:50 2015 +0200

nwrap: Add nss_wrapper_shadow_enabled() function

    Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 3358c87309b5058b6e84c46bdd211e6b1265b361
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Sep 17 10:33:58 2015 +0200

nwrap: Add shadow file parser

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit bf99c1a987d807b9b306af36a8822c181bfe6267
Author: Andreas Schneider <a...@samba.org>
Date:   Thu Sep 17 10:32:46 2015 +0200

nwrap: Remove unused struct member in nwrap_main

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 src/nss_wrapper.c| 454 ++-
 tests/CMakeLists.txt |  13 +-
 tests/passwd.in  |   1 +
 tests/shadow.in  |   2 +
 tests/test_shadow.c  |  71 
 5 files changed, 539 insertions(+), 2 deletions(-)
 create mode 100644 tests/shadow.in
 create mode 100644 tests/test_shadow.c


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index b2b715e..ca57dfb 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -61,6 +61,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -340,6 +341,7 @@ struct nwrap_ops {
 /* Public prototypes */
 
 bool nss_wrapper_enabled(void);
+bool nss_wrapper_shadow_enabled(void);
 bool nss_wrapper_hosts_enabled(void);
 
 /* prototypes for files backend */
@@ -465,7 +467,6 @@ struct nwrap_libc {
 };
 
 struct nwrap_main {
-   const char *nwrap_switch;
int num_backends;
struct nwrap_backend *backends;
struct nwrap_libc *libc;
@@ -484,6 +485,7 @@ struct nwrap_cache {
void (*unload)(struct nwrap_cache *);
 };
 
+/* passwd */
 struct nwrap_pw {
struct nwrap_cache *cache;
 
@@ -498,6 +500,22 @@ struct nwrap_pw nwrap_pw_global;
 static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, char *line);
 static void nwrap_pw_unload(struct nwrap_cache *nwrap);
 
+/* shadow */
+struct nwrap_sp {
+   struct nwrap_cache *cache;
+
+   struct spwd *list;
+   int num;
+   int idx;
+};
+
+struct nwrap_cache __nwrap_cache_sp;
+struct nwrap_sp nwrap_sp_global;
+
+static bool nwrap_sp_parse_line(struct nwrap_cache *nwrap, char *line);
+static void nwrap_sp_unload(struct nwrap_cache *nwrap);
+
+/* group */
 struct nwrap_gr {
struct nwrap_cache *cache;
 
@@ -509,6 +527,7 @@ struct nwrap_gr {
 struct nwrap_cache __nwrap_cache_gr;
 struct nwrap_gr nwrap_gr_global;
 
+/* hosts */
 static bool nwrap_he_parse_line(struct nwrap_cache *nwrap, char *line);
 static void nwrap_he_unload(struct nwrap_cache *nwrap);
 
@@ -1250,6 +1269,7 @@ static void nwrap_init(void)
 
nwrap_backend_init(nwrap_main_glo

[SCM] Samba Shared Repository - branch master updated

2015-09-30 Thread Michael Adam
The branch, master has been updated
   via  00954a9 lib: We can do ACCRIGHTS style fdpassing
   via  0499cee lib: Support fd passing using the 4.3BSD way
   via  f4e06a9 lib: Move some routines around in msghdr.c
   via  2c675aa lib: We only need the fd-passing check once
   via  b191632 lib: Fix the build on Solaris
   via  d9000cb libreplace: Fix the build on Solaris
  from  22c5699 lib: Fix server_id_db_set_exclusive

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


- Log -
commit 00954a975b45cdb0dcf08c25850d2be26efabe48
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Sep 27 00:36:23 2015 +0200

lib: We can do ACCRIGHTS style fdpassing

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

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Oct  1 05:55:42 CEST 2015 on sn-devel-104

commit 0499cee90307d9644271869c86fac2b5401df0e0
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Sep 27 00:54:42 2015 +0200

lib: Support fd passing using the 4.3BSD way

This is required on Solaris

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

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit f4e06a9bce42d60f6c96a21307266a99d2785ae9
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Sep 27 00:46:33 2015 +0200

lib: Move some routines around in msghdr.c

This way we only need one #ifdef for ACCRIGHTS

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

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 2c675aad40e3e0bb412f9fb8558de349ad62860a
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Sep 27 00:35:45 2015 +0200

lib: We only need the fd-passing check once

unix_dgram_send will tell us as well

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

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b191632701c8b5fb8d89109494a2251416bd6a93
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Sep 27 00:58:00 2015 +0200

lib: Fix the build on Solaris
    
Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit d9000cbc944fa58cc7b7bc509ce885d7b5f498af
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Sep 27 00:57:50 2015 +0200

libreplace: Fix the build on Solaris

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 lib/replace/replace.c   |   2 +-
 lib/replace/wscript |   5 ++
 lib/util/time_basic.c   |   2 +-
 source3/lib/msghdr.c| 176 +---
 source3/lib/unix_msg/unix_msg.c |  10 +--
 5 files changed, 137 insertions(+), 58 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 798990a..c9c12a4 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -829,7 +829,7 @@ int rep_clock_gettime(clockid_t clk_id, struct timespec *tp)
struct timeval tval;
switch (clk_id) {
case 0: /* CLOCK_REALTIME :*/
-#ifdef HAVE_GETTIMEOFDAY_TZ
+#if defined(HAVE_GETTIMEOFDAY_TZ) || defined(HAVE_GETTIMEOFDAY_TZ_VOID)
gettimeofday(,NULL);
 #else
gettimeofday();
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 9a8b7f7..0be52f7 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -506,6 +506,11 @@ removeea setea
'int gettimeofday(struct timeval *tv, struct 
timezone *tz)',
define='HAVE_GETTIMEOFDAY_TZ', headers='sys/time.h')
 
+conf.CHECK_C_PROTOTYPE('gettimeofday',
+   'int gettimeofday(struct timeval *tv, void *tz)',
+   define='HAVE_GETTIMEOFDAY_TZ_VOID',
+   headers='sys/time.h')
+
 conf.CHECK_CODE('#include "test/snprintf.c"',
 define="HAVE_C99_VSNPRINTF",
 execute=True,
diff --git a/lib/util/time_basic.c b/lib/util/time_basic.c
index e4b0886..8113bb5 100644
--- a/lib/util/time_basic.c
+++ b/lib/util/time_basic.c
@@ -29,7 +29,7 @@ a gettimeofday wrapper
 **/
 _PUBLIC_ void GetTimeOfDay(struct timeval *tval)
 {
-#ifdef HAVE_GETTIMEOFDAY_TZ
+#if defined(HAVE_GETTIMEOFDAY_TZ) || defined(HAVE_GETTIMEOFDAY_TZ_VOID)
gettimeofday(tval,NULL);
 #else
getti

[SCM] Samba Shared Repository - branch master updated

2015-09-29 Thread Michael Adam
The branch, master has been updated
   via  ae43867 s4-torture: trying to make clusapi resource online/offline 
testing a bit more robust
   via  6ef2d28 s3-rpcclient: protect against empty witness async notify 
messages.
   via  08e260e librpc: properly quote uuids so that wireshark dissectors 
can be built from them.
   via  4827d49 clusapi: remove security.idl dependency from IDL.
   via  71a168e build:wafsamba: Set the default installation prefix for Waf 
1.8
  from  875beef samba-tool: add command to dump dosinfo xattr from a file

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


- Log -
commit ae438675ddabbec7438ec90565d93a7e9ee86f82
Author: Günther Deschner <g...@samba.org>
Date:   Mon Sep 21 19:17:59 2015 +0200

s4-torture: trying to make clusapi resource online/offline testing a bit 
more robust

Guenther

Signed-off-by: Günther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Sep 29 15:00:47 CEST 2015 on sn-devel-104

commit 6ef2d288a7327f356ab4694eca9b554796066257
Author: Günther Deschner <g...@samba.org>
Date:   Mon Sep 14 17:12:58 2015 +0200

s3-rpcclient: protect against empty witness async notify messages.

Guenther

Signed-off-by: Günther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 08e260e3e3e6b0c1266fcd5285e666d089e4e9e0
Author: Günther Deschner <g...@samba.org>
Date:   Mon Sep 28 19:08:58 2015 +0200

librpc: properly quote uuids so that wireshark dissectors can be built from 
them.

Guenther

Signed-off-by: Günther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 4827d49bd2a6a174f6c80c32ebc7b322da3a64c5
Author: Günther Deschner <g...@samba.org>
Date:   Mon Sep 28 00:47:17 2015 +0200

clusapi: remove security.idl dependency from IDL.

Guenther

Signed-off-by: Günther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 71a168eb2bc9df448bab73ae55e2cd8b514b03cd
Author: Thomas Nagy <tn...@waf.io>
Date:   Mon Sep 28 21:47:16 2015 +0200

build:wafsamba: Set the default installation prefix for Waf 1.8

These changes enable the default installation prefix settings to
take effect in both Waf 1.5 and 1.8 with no additional code changes.

Signed-off-by: Thomas Nagy <tn...@waf.io>
Reviewed-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 ctdb/wscript|  2 +-
 librpc/idl/clusapi.idl  |  4 ++--
 librpc/idl/dcom.idl |  2 +-
 librpc/idl/wmi.idl  |  8 
 source3/rpcclient/cmd_witness.c |  5 +
 source3/wscript |  2 +-
 source4/torture/rpc/clusapi.c   | 20 ++--
 wscript |  2 +-
 8 files changed, 29 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/wscript b/ctdb/wscript
index e04891b..eea25e9 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -26,7 +26,7 @@ else:
 version = samba_version.samba_version_file('%s/VERSION' % vdir, vdir, env)
 VERSION = version.STRING.replace('-', '.')
 
-Options.default_prefix = '/usr/local'
+default_prefix = Options.default_prefix = '/usr/local'
 
 samba_dist.DIST_DIRS('''ctdb:. lib/replace:lib/replace lib/talloc:lib/talloc
 lib/tevent:lib/tevent lib/tdb:lib/tdb
diff --git a/librpc/idl/clusapi.idl b/librpc/idl/clusapi.idl
index 42a9ecb..3440047 100644
--- a/librpc/idl/clusapi.idl
+++ b/librpc/idl/clusapi.idl
@@ -1,9 +1,9 @@
-import "security.idl", "winreg.idl", "misc.idl";
+import "winreg.idl", "misc.idl";
 
 #include "idl_types.h"
 
 [
-   uuid(b97db8b2-4c63-11cf-bff6-08002be23f2f),
+   uuid("b97db8b2-4c63-11cf-bff6-08002be23f2f"),
version(3.0),
pointer_default(unique),
endpoint("ncacn_ip_tcp:"),
diff --git a/librpc/idl/dcom.idl b/librpc/idl/dcom.idl
index ff44722..e53d7b8 100644
--- a/librpc/idl/dcom.idl
+++ b/librpc/idl/dcom.idl
@@ -265,7 +265,7 @@ interface IRemUnknown2 : IRemUnknown
 }
 
 [
-   uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
+   uuid("DA23F6DB-6F45-466C-9EED-0B65286F2D78"),
helpstring("ICoffeeMachine Interface"),
pointer_default(unique),
object
diff --git a/librpc/idl/wmi.idl b/librpc/idl/wmi.idl
index 4d428a8..43b7408 100644
--- a/librpc/idl/wmi.idl
+++ b/librpc/idl/wmi.idl
@@ -35,7 +35,7 @@ interface IWbemClassObject : IUnknown
 };
 
 [
-uuid(9A653086-174F-11d2-

[SCM] Samba Shared Repository - branch master updated

2015-09-20 Thread Michael Adam
The branch, master has been updated
   via  b4747b6 s4:torture:smb2:rename: Fix typo in simple_nodelete 
testcase.
   via  25dcdc9 lib/param: fix hiding of FLAG_SYNONYM values
   via  8262ecb build:wafsamba: Use the samba-provided CHECK_CFG method in 
configuration tests
  from  3408591 ctdb-doc: Fix a typo in the definition of CTDB_NODE_ADDRESS

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


- Log -
commit b4747b6364d9c49a3f146800921c44b3c39f59d1
Author: Anubhav Rakshit <anubhav.raks...@gmail.com>
Date:   Wed Sep 16 21:04:12 2015 +0530

s4:torture:smb2:rename: Fix typo in simple_nodelete testcase.

Signed-off-by: Anubhav Rakshit <anubhav.raks...@gmail.com>
Reviewed-by: Michael Adam <ob...@samba.org>
Reviewed-by: Ralph Boehme <s...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Sep 21 04:51:11 CEST 2015 on sn-devel-104

commit 25dcdc92709a46d87125bc454faae7cad43d6b71
Author: Stefan Metzmacher <me...@samba.org>
Date:   Fri Sep 18 18:54:31 2015 +0200

lib/param: fix hiding of FLAG_SYNONYM values

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

Signed-off-by: Stefan Metzmacher <me...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 8262ecb98884cb71a59c6a18252aa632b8cbcc35
Author: Thomas Nagy <tn...@waf.io>
Date:   Sat Sep 12 09:49:41 2015 +0200

build:wafsamba: Use the samba-provided CHECK_CFG method in configuration 
tests

This is for forward compatibility with waf 1.8. All other tests
use CHECK_CFG, but check_cfg was re-introduced for some reason.

Signed-off-by: Thomas Nagy <tn...@waf.io>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 lib/param/loadparm.c  | 89 ++-
 lib/util/wscript_configure|  6 +--
 source3/wscript   |  2 +-
 source4/torture/smb2/rename.c |  2 +-
 4 files changed, 58 insertions(+), 41 deletions(-)
 mode change 100644 => 100755 source4/torture/smb2/rename.c


Changeset truncated at 500 lines:

diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index a0700a9..871d2d9 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2054,22 +2054,28 @@ void lpcfg_dump_globals(struct loadparm_context 
*lp_ctx, FILE *f,
 
fprintf(f, "# Global parameters\n[global]\n");
 
-   for (i = 0; parm_table[i].label; i++)
-   if (parm_table[i].p_class == P_GLOBAL &&
-   (i == 0 || (parm_table[i].offset != parm_table[i - 
1].offset))) {
-   if (!show_defaults) {
-   if (lp_ctx->flags && (lp_ctx->flags[i] & 
FLAG_DEFAULT)) {
-   continue;
-   }
+   for (i = 0; parm_table[i].label; i++) {
+   if (parm_table[i].p_class != P_GLOBAL) {
+   continue;
+   }
 
-   if (is_default(lp_ctx->globals, i)) {
-   continue;
-   }
+   if (parm_table[i].flags & FLAG_SYNONYM) {
+   continue;
+   }
+
+   if (!show_defaults) {
+   if (lp_ctx->flags && (lp_ctx->flags[i] & FLAG_DEFAULT)) 
{
+   continue;
+   }
+
+   if (is_default(lp_ctx->globals, i)) {
+   continue;
}
+   }
 
-   fprintf(f, "\t%s = ", parm_table[i].label);
-   lpcfg_print_parameter(_table[i], 
lpcfg_parm_ptr(lp_ctx, NULL, _table[i]), f);
-   fprintf(f, "\n");
+   fprintf(f, "\t%s = ", parm_table[i].label);
+   lpcfg_print_parameter(_table[i], lpcfg_parm_ptr(lp_ctx, 
NULL, _table[i]), f);
+   fprintf(f, "\n");
}
if (lp_ctx->globals->param_opt != NULL) {
for (data = lp_ctx->globals->param_opt; data;
@@ -2097,34 +2103,45 @@ void lpcfg_dump_a_service(struct loadparm_service * 
pService, struct loadparm_se
fprintf(f, "\n[%s]\n", pService->szService);
 
for (i = 0; parm_table[i].label; i++) {
-   if (parm_table[i].p_class == P_LOCAL &&
-   (*parm_table[i].label != '-') &&
-   (i == 0 || (parm_table[i].offset != parm_table[i - 
1].offset)))
-   {
-   i

[SCM] Samba Shared Repository - branch master updated

2015-09-15 Thread Michael Adam
The branch, master has been updated
   via  3ddd351 ctdb-build: Install pre-built manpages when xsltproc not 
available
   via  f1bb641 ctdb-doc: Update out-of-date documentation for CTDB socket 
options
   via  b933b91 ctdb-scripts: Update important installed files to use 
build-time defaults
   via  56fd37b ctdb-tools: Drop vacuum.log from ctdb_diagnostics
   via  121d1a8 ctdb-scripts: Rename variable CTDB_ETCDIR to CTDB_SYS_ETCDIR
   via  014a1eb ctdb-scripts: CTDB_BASE must be set when including 
functions file
   via  c58d582 ctdb-scripts: Factor out possible creation of rt_tables file
   via  6774676 ctdb-scripts: Move remaining state files into 
CTDB_SCRIPT_VARDIR
   via  3aa11b1 ctdb-scripts: New internal variable CTDB_SCRIPT_VARDIR
   via  d064620 ctdb-scripts: Properly set CTDB_VARDIR in scripts at 
install time
   via  bd77a97 ctdb-build: Add missing manual pages to pre-generate list 
for tarball
   via  36a1473 ctdb-docs: Update "ctdb reloadnodes" documentation
   via  e7a139b ctdb-scripts: Drop internal file-level variables 
referencing $CTDB_VARDIR
   via  143ec9e ctdb-scripts: Drop file removal involving $ctdb_managed_dir
   via  353c27d ctdb-scripts: Drop functions ctdb_checkstatus() and 
ctdb_setstatus()
   via  8c2948e ctdb-scripts: Drop 62.cnfs eventscript
  from  9d49dfa ctdb-scripts: New internal variable 
CTDB_NFS_CALLOUT_STATE_DIR

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


- Log -
commit 3ddd35142ab86de431d00f93de2fb6a2b371317d
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Sep 11 13:08:38 2015 +1000

ctdb-build: Install pre-built manpages when xsltproc not available

At the moment they are not installed at all if xsltproc is not
available.

They can still be filtered to have the paths match what was
configured.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Jose A. Rivera <jar...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>
    
Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Sep 15 11:57:44 CEST 2015 on sn-devel-104

commit f1bb641a3a0f923faa594937db55437caf446343
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon Aug 17 21:09:06 2015 +1000

ctdb-doc: Update out-of-date documentation for CTDB socket options

These still say /tmp/ctdb.socket, which is very out-dated.  Update
with build-time location.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Jose A. Rivera <jar...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit b933b91a0b03969eea73bb986f94e6c1d2e4887c
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon Aug 17 20:47:58 2015 +1000

ctdb-scripts: Update important installed files to use build-time defaults

In this case: ctdbd_wrapper, onnode, ctdb_diagnostics, ctdb.sudoers.
Set sensible defaults from configure options.

Update documentation to match, trying to fix up anything that has been
missed before.

The onnode unit tests need a symlink to the functions file.
The simple integration tests need to set CTDB_BASE and also
need symlinks to functions/nodes.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Jose A. Rivera <jar...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

fixup

Signed-off-by: Martin Schwenke <mar...@meltin.net>

commit 56fd37ba0dc26f14261dee5e12f1dbcddf8b6779
Author: Martin Schwenke <mar...@meltin.net>
Date:   Sat Aug 22 20:14:09 2015 +1000

ctdb-tools: Drop vacuum.log from ctdb_diagnostics

This hasn't existed for a long time.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Jose A. Rivera <jar...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 121d1a8571a36636ba6efda778d01ec8c9d1e671
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon Aug 17 14:12:15 2015 +1000

ctdb-scripts: Rename variable CTDB_ETCDIR to CTDB_SYS_ETCDIR

This variable points to /etc/ by default.

This distinguishes it from the different variable from wscript, which
points to /etc/ctdb/.

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: Jose A. Rivera <jar...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 014a1eb54008fc36890c8bcd4103fbd8053002e2
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon A

[SCM] Samba Shared Repository - branch master updated

2015-09-15 Thread Michael Adam
The branch, master has been updated
   via  4276ec7 Makefile: Add option to list all tests
  from  f54b2f7 ctdb: Fix CID 1324447 Double close

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


- Log -
commit 4276ec7a6c2379a0b906fab8e1dc9c080b3534bc
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Sep 15 16:20:48 2015 +0200

Makefile: Add option to list all tests

This allows you to run 'make testlist' to get a complete list of all our
tests available. You can limit it using 'make testlist TESTS=spoolss' to
only show spoolss tests for example.

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Sep 15 21:57:50 CEST 2015 on sn-devel-104

---

Summary of changes:
 Makefile | 3 +++
 1 file changed, 3 insertions(+)


Changeset truncated at 500 lines:

diff --git a/Makefile b/Makefile
index aa532b6..95681ae 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,9 @@ quicktest:
 randomized-test:
$(WAF) test --random-order $(TEST_OPTIONS)
 
+testlist:
+   $(WAF) test --list $(TEST_OPTIONS)
+
 dist:
touch .tmplock
WAFLOCK=.tmplock $(WAF) dist


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-09-09 Thread Michael Adam
The branch, master has been updated
   via  a44a0c4 libsmb: Fix CID 1034606 Incorrect pointer comparison
   via  b63b53c libsmb: Fix CID 1034605 Incorrect pointer comparison
   via  736397e winbindd: Fix CID 1273310 Remove structurally dead code
  from  76ef9c1 build: line-break deps for 'param' subsystem

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


- Log -
commit a44a0c47cb3d356b164b2f5cb54d6942c33f9d6f
Author: Anoop C S <anoo...@redhat.com>
Date:   Wed Sep 9 06:37:21 2015 +

libsmb: Fix CID 1034606 Incorrect pointer comparison

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Guenther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Wed Sep  9 21:33:49 CEST 2015 on sn-devel-104

commit b63b53c8426195a5f05dfe2b6e23a2f5af232058
Author: Anoop C S <anoo...@redhat.com>
Date:   Wed Sep 9 06:35:15 2015 +

libsmb: Fix CID 1034605 Incorrect pointer comparison

Signed-off-by: Anoop C S <anoo...@redhat.com>
Reviewed-by: Guenther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 736397ec49974599bc038b097567e250cdb60cc6
Author: Anoop C S <anoo...@redhat.com>
Date:   Tue Sep 8 08:21:47 2015 +

winbindd: Fix CID 1273310 Remove structurally dead code

Signed-off-by: Anoop C S <anoo...@redhat.com>
    Reviewed-by: Guenther Deschner <g...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 source3/libsmb/libsmb_printjob.c | 4 ++--
 source3/winbindd/winbindd_cm.c   | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_printjob.c b/source3/libsmb/libsmb_printjob.c
index 62e54f4..813841a 100644
--- a/source3/libsmb/libsmb_printjob.c
+++ b/source3/libsmb/libsmb_printjob.c
@@ -125,7 +125,7 @@ SMBC_print_file_ctx(SMBCCTX *c_file,
}
 
fid1 = f_open1(c_file, fname, O_RDONLY, 0666);
-   if (fid1 < 0) {
+   if (fid1 == NULL) {
DEBUG(3, ("Error, fname=%s, errno=%i\n", fname, errno));
TALLOC_FREE(frame);
return -1;  /* smbc_open sets errno */
@@ -140,7 +140,7 @@ SMBC_print_file_ctx(SMBCCTX *c_file,
}
 
fid2 = f_open_pj2(c_print, printq);
-   if (fid2 < 0) {
+   if (fid2 == NULL) {
 saverr = errno;  /* Save errno */
 smbc_getFunctionClose(c_file)(c_file, fid1);
 errno = saverr;
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 842307f..716fa5a 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -3189,7 +3189,6 @@ static NTSTATUS cm_connect_netlogon_transport(struct 
winbindd_domain *domain,
sec_chan_type = cli_credentials_get_secure_channel_type(creds);
if (sec_chan_type == SEC_CHAN_NULL) {
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
-   goto no_schannel;
}
 
result = rpccli_create_netlogon_creds_with_creds(creds,
@@ -3228,7 +3227,6 @@ static NTSTATUS cm_connect_netlogon_transport(struct 
winbindd_domain *domain,
conn->netlogon_flags = netlogon_creds->negotiate_flags;
TALLOC_FREE(netlogon_creds);
 
- no_schannel:
if (!(conn->netlogon_flags & NETLOGON_NEG_AUTHENTICATED_RPC)) {
if (lp_winbind_sealed_pipes() || lp_require_strong_key()) {
result = NT_STATUS_DOWNGRADE_DETECTED;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-09-08 Thread Michael Adam
The branch, master has been updated
   via  48d4aac fruit: Fix CID 1323186 Dereference before null check
   via  04c8655 dsdb: Fix a confusing parameter
   via  facb11b samdb: Fix CID 1034736 Dereference after null check
   via  6b44ce6 configure: Fix aio_suspend detection
  from  a7b6dd4 libsmbclient: Fix 32-bit problems

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


- Log -
commit 48d4aac563d8980571ae504dd9e63c0620eee4c6
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Sep 8 08:18:02 2015 +0200

fruit: Fix CID 1323186 Dereference before null check

In all other "goto fail;" paths we had already dereferenced fsp,
so the if-statement checking for fsp!=NULL was unnecessary. This
fix gives us an additional error message in case check_aapl fails.

Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Sep  8 13:47:01 CEST 2015 on sn-devel-104

commit 04c86557195a014bd7e872014e6144c100ead0a1
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Sep 8 07:47:55 2015 +0200

dsdb: Fix a confusing parameter

LDB_SCOPE_BASE is 0, so this works, but the corresponding parameter
is "struct ldb_control **controls", so I'd say NULL is more appropriate
here. Fixes a warning I just saw pass by.

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit facb11b61a6cd322c8b4c42ca2caefe0c509c37c
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Sep 8 07:46:35 2015 +0200

samdb: Fix CID 1034736 Dereference after null check

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

commit 6b44ce64242a2f3fe879e59d2337c6801357390b
Author: Timur Bakeyev <ti...@freebsd.org>
Date:   Fri Sep 4 15:03:24 2015 +0200

configure: Fix aio_suspend detection

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

Signed-off-by: Timur Bakeyev <ti...@freebsd.org>
Reviewed-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

---

Summary of changes:
 source3/modules/vfs_fruit.c  | 2 +-
 source3/wscript  | 2 +-
 source4/dsdb/repl/replicated_objects.c   | 2 +-
 source4/dsdb/samdb/ldb_modules/operational.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 21b49f9..c90699f 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -3318,7 +3318,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct 
*handle,
 
status = check_aapl(handle, req, in_context_blobs, out_context_blobs);
if (!NT_STATUS_IS_OK(status)) {
-   return status;
+   goto fail;
}
 
SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data,
diff --git a/source3/wscript b/source3/wscript
index 566adfb..33e36b1 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -563,7 +563,7 @@ return acl_get_perm_np(permset_d, perm);
 conf.CHECK_CODE('struct aiocb a; return aio_return();', 
'HAVE_AIO_RETURN', msg='Checking for aio_return', headers='aio.h', lib='aio rt')
 conf.CHECK_CODE('struct aiocb a; return aio_error();', 
'HAVE_AIO_ERROR', msg='Checking for aio_error', headers='aio.h', lib='aio rt')
 conf.CHECK_CODE('struct aiocb a; return aio_cancel(1, );', 
'HAVE_AIO_CANCEL', msg='Checking for aio_cancel', headers='aio.h', lib='aio rt')
-conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec 
t; return aio_suspend(, 1, );', 'HAVE_AIO_SUSPEND', msg='Checking for 
aio_suspend', headers='aio.h', lib='aio rt')
+conf.CHECK_CODE('const struct aiocb * const a[1]; struct timespec 
t; return aio_suspend(a, 1, );', 'HAVE_AIO_SUSPEND', msg='Checking for 
aio_suspend', headers='aio.h', lib='aio rt')
 if not conf.CONFIG_SET('HAVE_AIO'):
 conf.DEFINE('HAVE_NO_AIO', '1')
 else:
diff --git a/source4/dsdb/repl/replicated_objects.c 
b/source4/dsdb/repl/replicated_objects.c
index 97b8b2a..df880ad 100644
--- a/source4/dsdb/repl/replicated_objects.c
+++ b/source4/dsdb/repl/replicated_objects.c
@@ -902,7 +902,7 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context 
*ldb,
 
ret = ldb_build_mod_req(, ldb, objects,
msg,
-   LDB_SCOPE_BASE,
+   NULL,
NULL,
ldb_op_default_callback,
  

[SCM] Samba Shared Repository - branch master updated

2015-09-08 Thread Michael Adam
The branch, master has been updated
   via  7d84cd6 pam_winbind: Fix a segfault if initialization fails
  from  e7b6990 swrap: Bump version to 1.1.4

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


- Log -
commit 7d84cd6e40024fd361ea21635f7befed40f0e41f
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Sep 8 16:48:08 2015 +0200

pam_winbind: Fix a segfault if initialization fails

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

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Tue Sep  8 21:39:21 CEST 2015 on sn-devel-104

---

Summary of changes:
 nsswitch/pam_winbind.c | 19 ---
 1 file changed, 8 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 1e16741..a2d9f3b 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -2489,7 +2489,7 @@ static int _pam_delete_cred(pam_handle_t *pamh, int flags,
 
retval = _pam_winbind_init_context(pamh, flags, argc, argv, type, );
if (retval) {
-   goto out;
+   return retval;
}
 
_PAM_LOG_FUNCTION_ENTER("_pam_delete_cred", ctx);
@@ -2625,7 +2625,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
retval = _pam_winbind_init_context(pamh, flags, argc, argv,
   PAM_WINBIND_AUTHENTICATE, );
if (retval) {
-   goto out;
+   return retval;
}
 
_PAM_LOG_FUNCTION_ENTER("pam_sm_authenticate", ctx);
@@ -2777,7 +2777,7 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
ret = _pam_winbind_init_context(pamh, flags, argc, argv,
PAM_WINBIND_SETCRED, );
if (ret) {
-   goto out;
+   return ret;
}
 
_PAM_LOG_FUNCTION_ENTER("pam_sm_setcred", ctx);
@@ -2808,8 +2808,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
break;
}
 
- out:
-
_PAM_LOG_FUNCTION_LEAVE("pam_sm_setcred", ctx, ret);
 
TALLOC_FREE(ctx);
@@ -2833,7 +2831,7 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
ret = _pam_winbind_init_context(pamh, flags, argc, argv,
PAM_WINBIND_ACCT_MGMT, );
if (ret) {
-   goto out;
+   return ret;
}
 
_PAM_LOG_FUNCTION_ENTER("pam_sm_acct_mgmt", ctx);
@@ -2929,7 +2927,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
ret = _pam_winbind_init_context(pamh, flags, argc, argv,
PAM_WINBIND_OPEN_SESSION, );
if (ret) {
-   goto out;
+   return ret;
}
 
_PAM_LOG_FUNCTION_ENTER("pam_sm_open_session", ctx);
@@ -2938,7 +2936,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
/* check and create homedir */
ret = _pam_mkhomedir(ctx);
}
- out:
+
_PAM_LOG_FUNCTION_LEAVE("pam_sm_open_session", ctx, ret);
 
TALLOC_FREE(ctx);
@@ -2956,12 +2954,11 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags,
ret = _pam_winbind_init_context(pamh, flags, argc, argv,
PAM_WINBIND_CLOSE_SESSION, );
if (ret) {
-   goto out;
+   return ret;
}
 
_PAM_LOG_FUNCTION_ENTER("pam_sm_close_session", ctx);
 
-out:
_PAM_LOG_FUNCTION_LEAVE("pam_sm_close_session", ctx, ret);
 
TALLOC_FREE(ctx);
@@ -3043,7 +3040,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
ret = _pam_winbind_init_context(pamh, flags, argc, argv,
PAM_WINBIND_CHAUTHTOK, );
if (ret) {
-   goto out;
+   return ret;
}
 
_PAM_LOG_FUNCTION_ENTER("pam_sm_chauthtok", ctx);


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-09-07 Thread Michael Adam
The branch, master has been updated
   via  a7b6dd4 libsmbclient: Fix 32-bit problems
  from  e79877a ctdb-tools: Add dbstatistics to ctdb_diagnostics

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


- Log -
commit a7b6dd4f2f0583e24dff139f6f8e6a707585456d
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Sep 4 16:40:25 2015 +0200

libsmbclient: Fix 32-bit problems

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Mon Sep  7 15:13:08 CEST 2015 on sn-devel-104

---

Summary of changes:
 examples/libsmbclient/teststat.c  | 16 
 examples/libsmbclient/teststat2.c | 16 
 examples/libsmbclient/testutime.c | 16 
 3 files changed, 24 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/teststat.c b/examples/libsmbclient/teststat.c
index f36639e..4084fd0 100644
--- a/examples/libsmbclient/teststat.c
+++ b/examples/libsmbclient/teststat.c
@@ -47,10 +47,10 @@ int main(int argc, char * argv[])
 return 1;
 }
 
-printf("\nSAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-   st.st_mtime, ctime_r(_mtime, m_time),
-   st.st_ctime, ctime_r(_ctime, c_time),
-   st.st_atime, ctime_r(_atime, a_time)); 
+printf("\nSAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+   (long long)st.st_mtime, ctime_r(_mtime, m_time),
+   (long long)st.st_ctime, ctime_r(_ctime, c_time),
+   (long long)st.st_atime, ctime_r(_atime, a_time));
 
 if (pLocalPath != NULL)
 {
@@ -60,10 +60,10 @@ int main(int argc, char * argv[])
 return 1;
 }
 
-printf("LOCAL\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-   st.st_mtime, ctime_r(_mtime, m_time),
-   st.st_ctime, ctime_r(_ctime, c_time),
-   st.st_atime, ctime_r(_atime, a_time)); 
+printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+   (long long)st.st_mtime, ctime_r(_mtime, m_time),
+   (long long)st.st_ctime, ctime_r(_ctime, c_time),
+   (long long)st.st_atime, ctime_r(_atime, a_time));
 }
 
 return 0; 
diff --git a/examples/libsmbclient/teststat2.c 
b/examples/libsmbclient/teststat2.c
index fcd3e30..963cd27 100644
--- a/examples/libsmbclient/teststat2.c
+++ b/examples/libsmbclient/teststat2.c
@@ -47,10 +47,10 @@ static int gettime(const char * pUrl,
 return 1;
 }
 
-printf("SAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-   st.st_mtime, ctime_r(_mtime, m_time),
-   st.st_ctime, ctime_r(_ctime, c_time),
-   st.st_atime, ctime_r(_atime, a_time)); 
+printf("SAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+   (long long)st.st_mtime, ctime_r(_mtime, m_time),
+   (long long)st.st_ctime, ctime_r(_ctime, c_time),
+   (long long)st.st_atime, ctime_r(_atime, a_time));
 
 
 /* check the stat on this file */
@@ -60,10 +60,10 @@ static int gettime(const char * pUrl,
 return 1;
 }
 
-printf("LOCAL\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-   st.st_mtime, ctime_r(_mtime, m_time),
-   st.st_ctime, ctime_r(_ctime, c_time),
-   st.st_atime, ctime_r(_atime, a_time));
+printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+   (long long)st.st_mtime, ctime_r(_mtime, m_time),
+   (long long)st.st_ctime, ctime_r(_ctime, c_time),
+   (long long)st.st_atime, ctime_r(_atime, a_time));
 
 
 return 0;
diff --git a/examples/libsmbclient/testutime.c 
b/examples/libsmbclient/testutime.c
index 2b3c40b..cdbcfec 100644
--- a/examples/libsmbclient/testutime.c
+++ b/examples/libsmbclient/testutime.c
@@ -47,10 +47,10 @@ int main(int argc, char * argv[])
 return 1;
 }
 
-printf("Before\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-   st.st_mtime, ctime_r(_mtime, m_time),
-   st.st_ctime, ctime_r(_ctime, c_time),
-   st.st_atime, ctime_r(_atime, a_time)); 
+printf("Before\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+   (long long)st.st_mtime, ctime_r(_mtime, m_time),
+   (long long)st.st_ctime, ctime_r(_ctime, c_time),
+   (long long)st.st_atime, ctime_r(_atime, a_time));
 
 utimbuf.actime = t; /* unchangable (wont change) */
 utimbuf.modtime = t;/* this one should succeed */
@@ -66,10 +66,10 @@ int

[SCM] Samba Shared Repository - branch master updated

2015-09-03 Thread Michael Adam
The branch, master has been updated
   via  239062a ctdb: Fix a 32-bit problem
  from  e4b0ea1 Fix memory leak in dns resolution during spnego 
authentication using kerberos.

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


- Log -
commit 239062a062bb70c50bf884885b58054c44c9ebf8
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Sep 3 16:25:02 2015 +0200

ctdb: Fix a 32-bit problem

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: Michael Adam <ob...@samba.org>

Autobuild-User(master): Michael Adam <ob...@samba.org>
Autobuild-Date(master): Thu Sep  3 22:12:02 CEST 2015 on sn-devel-104

---

Summary of changes:
 ctdb/server/ctdb_daemon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index ac2db75..563370a 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1083,7 +1083,7 @@ static void ctdb_tevent_trace(enum tevent_trace_point tp,
if (diff.tv_sec > 3) {
DEBUG(DEBUG_ERR,
  ("Handling event took %ld seconds!\n",
-  diff.tv_sec));
+  (long)diff.tv_sec));
}
}
tevent_before_wait_ts = now;
@@ -1095,7 +1095,7 @@ static void ctdb_tevent_trace(enum tevent_trace_point tp,
if (diff.tv_sec > 3) {
DEBUG(DEBUG_CRIT,
  ("No event for %ld seconds!\n",
-  diff.tv_sec));
+  (long)diff.tv_sec));
}
}
tevent_after_wait_ts = now;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2015-08-14 Thread Michael Adam
The branch, master has been updated
   via  e6c8452 libcli: Use iov_buflen in smb2_signing.c
  from  a431828 python:samba/upgrade.py Fix format string syntax in error 
condition

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


- Log -
commit e6c8452093cd169958668543872fd4bc13755240
Author: Volker Lendecke v...@samba.org
Date:   Mon Aug 10 12:02:34 2015 +0200

libcli: Use iov_buflen in smb2_signing.c

This gives us overflow protection.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Fri Aug 14 13:56:49 CEST 2015 on sn-devel-104

---

Summary of changes:
 libcli/smb/smb2_signing.c | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c
index 489e18b..b723554 100644
--- a/libcli/smb/smb2_signing.c
+++ b/libcli/smb/smb2_signing.c
@@ -22,6 +22,7 @@
 #include system/filesys.h
 #include ../libcli/smb/smb_common.h
 #include ../lib/crypto/crypto.h
+#include lib/util/iov_buf.h
 
 NTSTATUS smb2_signing_sign_pdu(DATA_BLOB signing_key,
   enum protocol_types protocol,
@@ -217,7 +218,7 @@ NTSTATUS smb2_signing_encrypt_pdu(DATA_BLOB encryption_key,
uint8_t sig[16];
int i;
size_t a_total;
-   size_t m_total = 0;
+   ssize_t m_total;
union {
struct aes_ccm_128_context ccm;
struct aes_gcm_128_context gcm;
@@ -241,8 +242,10 @@ NTSTATUS smb2_signing_encrypt_pdu(DATA_BLOB encryption_key,
}
 
a_total = SMB2_TF_HDR_SIZE - SMB2_TF_NONCE;
-   for (i=1; i  count; i++) {
-   m_total += vector[i].iov_len;
+
+   m_total = iov_buflen(vector[1], count-1);
+   if (m_total == -1) {
+   return NT_STATUS_BUFFER_TOO_SMALL;
}
 
SSVAL(tf, SMB2_TF_FLAGS, SMB2_TF_FLAGS_ENCRYPTED);
@@ -311,7 +314,7 @@ NTSTATUS smb2_signing_decrypt_pdu(DATA_BLOB decryption_key,
uint8_t sig[16];
int i;
size_t a_total;
-   size_t m_total = 0;
+   ssize_t m_total;
uint32_t msg_size = 0;
union {
struct aes_ccm_128_context ccm;
@@ -336,8 +339,10 @@ NTSTATUS smb2_signing_decrypt_pdu(DATA_BLOB decryption_key,
}
 
a_total = SMB2_TF_HDR_SIZE - SMB2_TF_NONCE;
-   for (i=1; i  count; i++) {
-   m_total += vector[i].iov_len;
+
+   m_total = iov_buflen(vector[1], count-1);
+   if (m_total == -1) {
+   return NT_STATUS_BUFFER_TOO_SMALL;
}
 
flags = SVAL(tf, SMB2_TF_FLAGS);


-- 
Samba Shared Repository



  1   2   3   4   5   6   7   8   9   10   >