smbd: Fix coredump on failing chdir during logoff
authorChristof Schmitt <cs@samba.org>
Wed, 13 Dec 2017 18:34:23 +0000 (11:34 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 16 Dec 2017 00:56:06 +0000 (01:56 +0100)
commit7fa91fc4791d076c609eaf119753e38dd3c50a1c
tree4b078a42ccf1536a5ac0093d840b7d4a722d534e
parent0d3000be2af8f8c4a37892d95ae694ad834d7b3a
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
selftest/knownfail
source3/smbd/server_exit.c