From nobody Thu Feb 17 10:55:28 2022 X-Original-To: dev-commits-src-all@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 866D919D4ABA; Thu, 17 Feb 2022 10:55:29 +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 4JzsDd2X2tz4jjw; Thu, 17 Feb 2022 10:55:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645095329; 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=re32cpn1e7RWtDmSoTx/uxkIakZ8DhlY0OkcAmUQ6ao=; b=nScg8jjWmtoXDf0TayOtvj/NkXZqVGs6TX9DpCWHZUH5b9BcymJueblx1d2199er82FLLf QuI0g/QgWHkkl0MCVZ218l1faV4lmNNd7o24v5iEBtndvA7cuDFqLQljfYicwKRzhAiQAl bSNLxuHUWeEtcf4FY4YpyK++I7Z1stLzRZlk/qbs4aoWpQtx21u106heXfG00kAd1ZEV7u ocqScNDZqMB8wv2oV6JYyLK92Sf7QHHG9FPF3Vob1FB4zhbPKoV1npi21S6wkmpVYCpavX UZ5pwemCcJWm1vbYhAhacaJZeHm2/wI8g1ro9JGvz4ZSJTIjuXoR1x6VQ20wpg== 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 13A025CC; Thu, 17 Feb 2022 10:55:29 +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 21HAtS1L019988; Thu, 17 Feb 2022 10:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21HAtSXs019987; Thu, 17 Feb 2022 10:55:28 GMT (envelope-from git) Date: Thu, 17 Feb 2022 10:55:28 GMT Message-Id: <202202171055.21HAtSXs019987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 1e44a4ea0d4a - stable/13 - linux: support AT_EMPTY_PATH flag in fchownat(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1e44a4ea0d4ab6ae9b022293233bba8719f0515e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645095329; 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=re32cpn1e7RWtDmSoTx/uxkIakZ8DhlY0OkcAmUQ6ao=; b=DZcXHoledK1YXrI3fRD722Pt5m+5X/m7D1NRQcxe9yGYBM5/7aJwaPI2P9MtHOSvQfaUuZ WwwqLqZmu7YUP7LWcArpryFVUTvtv8yjBsgWfTUIgYTGUZ2GmvLQhBmW9Can/VF+KIufS9 bdsZooittc0lGDPYHBNvC/Ip9Yf7VUTfRlfPCpZJPHl2a2VE3YglcfyWu15ecD/AfnFzmF 9fS0waKAVQdNgwsWcxNP6fk/AiwFPeS6YLftAkLuk4kATNCZ2bjS4YyEKVJldC3ejN1aFc 3k1/HwswVqgm9f5bH2Cy3hxDWvhfem62l3jk0JXNIT7vdILoW6PTEYCaTt944A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645095329; a=rsa-sha256; cv=none; b=KxXc02La078BamMaUIg9YXKfhCsYMPQ541pnhck19ipwjqJve5/XYuZOJulDnXwPW0A7Vd Zu5mq9s0sTc5iadxhVu0qjdvlWMB04ykMUQFPP7fNeiBmJjKCLeEJMlKK0PaUtbMm7MDmY L/WDMiqn7pc5crMJwmkuRc0+AqgsfxYUOtMVE3DyOt5cBCa6DloyWYNYvhdlBaZQ7EyNAS /xZEHJH8w2YCtuZAv9p3CEJgXEKKmlPCL0/vZafExdZIyYAHMZnthliM1AMwSNi5IpM08w jmLDw8w7sXDMz4Moc4ecr1JN4BqpR+Uhv3bPKJHiwxODk79SdsCSfigU9gO+Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=1e44a4ea0d4ab6ae9b022293233bba8719f0515e commit 1e44a4ea0d4ab6ae9b022293233bba8719f0515e Author: Edward Tomasz Napierala AuthorDate: 2021-04-16 15:26:43 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-02-13 21:06:38 +0000 linux: support AT_EMPTY_PATH flag in fchownat(2) This fixes rsyslog package installation scripts in Bionic. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D29108 (cherry picked from commit e47823b8312b7cb61c5c8cb8e1eb981994e3a0b4) --- sys/compat/linux/linux_file.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 438b100d4e21..6b02c2efb88e 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1740,12 +1740,17 @@ linux_fchownat(struct thread *td, struct linux_fchownat_args *args) char *path; int error, dfd, flag; - if (args->flag & ~LINUX_AT_SYMLINK_NOFOLLOW) + if (args->flag & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH)) { + linux_msg(td, "fchownat unsupported flag 0x%x", args->flag); return (EINVAL); + } - dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) == 0 ? 0 : AT_SYMLINK_NOFOLLOW; + flag |= (args->flag & LINUX_AT_EMPTY_PATH) == 0 ? 0 : + AT_EMPTY_PATH; + + dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; if (!LUSECONVPATH(td)) { return (kern_fchownat(td, dfd, args->filename, UIO_USERSPACE, args->uid, args->gid, flag));