From nobody Tue May 07 00:04:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VYJRr6X6bz5Jg9h; Tue, 07 May 2024 00:04:40 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VYJRr5x1Mz4bDQ; Tue, 7 May 2024 00:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715040280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bpQazWq5+AxGfLMTurAgqJf/8au02rsvi77xKiBGSzo=; b=XZmqjPzs/lIXe4Qxx7BD3q7PyQ1QG4Eto3kofRPtiO9oRJhknXVlOKPe+s20MEaDOx+YCf cXoz7R0jOBEX9aXhLr/Ns89FMjgEeE7uz4JwQEVSV2o816a1YUFz70ydt17ztRjQCBB8Id ncLQ0YMtKqgL4fnXCsRTs+RUu182QUJDODMW1yeJUjyNSl/CU/QkPNBnGF5w9Fz8/EfB+9 qpjoPGHgNofCuy9cSP/h3XlFKjrir4xkbilVFVI3bfg4ba5fvj3CPyLZvE784qSadUTWNC flvv0rqw/q52CA5c7/jZWH2f4uSDR6iwaRDwaJX0zjbGgXO9QafoHdzCevVekA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715040280; a=rsa-sha256; cv=none; b=RHRfnI5iPKktJKTK2nhVI4VUe71ekrG3bsDMaZlNhuKk2NHJnnCEG5ByS36toBu9SXFTei CqGB+D/RIKYjqieiUOp3mkkZ96mtNoXa1CFNnJmYqbs4N4siwsE2ICmYfaZSJvXybJ+aaG gmPEtjiTpwqet98zHpXmjc67/1IOcNCyNEPGaWHOKTryo3k3YdKPSpF2FWNQMb1iPIab3d ibLDaUUnzx5JdQ6wq3csenw/rUeWVxAmSU+nBkqu+sGqvjrf/BngM8Sdux054XkBqMMHzW yG9wQPGxVUzBlS+GUTjHkz+3z1MAnASUDKCWCu0B7troHgVK5zhA/05m7yLRZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715040280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bpQazWq5+AxGfLMTurAgqJf/8au02rsvi77xKiBGSzo=; b=WvQ1XkRCmQLI3rCu0IkN5yaAlzJF76foUR2QKpXIxumekHwIpka16cbg84bzdL7UyxSwzO D9uB1cbwKnllo2yXmcCtNKQEglN8dxr5vPh2oqFAbnSDpkI9ugcVqY/AjFz62jO4FpX5JO xl7sYhFgwhJVFRPB7iclRqmOBuL06Q75JRsCgYf2GpTIEtsA2aLFanpSd8e0E9apbt1qYd 8NaJ8MscrZabEEDHrtvtHfHZu9Qs7FF0KzzE9Nb6lNmozjYJ+Vsmi5WQolmPk5SvPYtV6e N/b4bjaPdw0o5PYLeWJN4W5HP04A2po0W0FT2AyGaPF33QD5CsvN7aWI1njVPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VYJRr5SHlzJX2; Tue, 7 May 2024 00:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44704eu8021133; Tue, 7 May 2024 00:04:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44704eBi021130; Tue, 7 May 2024 00:04:40 GMT (envelope-from git) Date: Tue, 7 May 2024 00:04:40 GMT Message-Id: <202405070004.44704eBi021130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8d0ca017408e - stable/13 - Update capsicum-test to eab7a83b05becf64439b4b256b3d756b353fbbbb List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d0ca017408ed87de0e3f8746421e88a834b9bb0 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8d0ca017408ed87de0e3f8746421e88a834b9bb0 commit 8d0ca017408ed87de0e3f8746421e88a834b9bb0 Author: Ed Maste AuthorDate: 2022-09-13 17:39:02 +0000 Commit: Ed Maste CommitDate: 2024-05-07 00:03:52 +0000 Update capsicum-test to eab7a83b05becf64439b4b256b3d756b353fbbbb (cherry picked from commit 4ee9db7a1d428a0c067ad4c65591972872eb2ade) PR: 266112 --- contrib/capsicum-test/syscalls.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/contrib/capsicum-test/syscalls.h b/contrib/capsicum-test/syscalls.h index 592a1677e1f1..3ea8803c2f64 100644 --- a/contrib/capsicum-test/syscalls.h +++ b/contrib/capsicum-test/syscalls.h @@ -47,16 +47,29 @@ inline int bogus_mount_() { /* Mappings for extended attribute functions */ #include +#include +static const char *fbsd_extattr_skip_prefix(const char *p) { + if (*p++ == 'u' && *p++ == 's' && *p++ == 'e' && *p++ == 'r' && *p++ == '.') + return p; + errno = EINVAL; + return NULL; +} inline ssize_t flistxattr_(int fd, char *list, size_t size) { return extattr_list_fd(fd, EXTATTR_NAMESPACE_USER, list, size); } inline ssize_t fgetxattr_(int fd, const char *name, void *value, size_t size) { + if (!(name = fbsd_extattr_skip_prefix(name))) + return -1; return extattr_get_fd(fd, EXTATTR_NAMESPACE_USER, name, value, size); } inline int fsetxattr_(int fd, const char *name, const void *value, size_t size, int) { + if (!(name = fbsd_extattr_skip_prefix(name))) + return -1; return extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, name, value, size); } inline int fremovexattr_(int fd, const char *name) { + if (!(name = fbsd_extattr_skip_prefix(name))) + return -1; return extattr_delete_fd(fd, EXTATTR_NAMESPACE_USER, name); }