[SCM] Socket Wrapper Repository - branch master updated

2014-06-02 Thread Andreas Schneider
The branch, master has been updated
   via  23b4fa4 tests: Fix conflicting variable name on Solaris.
   via  52eabf4 tests: Fix building without bindresvport().
  from  9e91b00 tests: add new test test_bind_ipv4_addr_in_use()

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


- Log -
commit 23b4fa4519a128773cd99d85e3aa7288f08bbbd3
Author: Andreas Schneider a...@samba.org
Date:   Mon Jun 2 08:36:49 2014 +0200

tests: Fix conflicting variable name on Solaris.

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

commit 52eabf4b886135d8ace300b5e7f29b26c86a7c01
Author: Andreas Schneider a...@samba.org
Date:   Mon Jun 2 08:30:50 2014 +0200

tests: Fix building without bindresvport().

This fixes the build on Solaris.

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

---

Summary of changes:
 tests/test_echo_tcp_bind.c |   23 +++
 1 files changed, 15 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tests/test_echo_tcp_bind.c b/tests/test_echo_tcp_bind.c
index c699b06..d42679a 100644
--- a/tests/test_echo_tcp_bind.c
+++ b/tests/test_echo_tcp_bind.c
@@ -40,7 +40,7 @@ static void test_bind_ipv4(void **state)
socklen_t salen = sizeof(struct sockaddr);
struct sockaddr_in sin;
socklen_t slen = sizeof(struct sockaddr_in);
-   struct sockaddr_un sun;
+   struct sockaddr_un addr_un;
socklen_t sulen = sizeof(struct sockaddr_un);
int rc;
int s;
@@ -110,10 +110,10 @@ static void test_bind_ipv4(void **state)
assert_int_equal(rc, -1);
assert_int_equal(errno, EAFNOSUPPORT);
 
-   sun = (struct sockaddr_un) {
+   addr_un = (struct sockaddr_un) {
.sun_family = AF_UNIX,
};
-   rc = bind(s, (struct sockaddr *)sun, sulen);
+   rc = bind(s, (struct sockaddr *)addr_un, sulen);
assert_int_equal(rc, -1);
assert_int_equal(errno, EAFNOSUPPORT);
 
@@ -308,6 +308,7 @@ static void test_bind_ipv4_addr_in_use(void **state)
close(s);
 }
 
+#ifdef HAVE_BINDRESVPORT
 static void test_bindresvport_ipv4(void **state)
 {
struct sockaddr_in sin;
@@ -367,6 +368,7 @@ static void test_bindresvport_ipv4_null(void **state)
 
close(s);
 }
+#endif /* HAVE_BINDRESVPORT */
 
 #ifdef HAVE_IPV6
 static void test_bind_on_ipv6_sock(void **state)
@@ -375,7 +377,7 @@ static void test_bind_on_ipv6_sock(void **state)
socklen_t slen = sizeof(struct sockaddr_in);
struct sockaddr_in6 sin6;
socklen_t slen6 = sizeof(struct sockaddr_in6);
-   struct sockaddr_un sun;
+   struct sockaddr_un addr_un;
socklen_t sulen = sizeof(struct sockaddr_un);
int rc;
int s;
@@ -385,9 +387,9 @@ static void test_bind_on_ipv6_sock(void **state)
s = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
assert_return_code(s, errno);
 
-   ZERO_STRUCT(sun);
-   sun.sun_family = AF_UNIX;
-   rc = bind(s, (struct sockaddr *)sun, sulen);
+   ZERO_STRUCT(addr_un);
+   addr_un.sun_family = AF_UNIX;
+   rc = bind(s, (struct sockaddr *)addr_un, sulen);
assert_int_equal(rc, -1);
/* FreeBSD uses EINVAL here... */
assert_true(errno == EAFNOSUPPORT || errno == EINVAL);
@@ -417,6 +419,7 @@ static void test_bind_on_ipv6_sock(void **state)
close(s);
 }
 
