diff options
author | Christof Schmitt <cs@samba.org> | 2017-12-13 11:34:23 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-12-16 01:56:06 +0100 |
commit | 7fa91fc4791d076c609eaf119753e38dd3c50a1c (patch) | |
tree | 4b078a42ccf1536a5ac0093d840b7d4a722d534e | |
parent | 0d3000be2af8f8c4a37892d95ae694ad834d7b3a (diff) | |
download | samba-7fa91fc4791d076c609eaf119753e38dd3c50a1c.tar.gz |
smbd: Fix coredump on failing chdir during logoff
server_exit does an internal tree disconnect which requires a chdir to
the share directory. In case the file system encountered a problem and
the chdir call returns an error, this triggers a SERVER_EXIT_ABNORMAL
which in turn results in a panic and a coredump. As the log already
indicates the problem (chdir returned an error), avoid the
SERVER_EXIT_ABNORMAL in this case and not trigger a coredump.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13189
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec 16 01:56:06 CET 2017 on sn-devel-144
-rw-r--r-- | selftest/knownfail | 1 | ||||
-rw-r--r-- | source3/smbd/server_exit.c | 4 |
2 files changed, 0 insertions, 5 deletions
diff --git a/selftest/knownfail b/selftest/knownfail index 10e368a1084..710fd33894e 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -343,4 +343,3 @@ # Disabling NTLM means you can't use samr to change the password ^samba.tests.ntlmdisabled.python\(ktest\).ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\) ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) -^samba3.blackbox.smbd_error.check_panic_2 diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index a9ef37f49e2..dbeb247c170 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -150,8 +150,6 @@ static void exit_server_common(enum server_exit_reason how, DEBUG(0, ("exit_server_common: " "smb1srv_tcon_disconnect_all() failed (%s) - " "triggering cleanup\n", nt_errstr(status))); - how = SERVER_EXIT_ABNORMAL; - reason = "smb1srv_tcon_disconnect_all failed"; } status = smbXsrv_session_logoff_all(xconn); @@ -161,8 +159,6 @@ static void exit_server_common(enum server_exit_reason how, DEBUG(0, ("exit_server_common: " "smbXsrv_session_logoff_all() failed (%s) - " "triggering cleanup\n", nt_errstr(status))); - how = SERVER_EXIT_ABNORMAL; - reason = "smbXsrv_session_logoff_all failed"; } } |