From owner-svn-src-all@freebsd.org Fri Feb 7 22:36:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70D8C230125; Fri, 7 Feb 2020 22:36:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Dqsf2RR6z46Tn; Fri, 7 Feb 2020 22:36:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FF4DBC86; Fri, 7 Feb 2020 22:36:38 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 017MabOU031988; Fri, 7 Feb 2020 22:36:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 017Mab5R031987; Fri, 7 Feb 2020 22:36:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202002072236.017Mab5R031987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 7 Feb 2020 22:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357671 - head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/contrib/netbsd-tests/lib/libc/c063 X-SVN-Commit-Revision: 357671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2020 22:36:38 -0000 Author: kevans Date: Fri Feb 7 22:36:37 2020 New Revision: 357671 URL: https://svnweb.freebsd.org/changeset/base/357671 Log: O_SEARCH test: mark revokex an expected fail on NFS The revokex test does not work when the scratch directory is created on NFS. Given the nature of NFS, it likely can never work without looking like a security hole since O_SEARCH would rely on the server knowing that the directory did have +x at the time of open and that it's OK for it to have been revoked based on POSIX specification for O_SEARCH. This does mean that O_SEARCH is only partially functional on NFS in general, but I suspect the execute bit getting revoked in the process is likely not common. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23573 Modified: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Modified: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Fri Feb 7 22:28:04 2020 (r357670) +++ head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Fri Feb 7 22:36:37 2020 (r357671) @@ -34,6 +34,11 @@ __RCSID("$NetBSD: t_o_search.c,v 1.9 2020/02/06 12:18: #include #include +#ifdef __FreeBSD__ +#include +#else +#include +#endif #include #include @@ -322,6 +327,23 @@ ATF_TC_BODY(o_search_revokex, tc) /* Drop permissions. The kernel must still not check the exec bit. */ ATF_REQUIRE(chmod(DIR, 0000) == 0); + { + const char *fstypename; +#ifdef __FreeBSD__ + struct statfs st; + + fstatfs(dfd, &st); + fstypename = st.f_fstypename; +#else + struct statvfs vst; + + fstatvfs(dfd, &vst); + fstypename = vst.f_fstypename; +#endif + if (strcmp(fstypename, "nfs") == 0) + atf_tc_expect_fail( + "NFS protocol cannot observe O_SEARCH semantics"); + } ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); ATF_REQUIRE(close(dfd) == 0);