From patchwork Wed May 6 13:05:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1284415 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=afkdfrcs; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HGzb16M7z9sPF for ; Wed, 6 May 2020 23:05:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6843886EDF; Wed, 6 May 2020 13:05:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z_cIxRUdfSxQ; Wed, 6 May 2020 13:05:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6288486EB4; Wed, 6 May 2020 13:05:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6A18F1BF866 for ; Wed, 6 May 2020 13:05:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5F4EF8598E for ; Wed, 6 May 2020 13:05:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q6OfFJ_JrAmR for ; Wed, 6 May 2020 13:05:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 1E651857F8 for ; Wed, 6 May 2020 13:05:21 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z8so2127479wrw.3 for ; Wed, 06 May 2020 06:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DkexjoY+GN7tyjukZ0i8T6k+CUq0QAYTrJMULqSa7I4=; b=afkdfrcsOv3cncN2z0WvVJ5M7ixZvA6uUy1olbebFBq+wko4VucN6NOCwOd+mBJmBR j/VSgVgtcXNuJLjkTWcvIKyLkoLIbCd0UC3xVk4IWYsZY9RsWMcDCWaHeMb/E/XVT452 sN1G4Uw8v6SK3L+T4wbPkl2NKsU6v2EJla1edlynShLYMc6VACgb2GeMXzz9h4u2vcpF o4jQIUCK/x9Jb5QNlN6qtZA8ndV/NkSu/aOa2eK0qXZSwMN8VvgSw/2I3+wJrc1l9Jhl GCl1IcuCKny46Mc6+ympPIhE+yNyUcx56aEE4G2pjgTpn9QDRo8GeVMzlkJ1sj26Xeym 9Khw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DkexjoY+GN7tyjukZ0i8T6k+CUq0QAYTrJMULqSa7I4=; b=qfhGGX7rVbIeZpW7P0bwSP/3ScYrdkpCJZ8ezadlPRsMW+OqlCZw84sK2oe5IovPMP 8f8apaQREjqg9kgugPERgPVUoQF9HzDZiOHHlA8q2kKBmsRUn1UVdEHJu9oGYpub7J9N Ep7E9w45ZwM8/ZJwAd3OBtpFOm5drmTrdJ0XmswAosqEU3C+EveIbb/fHtXwho7BQB8G uPSQSPJElwZaI5fIjOvLnL95IXEHZTJhhTCuLHZMGZjoWqTUaDmFTfwDiL+JuN1QCXcd zDaallwsKq0BbGvIMswabqiWMkDTNV2bplGB013dErCGFJ1spiqtopqv/H8yxPxEf9ON Omow== X-Gm-Message-State: AGi0Pubs0mhctpWzcEmneoC6//s6IkFCu7xGPPvtaa7iN3xF5/iNOc6P 3/xbCppVQldNWKuIKoZIQaVlmnnL X-Google-Smtp-Source: APiQypLGnmvBznwpW7F4gI1dkDbDQj8Vq1vsatgcU5vXrac3859z7nNnIMS5GdjhJpml9LdWzov4Eg== X-Received: by 2002:adf:cd84:: with SMTP id q4mr8871181wrj.320.1588770319361; Wed, 06 May 2020 06:05:19 -0700 (PDT) Received: from lano-work.andritz.com ([80.120.136.76]) by smtp.gmail.com with ESMTPSA id w6sm2755173wrt.39.2020.05.06.06.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 06:05:18 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Wed, 6 May 2020 15:05:05 +0200 Message-Id: <20200506130506.409662-2-nolange79@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200506130506.409662-1-nolange79@gmail.com> References: <20200506130506.409662-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/fakeroot: fix for fchownat/fchmodat X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" fakeroot does mask out necessary flags, instead pass through the flags that are supported by fstatat Upstream BR: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959876 Signed-off-by: Norbert Lange --- package/fakeroot/0003_fix_fchownat.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/fakeroot/0003_fix_fchownat.patch diff --git a/package/fakeroot/0003_fix_fchownat.patch b/package/fakeroot/0003_fix_fchownat.patch new file mode 100644 index 0000000000..d200654910 --- /dev/null +++ b/package/fakeroot/0003_fix_fchownat.patch @@ -0,0 +1,24 @@ +Description: fix chownat/chmodat when pathname is empty + this forwards all supported flags to fstatat, + instead of masking them out and causing errors. + +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -886,7 +886,7 @@ + /* If AT_SYMLINK_NOFOLLOW is set in the fchownat call it should + be when we stat it. */ + INT_STRUCT_STAT st; +- r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & AT_SYMLINK_NOFOLLOW)); ++ r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT))); + + if(r) + return(r); +@@ -1023,7 +1023,7 @@ + + /* If AT_SYMLINK_NOFOLLOW is set in the fchownat call it should + be when we stat it. */ +- r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & AT_SYMLINK_NOFOLLOW); ++ r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT)); + + if(r) + return(r);