From nobody Tue Sep 13 17:42:58 2022 X-Original-To: dev-commits-src-main@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 4MRrQp4X5Zz4bylP; Tue, 13 Sep 2022 17:42:58 +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 4MRrQp3ycpz3QG9; Tue, 13 Sep 2022 17:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663090978; 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=LCDvuBu++9jvsv0IPjsuWaBnb/rFVGObDs/xLRxxxqo=; b=qTjWD9CBaaKVAuzoMntf5dKNU8AdQfailDmUM6FvjlCN8dg5rKXpFrpaNw8kTSNtQKZqV1 5dYWDGBUx/2sTlX5chvw9uAqD635CDgNVG8dafqSdAUTNiWHGdqUO2MVWBCDZtkHpG1tYR Bl37SM4Dfd7POChVCXP9yl9xiGv2/i+Rd653DG7tfo9gl0O7Fd4o2F6y5yr9XKNvVq9rmx EB4XTcB7E/qRu7YeGopg3CuBg5qP7y5eqUR5y+XYHsU7yUyPFESjK8cxeyVyswtG/xoIER wi0hIHXPA1A7tyiF2mesyg+mC7koxdRVmSWCTfC/gnmQv3ACYFs1R7IYpnCdlg== 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 4MRrQp30RczPp9; Tue, 13 Sep 2022 17:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28DHgwNx060820; Tue, 13 Sep 2022 17:42:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28DHgwIQ060819; Tue, 13 Sep 2022 17:42:58 GMT (envelope-from git) Date: Tue, 13 Sep 2022 17:42:58 GMT Message-Id: <202209131742.28DHgwIQ060819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 4ee9db7a1d42 - main - Update capsicum-test to eab7a83b05becf64439b4b256b3d756b353fbbbb List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 4ee9db7a1d428a0c067ad4c65591972872eb2ade Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663090978; 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=LCDvuBu++9jvsv0IPjsuWaBnb/rFVGObDs/xLRxxxqo=; b=vdwM7tiVTlm6bRiMdSa/AOM13fixfj2ogXVtMwZYlEfQqYjYI9VDhgCP9Btb2edlXPlk5K rdfMKpMI5hesz2DRS16ZrtmNMcnqKoTmeUnr9NdjEW9KXE2fhoC/tst2cVWLW1PVNgYot7 X0PBK3bFxnNUgSU9NbWjep4mKIlX3XmG2tZRM1XDc6GJB/WABtrqvmrlFIWxdfNTh1dUXW wENooOzrUiQg8W5F3EzfGavlEpa9jFMCuHMfJs4BOiz1KS0NcVXrWLj/v1gtjFnJ3GG2EO MZD7Op0gV1IB/ni7xKBxu0aQVVirEaDSB45Ub+yJoupfMhntaU12/vwdxS7xwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663090978; a=rsa-sha256; cv=none; b=F6Kl43QRZlQmALmG6kcsYppNx755SrIoIkcbmAdHE596kbDDC4QCs1KSEfH6ZQ8GPxr1tV FMnVdEDJQdT/oFbpvVogqG7QG460neHqLJaQ0vvHOXyFQG50WpEZiNq7uNlc6bBVDV8EQS UGu6xbmFwiFJRvuz7Ufr6slyHOAMA1CQ7Wt5FB6QebH1MELZfqMFOz/II02+7LJnYzV70Y C0CuoALEXyLphSJ7AsOYxKt4ZczzgnAJTfN5IrDPZeJDdxHvA1Vhn3vpU7RB87Fhjz932U ZkM0EkWYjH+xO2HFfCzL86iiJvdmQgGgDfUfK6Nwo3HvXm0tMC4sKz01l0vbYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4ee9db7a1d428a0c067ad4c65591972872eb2ade commit 4ee9db7a1d428a0c067ad4c65591972872eb2ade Author: Ed Maste AuthorDate: 2022-09-13 17:39:02 +0000 Commit: Ed Maste CommitDate: 2022-09-13 17:42:46 +0000 Update capsicum-test to eab7a83b05becf64439b4b256b3d756b353fbbbb --- 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); }