+#ifdef HAVE_BINDRESVPORT
 static void test_bindresvport_on_ipv6_sock(void **state)
 {
struct sockaddr_in sin;
@@ -456,7 +459,7 @@ static void test_bindresvport_on_ipv6_sock_null(void 
**state)
 
close(s);
 }
-
+#endif /* HAVE_BINDRESVPORT */
 #endif /* HAVE_IPV6 */
 
 int main(void) {
@@ -469,22 +472,26 @@ int main(void) {
unit_test_setup_teardown(test_bind_ipv4_addr_in_use,
 setup_echo_srv_tcp_ipv4,
 teardown),
+#ifdef HAVE_BINDRESVPORT
unit_test_setup_teardown(test_bindresvport_ipv4,
 setup_echo_srv_tcp_ipv4,
 teardown),
unit_test_setup_teardown(test_bindresvport_ipv4_null,
 setup_echo_srv_tcp_ipv4,
 teardown),
+#endif /* HAVE_BINDRESVPORT */
 #ifdef HAVE_IPV6
unit_test_setup_teardown(test_bind_on_ipv6_sock,
 setup_echo_srv_tcp_ipv6,
 teardown),
+#ifdef HAVE_BINDRESVPORT
unit_test_setup_teardown(test_bindresvport_on_ipv6_sock,
 setup_echo_srv_tcp_ipv6,
 teardown),
 

[SCM] UID Wrapper Repository - branch master updated

2014-06-02 Thread Michael Adam
The branch, master has been updated
   via  80932d7 uwrap: Add logging if uwrap is enabled correctly.
   via  a4d3db5 uwrap: Log error if we are out of memory.
   via  135582e uwrap: Add a better logging function.
   via  334c562 cmake: Check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.
  from  690da04 uwrap: Fall back to RTLD_NEXT if we can't find libc.

http://gitweb.samba.org/?p=uid_wrapper.git;a=shortlog;h=master


- Log -
commit 80932d786bdf8ce6f8e4fb1f6b09f1252caba302
Author: Andreas Schneider a...@samba.org
Date:   Fri May 30 15:52:19 2014 +0200

uwrap: Add logging if uwrap is enabled correctly.

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

commit a4d3db55d723048ad07e76a3365b7500ad3262a5
Author: Andreas Schneider a...@samba.org
Date:   Fri May 30 15:52:00 2014 +0200

uwrap: Log error if we are out of memory.

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

commit 135582e8e9230ae0bfb0f99e3e549ec9e29c8183
Author: Andreas Schneider a...@samba.org
Date:   Fri May 30 15:44:39 2014 +0200

uwrap: Add a better logging function.

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

commit 334c562f100fb0bd007ee5461e0fef299ff768b4
Author: Andreas Schneider a...@samba.org
Date:   Fri May 30 15:59:17 2014 +0200

cmake: Check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.

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

---

Summary of changes:
 ConfigureChecks.cmake |7 
 config.h.cmake|1 +
 src/uid_wrapper.c |   88 +---
 3 files changed, 90 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 123128f..899d905 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -143,6 +143,13 @@ int main(void) {
 return 0;
 } HAVE_DESTRUCTOR_ATTRIBUTE)
 
+check_c_source_compiles(
+void log_fn(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
+
+int main(void) {
+return 0;
+} HAVE_FUNCTION_ATTRIBUTE_FORMAT)
+
 # SYSTEM LIBRARIES
 
 check_library_exists(dl dlopen  HAVE_LIBDL)
diff --git a/config.h.cmake b/config.h.cmake
index 0e67b23..840b5d4 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -58,6 +58,7 @@
 
 #cmakedefine HAVE_GCC_THREAD_LOCAL_STORAGE 1
 #cmakedefine HAVE_DESTRUCTOR_ATTRIBUTE 1
+#cmakedefine HAVE_FUNCTION_ATTRIBUTE_FORMAT 1
 
 /*** ENDIAN */
 
diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c
index e9c7d5a..f53aa47 100644
--- a/src/uid_wrapper.c
+++ b/src/uid_wrapper.c
@@ -49,11 +49,12 @@
 #define DESTRUCTOR_ATTRIBUTE
 #endif /* HAVE_DESTRUCTOR_ATTRIBUTE */
 
-#ifdef NDEBUG
-#define UWRAP_DEBUG(...)
+/* GCC have printf type attribute check. */
+#ifdef HAVE_FUNCTION_ATTRIBUTE_FORMAT
+#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b)))
 #else
-#define UWRAP_DEBUG(...) fprintf(stderr, __VA_ARGS__)
-#endif
+#define PRINTF_ATTRIBUTE(a,b)
+#endif /* HAVE_FUNCTION_ATTRIBUTE_FORMAT */
 
 #define UWRAP_DLIST_ADD(list,item) do { \
if (!(list)) { \
@@ -90,6 +91,70 @@
 #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); (x)=NULL;} } while(0)
 #endif
 
+/*
+ * LOGGING
+ */
+
+enum uwrap_dbglvl_e {
+   UWRAP_LOG_ERROR = 0,
+   UWRAP_LOG_WARN,
+   UWRAP_LOG_DEBUG,
+   UWRAP_LOG_TRACE
+};
+
+#ifdef NDEBUG
+# define UWRAP_LOG(...)
+#else /* NDEBUG */
+static void uwrap_log(enum uwrap_dbglvl_e dbglvl, const char *format, ...) 
PRINTF_ATTRIBUTE(2, 3);
+# define UWRAP_LOG(dbglvl, ...) uwrap_log((dbglvl), __VA_ARGS__)
+
+static void uwrap_log(enum uwrap_dbglvl_e dbglvl, const char *format, ...)
+{
+   char buffer[1024];
+   va_list va;
+   const char *d;
+   unsigned int lvl = 0;
+
+   d = getenv(UID_WRAPPER_DEBUGLEVEL);
+   if (d != NULL) {
+   lvl = atoi(d);
+   }
+
+   va_start(va, format);
+   vsnprintf(buffer, sizeof(buffer), format, va);
+   va_end(va);
+
+   if (lvl = dbglvl) {
+   switch (dbglvl) {
+   case UWRAP_LOG_ERROR:
+   fprintf(stderr,
+   UWRAP_ERROR(%d): %s\n,
+   (int)getpid(), buffer);
+   break;
+   case UWRAP_LOG_WARN:
+   fprintf(stderr,
+   UWRAP_WARN(%d): %s\n,
+   (int)getpid(), buffer);
+   break;
+   case UWRAP_LOG_DEBUG:
+   

autobuild: intermittent test failure detected

2014-06-02 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2014-06-02-1336/flakey.log

The samba build logs are available here:

   http://git.samba.org/autobuild.flakey/2014-06-02-1336/samba.stderr
   http://git.samba.org/autobuild.flakey/2014-06-02-1336/samba.stdout
  
The top commit at the time of the failure was:

commit 51077c6be665fb95c0ba06f5878a08503bf311df
Author: Stefan Metzmacher me...@samba.org
Date:   Fri May 23 12:30:21 2014 +0200

s3:smb2_server: call smbd_smb2_flush_send_queue() directly

This avoids recursion into smbd_smb2_io_handler(),
which avoids confusion when analysing out put of
performance analysing tools, e.g. callgrind.

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Sat May 31 04:25:36 CEST 2014 on sn-devel-104


[SCM] Socket Wrapper Repository - annotated tag socket_wrapper-1.1.0 created

2014-06-02 Thread Andreas Schneider
The annotated tag, socket_wrapper-1.1.0 has been created
at  4db7ba03497bba39bf53ebfe8ddeb21aa884a7fd (tag)
   tagging  3a05064e3c3161560ad6bb67c1d4e07a1a1bdce1 (commit)
  replaces  socket_wrapper-1.0.2
 tagged by  Andreas Schneider
on  Mon Jun 2 14:47:06 2014 +0200

- Log -
socket_wrapper-1.1.0
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAABCgAGBQJTjHJTAAoJEH7g/E3MAU49rGAQAJR8PG3cWq5oRzYrqjLnurpJ
7iQ06VVLqQ5qrB58K5nULcj81nt385HHGQjucbC3pwQwOo8fZZbL4IGS1kmC6fdp
K2qDRt5oCuBr8Cvz28PIzNJrBiJ+D9z86e9MKzc+X6hmn4q9tDacJ/IP5oXCXs2Q
ohINGqIrEBVhcOHL4zG/urL6CDwKJ+HaXPGn/6ovgTaGsERsB/gXmEoeqQEH0Ys4
I1WRnFBZRSx9zl9ayu6vy7pUd4bPLXKxLS9oGO/RPpcMl5IwCIHDUcqIisNvqqC5
wcvfnTDwxoMKAQjXjA5tz8MfmUM85XYSPHxz/I520tsjbzCHF28qivZaNn8KCLNe
LHhsQGcaKf5mBSXf3QajP5hHKa+DSUr1yAUfblUxMHXVjj9IUMU6LW14i8uo0+Ka
ZzAs4lHRY/oSHG/s02obqIKhgmjdIlINie9peL3flbknIAIGVAx8+EnY5uybuFsa
7IHQwxlfU+T+6q/j/QmWeQjJs9mkCVuC/Qy5z4nklb1xA6n/JMAUIwfy+BAKJWeQ
BIxKiuCb6YJaaP+Fi9jPAVI+HHczfy9KTD5H4NJDZ0Ur0Po5h1XiAI7veEkptma1
f82jOlyEUea42nPYZvLOfIsh8AFCgLEW9e4ykclOchPRmJP3V+yYoxfhRpeTeoRe
x88jeV3+759lBai0FHYL
=Ba9o
-END PGP SIGNATURE-

Andreas Schneider (47):
  swrap: Correctly set the bind iface address on connect().
  tests: Add test to verify that the binded iface address is correct.
  cmake: Build swrap with _GNU_SOURCE.
  cmake: Add check for HAVE_STRUCT_IN6_PKTINFO.
  swrap: Add IP_PKTINFO support in setsockopt.
  swrap: Add swrap_msghdr_add_cmsghdr().
  swrap: Add swrap_msghdr_add_pktinfo().
  swrap: Add swrap_msghdr_socket_info().
  swrap: Call swrap_msghdr_socket_info in swrap_recvmsg_after().
  swrap: Process control messages in recvmsg().
  tests: Add support to receive IP_PKTINFO in echo_srv.
  tests: Add support to sending IP_PKTINFO in echo_srv.
  swrap: Truncate the address if the buffer is to small.
  tests: Add test for different length passed to get(sock|peer)name.
  cmake: Require cmocka versin 0.4.1.
  cmake: Fix a typo in socket_wrapper-config.cmake.in.
  cmake: Add some warnings were we should error out.
  tests: Fix assert_sockaddr_equal() file and line output.
  swrap: Silence a warning on OpenIndiana.
  swrap: Check if the in_pktinfo structure is available.
  echo_srv: Fix building on OpenIndiana.
  swrap: Implement support for IP_RECVDSTADDR on BSD.
  echo_srv: Implement support for IP_RECVDSTADDR on BSD.
  swrap: Add swrap_sendmsg_filter_cmsghdr().
  swrap: Add swrap_sendmsg_copy_cmsg().
  swrap: Add swrap_sendmsg_filter_cmsg_socket().
  swrap: Add swrap_msghdr_filter_cmsg_pktinfo().
  swrap: Call swrap_msghdr_filter_cmsghdr in swrap_sendmsg_before().
  echo_srv: Add support for IP_SENDSRCADDR.
  swrap: Support more socket options in getsockopt().
  tests: Add more tests for socket options.
  swrap: We need to pass a pointer-pointer to not leak memory.
  swrap: Make sure cmbuf is not NULL.
  tests: Fix possible format string attack.
  echo_srv: Write pidfile after we setup the listeners.
  torture: Wait for the pidfile and then start the tests.
  swrap: Setup myname in swrap_socket() for getsockname().
  tests: Add test that getsockname is correct after socket().
  swrap: Add missing family check in bind().
  tests: Add tests for bind().
  swrap: Add support for bindresvport().
  tests: Add tests for bindresvport().
  tests: Avoid using getenv() to retrieve the path.
  Update the todo list.
  tests: Fix building without bindresvport().
  tests: Fix conflicting variable name on Solaris.
  Bump version to 1.1.0.

Michael Adam (10):
  Add README.install - instructions for building and installing.
  README.install: improvements and fixes.
  swrap: add check for rpc/rpc.h - needed on freebsd for bindresvport
  swrap: extend input checks in swrap_bind()
  swrap: fix AF_UNSPEC special case in swrap_bind()
  swrap: implement check_addr_port_in_use()
  swrap: check whether an address:port is already in use in swrap_bind()
  tests: greatly extend the ipv4 bind test
  tests: extend the ipv6 bind test
  tests: add new test test_bind_ipv4_addr_in_use()

Pino Toscano (2):
  swrap: use LIBC_SO from GNU libc, if available
  swrap: Properly cache the handle also in LIBC_SO case.

---


-- 
Socket Wrapper Repository


[SCM] Socket Wrapper Repository - branch master updated

2014-06-02 Thread Andreas Schneider
The branch, master has been updated
   via  3a05064 Bump version to 1.1.0.
  from  23b4fa4 tests: Fix conflicting variable name on Solaris.

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


- Log -
commit 3a05064e3c3161560ad6bb67c1d4e07a1a1bdce1
Author: Andreas Schneider a...@samba.org
Date:   Mon Jun 2 14:39:04 2014 +0200

Bump version to 1.1.0.

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

---

Summary of changes:
 CMakeLists.txt |6 +++---
 ChangeLog  |   11 +++
 2 files changed, 14 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e346e6..307103c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,8 +7,8 @@ cmake_minimum_required(VERSION 2.8.5)
 set(APPLICATION_NAME ${PROJECT_NAME})
 
 set(APPLICATION_VERSION_MAJOR 1)
-set(APPLICATION_VERSION_MINOR 0)
-set(APPLICATION_VERSION_PATCH 2)
+set(APPLICATION_VERSION_MINOR 1)
+set(APPLICATION_VERSION_PATCH 0)
 
 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.0.2)
+set(LIBRARY_VERSION 0.1.0)
 set(LIBRARY_SOVERSION 0)
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
diff --git a/ChangeLog b/ChangeLog
index 2bb84e9..7b3ed53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
 ChangeLog
 ==
 
+version 1.0.3 (released 2014-06-02)
+  * Added support for IP_PKTINFO in recvmsg().
+  * Added support for IPV6_PKTINFO in recvmsg().
+  * Added support for IP_RECVDSTADDR in recvmsg() on BSD.
+  * Added support for more socket options in getsockopt().
+  * Added support for bindresvport().
+  * Fixed rebinding on connect().
+  * Fixed sockaddr buffer truncation in getsockname() and getpeername().
+  * Fixed special cases in bind().
+  * Fixed loading libc on some platforms.
+
 version 1.0.2 (released 2014-05-05)
   * Fixed memory leaks
   * Fixed calling open from libc.


-- 
Socket Wrapper Repository


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

2014-06-02 Thread Karolin Seeger
The branch, v4-1-test has been updated
   via  814b88c printing: fix purge of all print jobs
   via  af13e3e s3: smb2: Move from using SBVAL to put NTTIMEs on the wire 
to put_long_date_timespec.
   via  f3fd95f s3: smb2: Move from using SBVAL to put NTTIMEs on the wire 
to put_long_date_timespec.
  from  bb0871c bug #10609: CVE-2014-0239 Don't reply to replies

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-test


- Log -
commit 814b88cfc176436169700b597e576143a735c22b
Author: David Disseldorp dd...@samba.org
Date:   Wed May 21 21:55:58 2014 +0200

printing: fix purge of all print jobs

The incorrect (system) jobid is currently passed to the job deletion
function.

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

Reported-by: Franz Pförtsch franz.pfoert...@brose.com
Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org
(cherry picked from commit efb4684a3fc0b32a71eab013000f730e6b144a67)

Autobuild-User(v4-1-test): Karolin Seeger ksee...@samba.org
Autobuild-Date(v4-1-test): Mon Jun  2 19:06:43 CEST 2014 on sn-devel-104

commit af13e3e0a5d198e33ca0d104593e84b910ffc0af
Author: Jeremy Allison j...@samba.org
Date:   Wed May 21 11:57:16 2014 -0700

s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to 
put_long_date_timespec.

put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.

Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.

The previous SMB2 create code missed the round_timespec()
call before marshalling.

Bug 3124 - xcopy /d with samba shares works not as aspected

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

which is a regression from a long-ago bug with
SMB1.

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

commit f3fd95f621845c71c6dcf997e162f6b91574a55f
Author: Jeremy Allison j...@samba.org
Date:   Wed May 21 11:31:44 2014 -0700

s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to 
put_long_date_timespec.

put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.

The smb2_close() code being modified already did this by
hand, and so this doesn't change any of the functionality, only
makes the SMB2 code match all of the other server
code in Samba. Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.

Not following the put_long_date_timespec()
convention in the SMB2 create code caused the
round_timespec() step to have been missed in
that code - thus bug:

Bug 3124 - xcopy /d with samba shares works not as aspected

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

which is a regression from a long-ago bug with
SMB1.

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

---

Summary of changes:
 source3/printing/printing.c |   23 +++--
 source3/smbd/smb2_close.c   |  127 +++
 source3/smbd/smb2_create.c  |   85 +++--
 3 files changed, 119 insertions(+), 116 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index b126bd5..52d24dc 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -3373,13 +3373,28 @@ WERROR print_queue_purge(const struct auth_session_info 
*server_info,
if ( can_job_admin )
become_root();
 
-   for (i=0;injobs;i++) {
-   bool owner = is_owner(server_info, lp_const_servicename(snum),
- queue[i].sysjob);
+   for (i = 0; i  njobs; i++) {
+   struct tdb_print_db *pdb;
+   int jobid;
+   bool owner;
+   pdb = get_print_db_byname(lp_const_servicename(snum));
+   if (pdb == NULL) {
+   DEBUG(1, (failed to find printdb for %s\n,
+ lp_const_servicename(snum)));
+   continue;
+   }
+   jobid = sysjob_to_jobid_pdb(pdb, queue[i].sysjob);
+   if (jobid == (uint32_t)-1) {
+   DEBUG(2, (jobid for system job %d not found\n,
+ queue[i].sysjob));
+   

autobuild: intermittent test failure detected

2014-06-02 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2014-06-03-0025/flakey.log

The samba build logs are available here:

   http://git.samba.org/autobuild.flakey/2014-06-03-0025/samba.stderr
   http://git.samba.org/autobuild.flakey/2014-06-03-0025/samba.stdout
  
The top commit at the time of the failure was:

commit 51077c6be665fb95c0ba06f5878a08503bf311df
Author: Stefan Metzmacher me...@samba.org
Date:   Fri May 23 12:30:21 2014 +0200

s3:smb2_server: call smbd_smb2_flush_send_queue() directly

This avoids recursion into smbd_smb2_io_handler(),
which avoids confusion when analysing out put of
performance analysing tools, e.g. callgrind.

Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Sat May 31 04:25:36 CEST 2014 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2014-06-02 Thread Michael Adam
The branch, master has been updated
   via  6a0ebc4 s3:messaging: protect use of msg_control with 
HAVE_STRUCT_MSGHDR_MSG_CONTROL
   via  65a6c31 build: rename HAVE_MSGHDR_MSG_ACCTRIGHTS to 
HAVE_STRUCT_MSGHDR_MSG_ACCTRIGHTS
   via  86be491 build: rename HAVE_MSGHDR_MSG_CONTROL to 
HAVE_STRUCT_MSGHDR_MSG_CONTROL
   via  abedc71 vfs:aio_fork: simplify checking of MSG_CONTROL and 
MSG_ACCTRIGHTS
  from  51077c6 s3:smb2_server: call smbd_smb2_flush_send_queue() directly

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


- Log -
commit 6a0ebc45968e65fa65cb23582d109531733e8a0e
Author: Michael Adam ob...@samba.org
Date:   Sat May 31 12:16:08 2014 +0200

s3:messaging: protect use of msg_control with HAVE_STRUCT_MSGHDR_MSG_CONTROL

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 Jun  3 01:14:17 CEST 2014 on sn-devel-104

commit 65a6c31d9d6467bf23875daa5bab8135f7b1d347
Author: Michael Adam ob...@samba.org
Date:   Sat May 31 12:05:50 2014 +0200

build: rename HAVE_MSGHDR_MSG_ACCTRIGHTS to 
HAVE_STRUCT_MSGHDR_MSG_ACCTRIGHTS

for consistency.

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

commit 86be491912811502fa29720128341f91a38266c1
Author: Michael Adam ob...@samba.org
Date:   Sat May 31 12:04:05 2014 +0200

build: rename HAVE_MSGHDR_MSG_CONTROL to HAVE_STRUCT_MSGHDR_MSG_CONTROL

So that we are consistent with the socket_wrapper define.

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

commit abedc7116e8a096398e3f8e07b03ba832088e014
Author: Michael Adam ob...@samba.org
Date:   Sat May 31 11:58:01 2014 +0200

vfs:aio_fork: simplify checking of MSG_CONTROL and MSG_ACCTRIGHTS

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

---

Summary of changes:
 source3/lib/unix_msg/unix_msg.c |4 
 source3/modules/vfs_aio_fork.c  |   23 +++
 source3/wscript |6 +++---
 3 files changed, 18 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c
index bcabd28..602ecc6 100644
--- a/source3/lib/unix_msg/unix_msg.c
+++ b/source3/lib/unix_msg/unix_msg.c
@@ -244,8 +244,10 @@ static void unix_dgram_recv_handler(struct poll_watch *w, 
int fd, short events,
msg = (struct msghdr) {
.msg_iov = iov,
.msg_iovlen = 1,
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
.msg_control = NULL,
.msg_controllen = 0,
+#endif
};
 
received = recvmsg(fd, msg, 0);
@@ -509,8 +511,10 @@ static int unix_dgram_send(struct unix_dgram_ctx *ctx, 
const char *dst_sock,
msg.msg_namelen = sizeof(addr);
msg.msg_iov = discard_const_p(struct iovec, iov);
msg.msg_iovlen = iovlen;
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
msg.msg_control = NULL;
msg.msg_controllen = 0;
+#endif
msg.msg_flags = 0;
 
ret = sendmsg(ctx-sock, msg, 0);
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index dc33031..97ec1cd 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -27,6 +27,10 @@
 #include lib/async_req/async_sock.h
 #include lib/util/tevent_unix.h
 
+#if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)  
!defined(HAVE_STRUCT_MSGHDR_MSG_ACCTRIGHTS)
+# error Can not pass file descriptors
+#endif
+
 #undef recvmsg
 
 #ifndef MAP_FILE
@@ -150,11 +154,13 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, 
int *recvfd)
struct msghdr msg;
struct iovec iov[1];
ssize_t n;
-#ifndef HAVE_MSGHDR_MSG_CONTROL
+#ifndef HAVE_STRUCT_MSGHDR_MSG_CONTROL
int newfd;
-#endif
 
-#ifdef HAVE_MSGHDR_MSG_CONTROL
+   msg.msg_accrights = (caddr_t) newfd;
+   msg.msg_accrightslen = sizeof(int);
+#else
+
union {
  struct cmsghdrcm;
  char  control[CMSG_SPACE(sizeof(int))];
@@ -163,13 +169,6 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, 
int *recvfd)
 
msg.msg_control = control_un.control;
msg.msg_controllen = sizeof(control_un.control);
-#else
-#if HAVE_MSGHDR_MSG_ACCTRIGHTS
-   msg.msg_accrights = (caddr_t) newfd;
-   msg.msg_accrightslen = sizeof(int);
-#else
-#error Can not pass file descriptors
-#endif
 #endif
 
msg.msg_name = NULL;
@@ -185,7 +184,7 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, 
int *recvfd)
return(n);
}
 
-#ifdef HAVE_MSGHDR_MSG_CONTROL
+#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
if ((cmptr