autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-24-0619/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-24-0619/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-24-0619/samba.stdout The top commit at the time of the failure was: commit 17dfd8b96bc1750a2f435caa1d208766257346f3 Author: Martin SchwenkeDate: Tue Aug 23 11:49:54 2016 +1000 ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper The current daemons_stop() implementation uses very loose matching to decide which processes to kill if "ctdb shutdown" hasn't worked within 1 second. This can cause ctdbd processes from other test runs to be killed. Instead, use ctdbd_wrapper, which uses the PID file as a last resort. This has the advantage of never killing ctdbd processes from other test runs. However, this also has the obvious consequence that an interrupted test run in one directory can not have its daemons cleaned up from a new test run in a different directory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 23 21:17:46 CEST 2016 on sn-devel-144
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 04126d5 lib/util: Fix format strings and argument data types via b077969 torture: Fix format-nonliteral warning via c1a791e passdb: Fix format-nonliteral warning via 908c068 wibindd: Fix format-nonliteral warning via 5855b03 regedit: Fix format-nonliteral warning via 44baf81 s3-libnet: Fix format-nonliteral warning via 2d47c2b s3-netapi: Fix format-nonliteral warning via 4b4d364 s3-include: Fix format-nonliteral warning via e9b8751 s3-lib: Fix format-nonliteral warning via a47e953 ldb: Fix format-nonliteral warning via 258cf9a lib/util: Fix format-nonliteral warning via b891fea tdb: Fix format-nonliteral warning via 5fb54d4 talloc: Fix format-nonliteral warning via d123085 s3-lib: Remove unused function sprintf_append via a343fbc lib: Remove unused source3/lib/asys via 353cf16 vfs: Remove link to asys_ via 2d484dc vfs: Convert vfs_fsync_send to pthreadpool_tevent via c780adb vfs: Convert vfs_write_send to pthreadpool_tevent via 995d0a2 vfs: Convert vfs_pread_send to pthreadpool_tevent via afb86d3 smbd: Add pthreadpool_tevent to smbd_server_connection via 2e0990f smbtorture3: Add LOCAL-PTHREADPOOL-TEVENT via bbcf220 lib: Add pthreadpool_tevent via d7e5128 lib: add job data to to callback via 5593467 lib: Move pipe signalling to pthreadpool_pipe.c via e47bf91 lib: Use pthreadpool_pipe instead of pthreadpool via fccb5fb lib: Add pthreadpool_pipe via 6935fdd tevent: version 0.9.30 via c7e2cb8 tevent: Use eventfd for signal/thread wakeup via f40c171 tevent: Move a variable declaration into a while block via 2d55883 tevent: Move rundown of the event pipe via 9d2ae47 tevent: Simple test for threaded immediates via 80cd6b7 tevent: reorder tevent_context for cache locality via 110f925 lib: enable threaded immediates in source3 via f6aaece tevent: Add threaded immediate activation via 8a9b8ac tevent: Move the async wakeup pipe to common via c4ef0c8 tevent: Fix a typo via 4771d07 libreplace: Ask for eventfd(2) from 17dfd8b ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 04126d54d5430c5e2fdbbfea58d76b253b81a407 Author: Amitay IsaacsDate: Mon Aug 22 02:53:00 2016 +1000 lib/util: Fix format strings and argument data types BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Aug 24 05:32:15 CEST 2016 on sn-devel-144 commit b077969a72a8010b7fac37102eb1d0c1a2111fc4 Author: Amitay Isaacs Date: Mon Aug 8 17:59:08 2016 +1000 torture: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison commit c1a791e17c6e94c7d33351c420f238b06461a044 Author: Amitay Isaacs Date: Mon Aug 8 17:40:51 2016 +1000 passdb: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison commit 908c068979dc69ae4664a9fa31e2f91ed115b84a Author: Amitay Isaacs Date: Mon Aug 8 14:22:30 2016 +1000 wibindd: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison commit 5855b039ddedd39a81eaf419d771b32e02668cd3 Author: Amitay Isaacs Date: Mon Aug 8 14:21:14 2016 +1000 regedit: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison commit 44baf81e8342349a9131acc5d784e65247ac32a6 Author: Amitay Isaacs Date: Mon Aug 8 14:18:31 2016 +1000 s3-libnet: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Andreas Schneider Reviewed-by: Jeremy Allison commit 2d47c2b7a15ce228a201dfda63455acbff981680 Author:
autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-24-0219/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-24-0219/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-24-0219/samba.stdout The top commit at the time of the failure was: commit 17dfd8b96bc1750a2f435caa1d208766257346f3 Author: Martin SchwenkeDate: Tue Aug 23 11:49:54 2016 +1000 ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper The current daemons_stop() implementation uses very loose matching to decide which processes to kill if "ctdb shutdown" hasn't worked within 1 second. This can cause ctdbd processes from other test runs to be killed. Instead, use ctdbd_wrapper, which uses the PID file as a last resort. This has the advantage of never killing ctdbd processes from other test runs. However, this also has the obvious consequence that an interrupted test run in one directory can not have its daemons cleaned up from a new test run in a different directory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 23 21:17:46 CEST 2016 on sn-devel-144
autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-2219/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-2219/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-2219/samba.stdout The top commit at the time of the failure was: commit 77fae5bcd2da9e920acab0284c90813dda6ad794 Author: Stefan MetzmacherDate: Sun Aug 21 14:37:29 2016 +0200 WHATSNEW: clear the sections for 4.6 The 4.5.x WHATSNEW.txt is maintained in v4-5-test. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Aug 23 16:02:09 CEST 2016 on sn-devel-144
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 17dfd8b ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper via bcb33c4 ctdb-tests: Remove function daemons_start_1() via 3c87868 ctdb-tests: Move local daemon configuration creation into setup_ctdb() via eb38d02 ctdb-tests: Drop attempts to pass arguments to ctdbd on (re)start via fd443b8 ctdb-tests: Drop function _ctdb_hack_options() from 77fae5b WHATSNEW: clear the sections for 4.6 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 17dfd8b96bc1750a2f435caa1d208766257346f3 Author: Martin SchwenkeDate: Tue Aug 23 11:49:54 2016 +1000 ctdb-tests: Reimplement daemons_stop() using ctdbd_wrapper The current daemons_stop() implementation uses very loose matching to decide which processes to kill if "ctdb shutdown" hasn't worked within 1 second. This can cause ctdbd processes from other test runs to be killed. Instead, use ctdbd_wrapper, which uses the PID file as a last resort. This has the advantage of never killing ctdbd processes from other test runs. However, this also has the obvious consequence that an interrupted test run in one directory can not have its daemons cleaned up from a new test run in a different directory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Tue Aug 23 21:17:46 CEST 2016 on sn-devel-144 commit bcb33c46dfe3d6c06eb6b3b5e7f8625538772d5e Author: Martin Schwenke Date: Tue Aug 23 11:07:25 2016 +1000 ctdb-tests: Remove function daemons_start_1() This function doesn't do anything significant, so just unroll the body into the loop in daemons_start(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit 3c87868d208de8928e25db1dd34266830f017a07 Author: Martin Schwenke Date: Tue Aug 23 10:59:25 2016 +1000 ctdb-tests: Move local daemon configuration creation into setup_ctdb() These files don't need to be re-generated on every restart. They can be generated once when CTDB is first started. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit eb38d02eb77dd654c8ed79fe985f738431918c9f Author: Martin Schwenke Date: Tue Aug 23 10:23:56 2016 +1000 ctdb-tests: Drop attempts to pass arguments to ctdbd on (re)start This is not used. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs commit fd443b8cce4dedfe9a72f25e955274f66da41290 Author: Martin Schwenke Date: Tue Aug 23 10:20:51 2016 +1000 ctdb-tests: Drop function _ctdb_hack_options() It does something special if the --start-as-stopped option is given and is not used in any tests. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12170 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- Summary of changes: ctdb/tests/scripts/integration.bash | 18 + ctdb/tests/simple/scripts/local_daemons.bash | 104 +++ 2 files changed, 45 insertions(+), 77 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash index 12deb75..b2a3451 100644 --- a/ctdb/tests/scripts/integration.bash +++ b/ctdb/tests/scripts/integration.bash @@ -524,20 +524,8 @@ wait_until_node_has_some_ips () ### -_ctdb_hack_options () -{ -local ctdb_options="$*" - -case "$ctdb_options" in - *--start-as-stopped*) - export CTDB_START_AS_STOPPED="yes" -esac -} - restart_ctdb_1 () { -_ctdb_hack_options "$@" - if [ -e /etc/redhat-release ] ; then service ctdb restart else @@ -548,7 +536,7 @@ restart_ctdb_1 () # Restart CTDB on all nodes. Override for local daemons. _restart_ctdb_all () { -onnode -p all $CTDB_TEST_WRAPPER restart_ctdb_1 "$@" +onnode -p all $CTDB_TEST_WRAPPER restart_ctdb_1 } # Nothing needed for a cluster. Override for local daemons. @@ -559,8 +547,6 @@ setup_ctdb () restart_ctdb () { -# "$@" is passed to restart_ctdb_all. - echo -n "Restarting CTDB" if $ctdb_test_restart_scheduled ; then echo -n "
autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1819/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1819/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1819/samba.stdout The top commit at the time of the failure was: commit bad738cbc47c19e95e000650f6459f034c96fc60 Author: Volker LendeckeDate: Sun Aug 21 17:46:16 2016 +0200 messaging_dgm: Fix signed/unsigned hickups Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 23 10:46:17 CEST 2016 on sn-devel-144
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via f43d383 swrap: remove ununsed members from struct swrap. via 17cfdc6 swrap: Add test case to validate oldfd = newfd case in dup2() via 04dacf2 swrap: Treat the case of fd == newfd correctly in dup2() from 3eee8df swrap: Delay addition of child socket_info_fd into socket_info list https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit f43d3835451a5271c4e5ec22f321a8120b40d1df Author: Michael AdamDate: Fri Aug 19 13:34:50 2016 +0200 swrap: remove ununsed members from struct swrap. These were used in removed swrap_init(). Pair-Programmed-With: Anoop C S Signed-off-by: Michael Adam Signed-off-by: Anoop C S Reviewed-by: Andreas Schneider commit 17cfdc6a6568f0dbc34d863ad2d80acaed15a6ad Author: Anoop C S Date: Mon Aug 22 19:37:47 2016 +0530 swrap: Add test case to validate oldfd = newfd case in dup2() Signed-off-by: Anoop C S Reviewed-by: Michael Adam Reviewed-by: Andreas Schneider commit 04dacf2d2e764eb9fd0791642893b4e1bc199ef0 Author: Michael Adam Date: Tue Aug 16 10:59:40 2016 +0200 swrap: Treat the case of fd == newfd correctly in dup2() Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Michael Adam Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- Summary of changes: src/socket_wrapper.c | 15 ++- tests/CMakeLists.txt | 1 + tests/test_tcp_dup2.c | 50 ++ 3 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 tests/test_tcp_dup2.c Changeset truncated at 500 lines: diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 00518c1..6c4ae3b 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -413,11 +413,6 @@ struct swrap { void *libc_handle; void *libsocket_handle; - bool initialised; - bool enabled; - - char *socket_dir; - struct swrap_libc_fns fns; }; @@ -5186,6 +5181,16 @@ static int swrap_dup2(int fd, int newfd) return libc_dup2(fd, newfd); } + if (fd == newfd) { + /* +* According to the manpage: +* +* "If oldfd is a valid file descriptor, and newfd has the same +* value as oldfd, then dup2() does nothing, and returns newfd." +*/ + return newfd; + } + if (find_socket_info(newfd)) { /* dup2() does an implicit close of newfd, which we * need to emulate */ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index aecf6b8..9b5c4bf 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -21,6 +21,7 @@ target_link_libraries(${TORTURE_LIBRARY} set(SWRAP_TESTS test_ioctl test_tcp_listen +test_tcp_dup2 test_echo_tcp_socket test_echo_tcp_connect test_echo_tcp_bind diff --git a/tests/test_tcp_dup2.c b/tests/test_tcp_dup2.c new file mode 100644 index 000..fd6adc2 --- /dev/null +++ b/tests/test_tcp_dup2.c @@ -0,0 +1,50 @@ +#include "torture.h" + +#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_dup2_existing_open_fd(void **state) +{ + int s, dup_s; + + (void) state; /* unused */ + + s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + assert_int_not_equal(s, -1); + + /* +* Here we try to duplicate the existing socket fd to itself +* and as per man page for dup2() it must return the already +* open fd without any failure. +*/ + dup_s = dup2(s, s); + assert_int_equal(dup_s, s); + + close(s); +} + +int main(void) { + int rc; + + const struct CMUnitTest tcp_dup2_tests[] = { + cmocka_unit_test(test_dup2_existing_open_fd), + }; + + rc = cmocka_run_group_tests(tcp_dup2_tests, setup, teardown); + + return rc; +} -- Socket Wrapper Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 77fae5b WHATSNEW: clear the sections for 4.6 from bad738c messaging_dgm: Fix signed/unsigned hickups https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 77fae5bcd2da9e920acab0284c90813dda6ad794 Author: Stefan MetzmacherDate: Sun Aug 21 14:37:29 2016 +0200 WHATSNEW: clear the sections for 4.6 The 4.5.x WHATSNEW.txt is maintained in v4-5-test. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Aug 23 16:02:09 CEST 2016 on sn-devel-144 --- Summary of changes: WHATSNEW.txt | 310 +-- 1 file changed, 2 insertions(+), 308 deletions(-) Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 25da528..6b96cae 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,337 +1,31 @@ Release Announcements = -This is the first preview release of Samba 4.5. This is *not* +This is the first preview release of Samba 4.6. This is *not* intended for production environments and is designed for testing purposes only. Please report any defects via the Samba bug reporting system at https://bugzilla.samba.org/. -Samba 4.5 will be the next version of the Samba suite. +Samba 4.6 will be the next version of the Samba suite. UPGRADING = -NTLMv1 authentication disabled by default -- - -In order to improve security we have changed -the default value for the "ntlm auth" option from -"yes" to "no". This may have impact on very old -client which doesn't support NTLMv2 yet. - -The primary user of NTLMv1 is MSCHAPv2 for VPNs and 802.1x. - -By default Samba will only allow NTLMv2 via NTLMSSP now, -as we have the following default "lanman auth = no", -"ntlm auth = no" and "raw NTLMv2 auth = no". - NEW FEATURES/CHANGES -Support for LDAP_SERVER_NOTIFICATION_OID - - -The ldap server has support for the LDAP_SERVER_NOTIFICATION_OID -control. This can be used to monitor the active directory database -for changes. - -KCC improvements for sparse network replication - -The Samba KCC will now be the default knowledge consistency checker in -Samba AD. Instead of using full mesh replication between every DC, the -KCC will set up connections to optimize replication latency and cost -(using site links to calculate the routes). This change should allow -larger domains to function significantly better in terms of replication -traffic and the time spent performing DRS replication. - -VLV - Virtual List View - -The VLV Control allows applications to page the LDAP directory in the -way you might expect a live phone book application to operate, without -first downloading the entire directory. - -DRS Replication for the AD DC -- - -DRS Replication in Samba 4.5 is now much more efficient in handling -linked attributes, particularly in large domains with over 1000 group -memberships or other links. - -Replication is also much more reliable in the handling of tree -renames, such as the rename of an organizational unit containing many -users. Extensive tests have been added to ensure this code remains -reliable, particularly in the case of conflicts between objects added -with the same name on different servers. - -Schema updates are also handled much more reliably. - -samba-tool drs replicate with new options -- - -samba-tool drs replicate got two new options: - -The option '--local-online' will do the DsReplicaSync() via IRPC -to the local dreplsrv service. - -The option '--async-op' will add DRSUAPI_DRS_ASYNC_OP to the -DsReplicaSync(), which won't wait for the replication result. - -replPropertyMetaData Changes - - -During the development of the DRS replication, tests showed that Samba -stores the replPropertyMetaData object incorrectly. To address this, -be aware that dbcheck will now detect and offer to fix all objects in -the domain for this error. - -Linked attributes on deleted objects - - -In Active Directory, an object that has been tombstoned or recycled -has no linked attributes. However, Samba incorrectly maintained such -links, slowing replication and run-time performance. dbcheck now -offers to remove such links, and they are no longer kept after the -object is tombstoned or recycled. - -Improved AD DC performance --- - -Many other improvements have been made to our LDAP database layer in -the AD
autobuild[sn-devel-144]: intermittent test failure detected
The autobuild test system (on sn-devel-144) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-144/2016-08-23-1600/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-144/2016-08-23-1600/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-144/2016-08-23-1600/samba.stdout The top commit at the time of the failure was: commit bad738cbc47c19e95e000650f6459f034c96fc60 Author: Volker LendeckeDate: Sun Aug 21 17:46:16 2016 +0200 messaging_dgm: Fix signed/unsigned hickups Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 23 10:46:17 CEST 2016 on sn-devel-144
autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1422/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1422/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1422/samba.stdout The top commit at the time of the failure was: commit bad738cbc47c19e95e000650f6459f034c96fc60 Author: Volker LendeckeDate: Sun Aug 21 17:46:16 2016 +0200 messaging_dgm: Fix signed/unsigned hickups Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 23 10:46:17 CEST 2016 on sn-devel-144
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bad738c messaging_dgm: Fix signed/unsigned hickups from 8aa9712 s4-torture: Enable tests for printer driver info level 8 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bad738cbc47c19e95e000650f6459f034c96fc60 Author: Volker LendeckeDate: Sun Aug 21 17:46:16 2016 +0200 messaging_dgm: Fix signed/unsigned hickups Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 23 10:46:17 CEST 2016 on sn-devel-144 --- Summary of changes: source3/lib/messages_dgm.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c index 744e273..3aa110c 100644 --- a/source3/lib/messages_dgm.c +++ b/source3/lib/messages_dgm.c @@ -76,7 +76,10 @@ static int messaging_dgm_lockfile_create(struct messaging_dgm_context *ctx, ret = snprintf(lockfile_name.buf, sizeof(lockfile_name.buf), "%s/%u", ctx->lockfile_dir.buf, (unsigned)pid); - if (ret >= sizeof(lockfile_name.buf)) { + if (ret < 0) { + return errno; + } + if ((unsigned)ret >= sizeof(lockfile_name.buf)) { return ENAMETOOLONG; } @@ -272,7 +275,7 @@ static int messaging_dgm_context_destructor(struct messaging_dgm_context *c) ret = snprintf(name.buf, sizeof(name.buf), "%s/%u", c->lockfile_dir.buf, (unsigned)c->pid); - if (ret >= sizeof(name.buf)) { + if ((ret < 0) || ((size_t)ret >= sizeof(name.buf))) { /* * We've checked the length when creating, so this * should never happen @@ -312,7 +315,10 @@ int messaging_dgm_send(pid_t pid, dst_pathlen = snprintf(dst.sun_path, sizeof(dst.sun_path), "%s/%u", ctx->socket_dir.buf, (unsigned)pid); - if (dst_pathlen >= sizeof(dst.sun_path)) { + if (dst_pathlen < 0) { + return errno; + } + if ((size_t)dst_pathlen >= sizeof(dst.sun_path)) { return ENAMETOOLONG; } @@ -381,7 +387,10 @@ int messaging_dgm_get_unique(pid_t pid, uint64_t *unique) ret = snprintf(lockfile_name.buf, sizeof(lockfile_name.buf), "%s/%u", ctx->lockfile_dir.buf, (int)pid); - if (ret >= sizeof(lockfile_name.buf)) { + if (ret < 0) { + return errno; + } + if ((size_t)ret >= sizeof(lockfile_name.buf)) { return ENAMETOOLONG; } @@ -408,13 +417,19 @@ int messaging_dgm_cleanup(pid_t pid) len = snprintf(socket_name.buf, sizeof(socket_name.buf), "%s/%u", ctx->socket_dir.buf, (unsigned)pid); - if (len >= sizeof(socket_name.buf)) { + if (len < 0) { + return errno; + } + if ((size_t)len >= sizeof(socket_name.buf)) { return ENAMETOOLONG; } len = snprintf(lockfile_name.buf, sizeof(lockfile_name.buf), "%s/%u", ctx->lockfile_dir.buf, (unsigned)pid); - if (len >= sizeof(lockfile_name.buf)) { + if (len < 0) { + return errno; + } + if ((size_t)len >= sizeof(lockfile_name.buf)) { return ENAMETOOLONG; } @@ -485,7 +500,7 @@ int messaging_dgm_wipe(void) */ continue; } - if (pid == our_pid) { + if ((pid_t)pid == our_pid) { /* * fcntl(F_GETLK) will succeed for ourselves, we hold * that lock ourselves. -- Samba Shared Repository
autobuild[sn-devel-104]: intermittent test failure detected
The autobuild test system (on sn-devel-104) has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1018/flakey.log The samba build logs are available here: http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1018/samba.stderr http://git.samba.org/autobuild.flakey.sn-devel-104/2016-08-23-1018/samba.stdout The top commit at the time of the failure was: commit 8aa97126a896e9cc208ccaa7bb5ae388fd8d8298 Author: Andreas SchneiderDate: Thu Aug 18 10:30:21 2016 +0200 s4-torture: Enable tests for printer driver info level 8 Pair-Programmed-With: Guenther Deschner Signed-off-by: Andreas Schneider Signed-off-by: Guenther Deschner Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 23 05:00:13 CEST 2016 on sn-devel-144