From a54d9ffc87ebe602a0e7c48e35643ed2ff1a00bc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 2 Sep 2021 15:32:27 -0700 Subject: [PATCH] s3: smbd: Add fifo test for the DISABLE_OPATH case. Currently we hang when trying to list a directory containing a fifo when configured with DISABLE_OPATH. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14816 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- selftest/skip.opath-required | 4 ++ source3/script/tests/test_fifo.sh | 83 +++++++++++++++++++++++++++++++ source3/selftest/tests.py | 3 ++ 3 files changed, 90 insertions(+) create mode 100755 source3/script/tests/test_fifo.sh diff --git a/selftest/skip.opath-required b/selftest/skip.opath-required index 0faf0c4bd6c..c62d3ebd2e0 100644 --- a/selftest/skip.opath-required +++ b/selftest/skip.opath-required @@ -7,3 +7,7 @@ # These fail because become_root() doesn't work in make test ^samba3.blackbox.dropbox.* ^samba3.raw.samba3hide.* +# This fails because of BUG: https://bugzilla.samba.org/show_bug.cgi?id=14816 +# which causes the server to hang when trying to open a pathref fifo without O_PATH. +# We need to add O_NONBLOCK to make this work. +^samba3.blackbox.fifo diff --git a/source3/script/tests/test_fifo.sh b/source3/script/tests/test_fifo.sh new file mode 100755 index 00000000000..11741dcc038 --- /dev/null +++ b/source3/script/tests/test_fifo.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# +# Check smbclient can list a directory containing a fifo. +# + +if [ $# -lt 7 ]; then +cat < $tmpfile <