The branch, master has been updated via eace58b539a s3:waf: Fix the detection of makdev() macro on Linux via e1ba84a5f22 s3:torture: Improve the debug message output via 9b1d79a5dd5 s3:torture: Move the init of the locking out of the loop via 16331870eed s3:smbd: Make clear that we got a suicide packet via 3eee4394cb6 libcli: Use a define for the SMB_SUICIDE_PACKET from 261ef9d5b62 dbcheck: fix the err_empty_attribute() check
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit eace58b539a382c61edd7c2be6fdfab31114719f Author: Andreas Schneider <a...@samba.org> Date: Thu Mar 21 11:55:46 2019 +0100 s3:waf: Fix the detection of makdev() macro on Linux BUG: https://bugzilla.samba.org/show_bug.cgi?id=13853 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Thu Mar 21 21:40:20 UTC 2019 on sn-devel-144 commit e1ba84a5f2217a0391d1ca0678e4b36c3e17b9f3 Author: Andreas Schneider <a...@samba.org> Date: Thu Mar 21 11:55:26 2019 +0100 s3:torture: Improve the debug message output Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 9b1d79a5dd5e7caf967cf49936d2eb52175e85cf Author: Andreas Schneider <a...@samba.org> Date: Thu Mar 21 11:55:01 2019 +0100 s3:torture: Move the init of the locking out of the loop Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 16331870eed8281cb85d9ea09858f14ae2b29329 Author: Andreas Schneider <a...@samba.org> Date: Thu Mar 21 11:17:58 2019 +0100 s3:smbd: Make clear that we got a suicide packet Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 3eee4394cb6392f779db3ba9df3a1ab28562a7f3 Author: Andreas Schneider <a...@samba.org> Date: Thu Mar 21 11:21:21 2019 +0100 libcli: Use a define for the SMB_SUICIDE_PACKET Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: libcli/smb/smbXcli_base.c | 2 +- libcli/smb/smbXcli_base.h | 2 ++ source3/smbd/process.c | 7 ++++--- source3/torture/test_cleanup.c | 15 +++++++++------ source3/wscript | 3 +++ 5 files changed, 19 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 9105b7c84a4..d12e63902d9 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -591,7 +591,7 @@ struct tevent_req *smbXcli_conn_samba_suicide_send(TALLOC_CTX *mem_ctx, return NULL; } state->conn = conn; - SIVAL(state->buf, 4, 0x74697865); + SIVAL(state->buf, 4, SMB_SUICIDE_PACKET); SCVAL(state->buf, 8, exitcode); _smb_setlen_nbt(state->buf, sizeof(state->buf)-4); diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index a7256490bd1..a132fbe95af 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -21,6 +21,8 @@ #ifndef _SMBXCLI_BASE_H_ #define _SMBXCLI_BASE_H_ +#define SMB_SUICIDE_PACKET 0x74697865 + struct smbXcli_conn; struct smbXcli_session; struct smbXcli_tcon; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 99693ed1315..d6545101f01 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -44,6 +44,7 @@ #include "system/threads.h" #include "lib/pthreadpool/pthreadpool_tevent.h" #include "util_event.h" +#include "libcli/smb/smbXcli_base.h" /* Internal message queue for deferred opens. */ struct pending_message_list { @@ -1980,11 +1981,11 @@ static void process_smb(struct smbXsrv_connection *xconn, /* special magic for immediate exit */ if ((nread == 9) && - (IVAL(inbuf, 4) == 0x74697865) && + (IVAL(inbuf, 4) == SMB_SUICIDE_PACKET) && lp_parm_bool(-1, "smbd", "suicide mode", false)) { uint8_t exitcode = CVAL(inbuf, 8); - DEBUG(1, ("Exiting immediately with code %d\n", - (int)exitcode)); + DBG_WARNING("SUICIDE: Exiting immediately with code %d\n", + (int)exitcode); exit(exitcode); } diff --git a/source3/torture/test_cleanup.c b/source3/torture/test_cleanup.c index 8efdf35e080..4ee52d4c017 100644 --- a/source3/torture/test_cleanup.c +++ b/source3/torture/test_cleanup.c @@ -281,6 +281,11 @@ bool run_cleanup3(int dummy) { create_duplicate_batch, "create_duplicate_batch" }, }; + if (!locking_init()) { + printf("locking_init failed\n"); + return false; + } + printf("CLEANUP3: Checking that a share mode is cleaned up on " "conflict\n"); @@ -293,13 +298,11 @@ bool run_cleanup3(int dummy) return false; } - printf("%d %d %d\n", (int)id.devid, (int)id.inode, - (int)id.extid); + printf("devid: %lu inode: %lu extid: %lu\n", + (unsigned long)id.devid, + (unsigned long)id.inode, + (unsigned long)id.extid); - if (!locking_init()) { - printf("locking_init failed\n"); - return false; - } lck = get_existing_share_mode_lock(talloc_tos(), id); if (lck == NULL) { printf("get_existing_share_mode_lock failed\n"); diff --git a/source3/wscript b/source3/wscript index e0db9839795..c93b6056f29 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1219,6 +1219,9 @@ main() { #include <unistd.h> #endif #include <sys/types.h> +#if defined(HAVE_SYS_SYSMACROS_H) +#include <sys/sysmacros.h> +#endif main() { dev_t dev = makedev(1,2); return 0; } ''', 'HAVE_MAKEDEV', -- Samba Shared Repository