From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 30 21:20:54 2020 Received: (at submit) by debbugs.gnu.org; 31 Jan 2020 02:20:54 +0000 Received: from localhost ([127.0.0.1]:36440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixLvS-0007zR-60 for submit@debbugs.gnu.org; Thu, 30 Jan 2020 21:20:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:52127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixLVG-0007M1-0U for submit@debbugs.gnu.org; Thu, 30 Jan 2020 20:53:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46184) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixLVE-0007oZ-QO for bug-coreutils@gnu.org; Thu, 30 Jan 2020 20:53:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixLVD-0003JN-M6 for bug-coreutils@gnu.org; Thu, 30 Jan 2020 20:53:48 -0500 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]:41430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixLVD-0003Iz-Ia for bug-coreutils@gnu.org; Thu, 30 Jan 2020 20:53:47 -0500 Received: by mail-qv1-xf44.google.com with SMTP id s7so2533364qvn.8 for ; Thu, 30 Jan 2020 17:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1oabSVt9qm3T+DY0RuU2YOpHGua07wzrnT6BdaZk7W0=; b=Cbd8u8gyetNEmHa4592Ssdw8ecVFRMNRXWvrKaHn38YrGZLGafnVmyTb4NeQj8JiHU Fvy0XpyOQfqnf3eTgK83NP7wQarniXkjRwSF11hM315yjh2wfHsRXejuNoGunc4N2zGe 3oDeyt6IPzMmzsy+8EAXOuqDkEwYydRCUsjcpeivp7rvMmrHl8VZ5W8NhKVPD5TEg21x jnswFWQyWhx5BEBwBF/SiUi0kU6f/SvLwa6EggVgX0fSA7ewAAm2ZtOkUOLQJvXA2NNK O6yoVyfiRLZbGtOrMoEJEVkD87MEzHEels0QWatclBPu8f1c25j1Cpr/aZKxuf/P7BIi FtvA== 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:mime-version :content-transfer-encoding; bh=1oabSVt9qm3T+DY0RuU2YOpHGua07wzrnT6BdaZk7W0=; b=uJJeFe6Imu/eSDGybioIJGPKUzhSSeoxwtL975Wuh3NtOn7AL463yAivQb45SXqcH+ kP0rtDTkEzl5oWjqFVSWPtbQIsFUD/mU5zM480QBzDXlBl1gqJtPmrrFsK0cNGJYqq/T HO80XNjJcdinGa7hA6Buzl4l1W25N6J+GO6e/lWv0cNWXUB0B6oJgcXXw63zlyaHvQH4 BylISLhWJdGtKE9AFjlG7Gamlt0OBX+TpKWhHqOGvi8J1kWEWx5peRmWVhHZt9CngI4Z qn81/As+3mWVvD+5PV00m6XE45VsdP6PUUR4lafDAmxWG668MNAWvBt5+TZQ0EbO+uto 87rw== X-Gm-Message-State: APjAAAWFklaT+J9agbVLDmHBhOY/k3nK2inXo+xy6t9UVtbGaqyYdTGO ltvlZhAqxxP5KmfoWWvA+dXlOK3h X-Google-Smtp-Source: APXvYqzGpkksgTFl4ow+85UpONfg6xbWBIqEavjfrJ0vkH4pnKmkVHOVCO7U/Jnqo6q9yCHWIOc4VQ== X-Received: by 2002:ad4:5349:: with SMTP id v9mr8240146qvs.177.1580435626677; Thu, 30 Jan 2020 17:53:46 -0800 (PST) Received: from localhost.localdomain (inet-64-112-179-228.bos.netblazr.com. [64.112.179.228]) by smtp.gmail.com with ESMTPSA id d20sm4127787qto.2.2020.01.30.17.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2020 17:53:46 -0800 (PST) From: Matthew Pfeiffer To: bug-coreutils@gnu.org Subject: [PATCH] rmdir: fix clobbered errno Date: Thu, 30 Jan 2020 20:46:40 -0500 Message-Id: <20200131014640.137395-1-spferical@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::f44 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 'rmdir --ignore-fail-on-non-empty' would not report errors on non-empty directories that fail for a different reason. --- src/rmdir.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rmdir.c b/src/rmdir.c index c9f417957..7b253ab0d 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -133, 18 +133, 19 @@ remove_parents (char *dir) prog_fprintf (stdout, _("removing director [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (spferical[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 30 Jan 2020 21:20:51 -0500 Cc: Matthew Pfeiffer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 'rmdir --ignore-fail-on-non-empty' would not report errors on non-empty directories that fail for a different reason. --- src/rmdir.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rmdir.c b/src/rmdir.c index c9f417957..7b253ab0d 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -133,18 +133,19 @@ remove_parents (char *dir) prog_fprintf (stdout, _("removing directory, %s"), quoteaf (dir)); ok = (rmdir (dir) == 0); + int rmdir_errno = errno; if (!ok) { /* Stop quietly if --ignore-fail-on-non-empty. */ - if (ignorable_failure (errno, dir)) + if (ignorable_failure (rmdir_errno, dir)) { ok = true; } else { /* Barring race conditions, DIR is expected to be a directory. */ - error (0, errno, _("failed to remove directory %s"), + error (0, rmdir_errno, _("failed to remove directory %s"), quoteaf (dir)); } break; @@ -233,12 +234,13 @@ main (int argc, char **argv) if (rmdir (dir) != 0) { - if (ignorable_failure (errno, dir)) + int rmdir_errno = errno; + if (ignorable_failure (rmdir_errno, dir)) continue; /* Here, the diagnostic is less precise, since we have no idea whether DIR is a directory. */ - error (0, errno, _("failed to remove %s"), quoteaf (dir)); + error (0, rmdir_errno, _("failed to remove %s"), quoteaf (dir)); ok = false; } else if (remove_empty_parents) -- 2.25.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 31 12:51:32 2020 Received: (at 39364) by debbugs.gnu.org; 31 Jan 2020 17:51:32 +0000 Received: from localhost ([127.0.0.1]:38077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixaS4-0000us-1K for submit@debbugs.gnu.org; Fri, 31 Jan 2020 12:51:32 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixaS2-0000uW-Df for 39364@debbugs.gnu.org; Fri, 31 Jan 2020 12:51:30 -0500 Received: by mail-wr1-f65.google.com with SMTP id c9so9668258wrw.8 for <39364@debbugs.gnu.org>; Fri, 31 Jan 2020 09:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OCCHlPaIjE7aBv7M9z8boVouhpH8FWECKXwJ0rLDrSg=; b=M8FQC/mRvYccG1C0+ydY/Y5mHLD3vfZ4IxyhVj9ULttHGoxXYhc1gd6/RuyyHxMKq2 0vmKFb5UCrIo4smJ4UsdBcAHE+oDQoJKihzjosF2iic3zK/RxthXH5KRGi2tupU4uJOH dfh+akcAxgb35WNrIVFIGnQ2nuGHRhPyiZvTTza3AwJz/CgMNbAmJ/aVVvA8iRvyc2+H U1w42M9BuXJ7aOKKkIFwogVv4FcAKJ0b1sjN5PfytxXVByvXntgOEVqrHmrVFWQt/wTw Pbt6k1bq2nkSRFx2DpzFYUbIW/zgIyvIpWV6ar0njhPO2iFitoPd5/YZj6Ai0sNHCd3z 593A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OCCHlPaIjE7aBv7M9z8boVouhpH8FWECKXwJ0rLDrSg=; b=MceWIwU/3RG+NO4fU861evADlwOHKHQ7BjghMIRNpijBI0Oa8B1AE7YyM89euXIonC p4Of6RTiUbIEDPAloQ5V+W3DPDBJIm76hTGjPQ1ENgwPszj4FBvLwnB0uRloxTQaUMnm Jm7SO4Tvh6x8tKhgVfPq0ylsvUtB+uSKuAD1bwHPWxO3+H3ilqYLDoxshAMPbC/aWPLa MUfhXDeLSckklLBGkG+px/Pm5hjQJegGT4mqnLVFueyGTnssmiGA0yWOTbT+oUFG6+2K MsXcB2gn8mv8PhNqbcxC+cpIImKBmuXjM8W+1BblRjbt7pZfXNtufAKieHf2WQ+cKi2r Rm3A== X-Gm-Message-State: APjAAAXxkxe9mvNsvkl9jj82VspjW5VQW3Hp9IDpik5cJpDWzqeZsDUD gCqPmNl3iW5DeV9lBJh/vC6tjv8fa4Q= X-Google-Smtp-Source: APXvYqzZX+Sq4K/RYbzE8dlc3GsAV8rv8hgsPx77KW+HBrNUNMmJpS5/DGZW0sP5Boi4vmOabXOgyw== X-Received: by 2002:adf:ef4c:: with SMTP id c12mr13674541wrp.203.1580493084136; Fri, 31 Jan 2020 09:51:24 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with ESMTPSA id f127sm11649010wma.4.2020.01.31.09.51.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Jan 2020 09:51:23 -0800 (PST) Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: Matthew Pfeiffer , 39364@debbugs.gnu.org References: <20200131014640.137395-1-spferical@gmail.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> Date: Fri, 31 Jan 2020 17:51:22 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Thunderbird/72.0 MIME-Version: 1.0 In-Reply-To: <20200131014640.137395-1-spferical@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 31/01/2020 01:46, Matthew Pfeiffer wrote: > 'rmdir --ignore-fail-on-non-empty' would not report errors on non-empty > directories that fail for a different reason. > --- > src/rmdir.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/src/rmdir.c b/src/rmdir.c > index c9f417957..7b253ab0d 100644 > --- a/src/rmdir.c > +++ b/src/rmdir.c > @@ -133,18 +133,19 @@ remove_parents (char *dir) > prog_fprintf (stdout, _("removing directory, %s"), quoteaf (dir)); > > ok = (rmdir (dir) == 0); > + int rmdir_errno = errno; > > if (!ok) > { > /* Stop quietly if --ignore-fail-on-non-empty. */ > - if (ignorable_failure (errno, dir)) > + if (ignorable_failure (rmdir_errno, dir)) > { > ok = true; > } > else > { > /* Barring race conditions, DIR is expected to be a directory. */ > - error (0, errno, _("failed to remove directory %s"), > + error (0, rmdir_errno, _("failed to remove directory %s"), > quoteaf (dir)); > } > break; > @@ -233,12 +234,13 @@ main (int argc, char **argv) > > if (rmdir (dir) != 0) > { > - if (ignorable_failure (errno, dir)) > + int rmdir_errno = errno; > + if (ignorable_failure (rmdir_errno, dir)) > continue; > > /* Here, the diagnostic is less precise, since we have no idea > whether DIR is a directory. */ > - error (0, errno, _("failed to remove %s"), quoteaf (dir)); > + error (0, rmdir_errno, _("failed to remove %s"), quoteaf (dir)); > ok = false; > } > else if (remove_empty_parents) > This looks like a regression introduced in v6.10-21-ged5c4e7 I.E. is_empty_dir() is globbering errno, and thus a non specific and non terminating warning is output, rather than a specific error, and exit. thanks, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 01 23:54:43 2020 Received: (at 39364) by debbugs.gnu.org; 2 Feb 2020 04:54:43 +0000 Received: from localhost ([127.0.0.1]:39494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy7HO-00030b-Q4 for submit@debbugs.gnu.org; Sat, 01 Feb 2020 23:54:43 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy7HN-00030N-5G for 39364@debbugs.gnu.org; Sat, 01 Feb 2020 23:54:41 -0500 Received: by mail-wm1-f68.google.com with SMTP id s10so12316678wmh.3 for <39364@debbugs.gnu.org>; Sat, 01 Feb 2020 20:54:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PY2mEq1s8+xXoU+ZQK1e2RoW8lfO+R/puFdnps+07yk=; b=nC0PWUCROJ4v0Rrcslggr3WWGH1IbR1lB/Mwaud4VuDnlIRJwebezFqia78sLnHmmK 8GWlfwWrFyYq5Mhv9h61yFOUHdLOFYO7U8LKHE207v3K1vQf+D8evCdcss8ld5JiYz9Y e1IQrQ9GUzzzigCpKH3aaCwmhMmA0UQL7cnK9oLfjZ7KMpNxEdgFRq4W9lqpd4/I6J79 nkV816NOn4ZJrBu4e6xvnnHAlYXEGK0QoRTyN0BmJTvQ9fHVUiXEA6wv197ys1cncntj 02YqyqztY5mLcmX+Q7JsyQiZm0Q2oS+D67De5QPfCmb5jC63n0XkcxkLJa6n33PtNzK+ Q/yQ== X-Gm-Message-State: APjAAAUhs8t/OgOq9hzKd+96eAkBZzKigFXhNlSO08OxgKhd8cvYg24P +s2fMUSgCcuoPxdIOEF9BJEXFhtrTB8ndVbS4lk= X-Google-Smtp-Source: APXvYqzswbkw5F1phyiX1szMaLW8jZCAm6w7egik4hEX8SR1Vfe/lnb+5p3akCbUl4Tz0DjyRD5189Vzti9QFflYF+0= X-Received: by 2002:a05:600c:2058:: with SMTP id p24mr20381104wmg.96.1580619275268; Sat, 01 Feb 2020 20:54:35 -0800 (PST) MIME-Version: 1.0 References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> In-Reply-To: <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> From: Jim Meyering Date: Sat, 1 Feb 2020 20:54:23 -0800 Message-ID: Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: =?UTF-8?Q?P=C3=A1draig_Brady?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 Cc: 39364@debbugs.gnu.org, Matthew Pfeiffer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Nice find and thank you for the patch. That's a 12-year-old bug I introduce= d. I confirm: with 6.10, running this: mkdir -p a/b && chmod a-w a && rmdir --ignore a/b prints this and exits nonzero: rmdir: failed to remove `a/b': Permission denied With 6.11 and newer, it silently succeeds. On Fri, Jan 31, 2020 at 9:55 AM P=C3=A1draig Brady wrote= : > > On 31/01/2020 01:46, Matthew Pfeiffer wrote: > > 'rmdir --ignore-fail-on-non-empty' would not report errors on non-empty > > directories that fail for a different reason. > > --- > > src/rmdir.c | 10 ++++++---- > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a/src/rmdir.c b/src/rmdir.c > > index c9f417957..7b253ab0d 100644 > > --- a/src/rmdir.c > > +++ b/src/rmdir.c > > @@ -133,18 +133,19 @@ remove_parents (char *dir) > > prog_fprintf (stdout, _("removing directory, %s"), quoteaf (d= ir)); > > > > ok =3D (rmdir (dir) =3D=3D 0); > > + int rmdir_errno =3D errno; > > > > if (!ok) > > { > > /* Stop quietly if --ignore-fail-on-non-empty. */ > > - if (ignorable_failure (errno, dir)) > > + if (ignorable_failure (rmdir_errno, dir)) > > { > > ok =3D true; > > } > > else > > { > > /* Barring race conditions, DIR is expected to be a dir= ectory. */ > > - error (0, errno, _("failed to remove directory %s"), > > + error (0, rmdir_errno, _("failed to remove directory %s"= ), > > quoteaf (dir)); > > } > > break; > > @@ -233,12 +234,13 @@ main (int argc, char **argv) > > > > if (rmdir (dir) !=3D 0) > > { > > - if (ignorable_failure (errno, dir)) > > + int rmdir_errno =3D errno; > > + if (ignorable_failure (rmdir_errno, dir)) > > continue; > > > > /* Here, the diagnostic is less precise, since we have no i= dea > > whether DIR is a directory. */ > > - error (0, errno, _("failed to remove %s"), quoteaf (dir)); > > + error (0, rmdir_errno, _("failed to remove %s"), quoteaf (di= r)); > > ok =3D false; > > } > > else if (remove_empty_parents) > > > > This looks like a regression introduced in v6.10-21-ged5c4e7 > I.E. is_empty_dir() is globbering errno, and thus > a non specific and non terminating warning is output, > rather than a specific error, and exit. > > thanks, > P=C3=A1draig > > > From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 02 01:33:02 2020 Received: (at 39364) by debbugs.gnu.org; 2 Feb 2020 06:33:02 +0000 Received: from localhost ([127.0.0.1]:39521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy8oY-0005UL-Hz for submit@debbugs.gnu.org; Sun, 02 Feb 2020 01:33:02 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:55508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iy8oW-0005Tq-Rd for 39364@debbugs.gnu.org; Sun, 02 Feb 2020 01:33:01 -0500 Received: by mail-wm1-f53.google.com with SMTP id q9so12403038wmj.5 for <39364@debbugs.gnu.org>; Sat, 01 Feb 2020 22:33:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3Lh17EKq2dpDEY4YR3Br5STcdpdY+hyhWm8qI+6Uizo=; b=XXUwFGGDyLJbdJeL+Ya+WALpaHW2i2iHzAx0FbwyOHYD0nFwwYqNx8Z0xjmk+c6Px/ rIXPbuR1R/TKgQKCyJiUdDioLvQpR3ykhZLSKxe2fxR6FZjUelSnMBCNGCt9+h3D8Tjb AF9XFhaO3SehYxd7vEQ4Ilt7R5kh9B9cqZwMYtWw+bSoWI7yxeICQLE5hz2OOG+rJkUe k8Z1hXusbO/kBbH7iKZGaF9gNGx1Y8T6RdvW2MjScThm6NKyJwT3YvtSuMRNETnfKKik UHETf68nxao5eiYTzTIJvKqibJX5Vkh21fjfNXUt6QryeGJCFIzJwwDKOjSWVtZSM/Mi pg7g== X-Gm-Message-State: APjAAAVQ4XDh2wJmXi5iN6kictxpgFzvARKE5eq9Bg9ZIvu26cCh3Tpn fcfgoOdrBFzY6D8y42EsN0PokH9ptyMLq97gJN4= X-Google-Smtp-Source: APXvYqzgC038VaQNGPzR9x12pnQQEYnY39UItUoJgmkjQZWp2o9Cj6GWCahRe7tszauCokHjUv7kRcnCNN7ErvrBT+s= X-Received: by 2002:a05:600c:2058:: with SMTP id p24mr20858110wmg.96.1580625174962; Sat, 01 Feb 2020 22:32:54 -0800 (PST) MIME-Version: 1.0 References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> In-Reply-To: <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> From: Jim Meyering Date: Sat, 1 Feb 2020 22:32:42 -0800 Message-ID: Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: =?UTF-8?Q?P=C3=A1draig_Brady?= Content-Type: multipart/mixed; boundary="00000000000013e1fb059d91fa16" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 Cc: 39364@debbugs.gnu.org, Matthew Pfeiffer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --00000000000013e1fb059d91fa16 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 31, 2020 at 9:55 AM P=C3=A1draig Brady wrote= : > ... > This looks like a regression introduced in v6.10-21-ged5c4e7 > I.E. is_empty_dir() is globbering errno, and thus > a non specific and non terminating warning is output, > rather than a specific error, and exit. FTR, here's a minimal test addition that exercises the bug. Succeeds on 6.10, fails on 6.11: --00000000000013e1fb059d91fa16 Content-Type: application/octet-stream; name="rmdir-test-addition.diff" Content-Disposition: attachment; filename="rmdir-test-addition.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k64neohl0 ZGlmZiAtLWdpdCBhL3Rlc3RzL3JtZGlyL2lnbm9yZS5zaCBiL3Rlc3RzL3JtZGlyL2lnbm9yZS5z aAppbmRleCBkMDAwYzMwY2IuLjViMTE0MjgwMyAxMDA3NTUKLS0tIGEvdGVzdHMvcm1kaXIvaWdu b3JlLnNoCisrKyBiL3Rlc3RzL3JtZGlyL2lnbm9yZS5zaApAQCAtMjksNCArMjksMTEgQEAgdGVz dCAtZCAiJGN3ZC9hL3giIHx8IGZhaWw9MQogdGVzdCAtZCAiJGN3ZC9hL2IiICYmIGZhaWw9MQog dGVzdCAtZCAiJGN3ZC9hL2IvYyIgJiYgZmFpbD0xCgorIyBFbnN1cmUgdGhhdCB3aXRoIC0taWdu b3JlLWZhaWwtb24tbm9uLWVtcHR5LCB3ZSBzdGlsbCBmYWlsLCBlLmcuLCBmb3IgRVBFUk0uCisj IEJldHdlZW4gNi4xMSBhbmQgNi4zMSwgdGhlIGZvbGxvd2luZyBybWRpciB3b3VsZCBtaXN0YWtl bmx5IHN1Y2NlZWQuCitta2RpciAtcCB4L3kgfHwgZnJhbWV3b3JrX2ZhaWx1cmVfCitjaG1vZCBh LXcgeCB8fCBmcmFtZXdvcmtfZmFpbHVyZV8KK3JtZGlyIC0taWdub3JlLWZhaWwtb24tbm9uLWVt cHR5IHgveSAmJiBmYWlsPTEKK3Rlc3QgLWQgeC95IHx8IGZhaWw9MQorCiBFeGl0ICRmYWlsCg== --00000000000013e1fb059d91fa16-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 02 08:11:33 2020 Received: (at 39364) by debbugs.gnu.org; 2 Feb 2020 13:11:33 +0000 Received: from localhost ([127.0.0.1]:39582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyF2D-0000iC-0h for submit@debbugs.gnu.org; Sun, 02 Feb 2020 08:11:33 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:40659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyF2B-0000hv-8n for 39364@debbugs.gnu.org; Sun, 02 Feb 2020 08:11:31 -0500 Received: from [192.168.101.10] ([93.218.97.181]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mjjvp-1jQS6F0WsN-00lHUO; Sun, 02 Feb 2020 14:11:20 +0100 Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: Jim Meyering , =?UTF-8?Q?P=c3=a1draig_Brady?= References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> From: Bernhard Voelker Autocrypt: addr=mail@bernhard-voelker.de; prefer-encrypt=mutual; keydata= mQENBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+ oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB AAG0K0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT6JATkEEwEC ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BuQENBFPirzMBCADXLWWp QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAGJAR8EGAECAAkFAlPi rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z UyCJ+OymCg== Message-ID: Date: Sun, 2 Feb 2020 14:11:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:HNdYijSTrfLqdi1eUhWXPsf8q4NsRcGsUG/v1KR2B3o4/bOLH1O KjSPP4BFO4QSIny0TGds0pKc4GUSY32QdYypkMYHHstBXSYQePVsX0eRMpFSnkBqQfqQPvx UWlk/l3N+3e4zZtWKCZ6h/zD/0OpsbAJeyRx0pq6u1zsAO2JuG/wxGFIUJ7bEtVd29q3if2 +cJUq00wlVB/ZZSySDZTQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:fvwqaDeQHqI=:cij5L0rbG0D8+HOliZgRQs ELJRncD8xXzGv+YZCp9A/gKk5FAZ8cLW8pduzh7dO1HYvL2q7d+bVBS5SdjAoYiPmcwx9of40 ts2/7WTbLVxlfIZ4zV4UNszmNVy4WxnvFArXRJAtMdxeZMFtFkWDHib4xRugAF8haMdcgadxJ 91KJSak3DENvfMTl0p4dxrG7yBj5rw3+C6JubI//YU/mva45hjlPgSk49VhNZlFbk4yBpPHK0 ymvfgJbhskT98WhOKo6t1u2hvEGLuofhXzEV4aSzm8exnFDvy5IaWeTFcECGPkakeNXFbn0li AhZCwfVMr66ZyOHuLnC5WEGlR/3b3WUExPQHAY7V3j8M4zw7OBMIK9XFduPYfuDe6c8/8+/gb 2FBUvxFq/1Kh2IoTk9DdNxa+SDaj5YK2kCZ4xfCkpS8w90NA/6c2H4fTbAU6IIxPOh/YirbIV iq5EaX+oefmZeq+yhm9rlNfkznEGyXV/gIXt6jAMy0j16x3sX19BrltVGvu40DSOHxR616dus TJ41dncDNYJ729HgojUIhbMg7fmxFPtewjGx5BNxvJqRtUauPZPIKxZIpJL9/sd6HjYK/J1+V SHmTx6fiYT72eCWUao+HkOBUhfO58cqPhXoE4QmrfrPzruO2bs7xRfM7AbW7Pj92H8OOxLK+P gDDv3MmIG/ahLXK+3gx0l8T3QLRhx3LM1COZZIiHft9OTQbmGgdsCn1KUWPmXo8vjlsZ2JfIu 1AcZQrXg8mNHWVGftAKHsPxfTS5J1H1KGmBQoXimwjpoVQFhYILgC5AgYEvOVDNRpXPeLHNs6 PUh/bbzpIjvhJojW8cTiPsion+HXZChoIWCIiPVS8t+oFJU2B31+9hV2C2kACdd4RIcPq4m X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39364 Cc: 39364@debbugs.gnu.org, Matthew Pfeiffer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2020-02-02 07:32, Jim Meyering wrote: > FTR, here's a minimal test addition that exercises the bug. Succeeds > on 6.10, fails on 6.11: Minor tweak for the test ... -rmdir --ignore-fail-on-non-empty x/y && fail=1 +returns_ 1 rmdir --ignore-fail-on-non-empty x/y || fail=1 ... due to: tests/rmdir/ignore.sh:36:rmdir --ignore-fail-on-non-empty x/y && fail=1 maint.mk: && fail=1 detected. Please use: returns_ 1 ... || fail=1 make: *** [cfg.mk:516: sc_prohibit_and_fail_1] Error 1 Thanks & have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 02 23:58:26 2020 Received: (at 39364) by debbugs.gnu.org; 3 Feb 2020 04:58:26 +0000 Received: from localhost ([127.0.0.1]:40798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyToY-0007OW-JJ for submit@debbugs.gnu.org; Sun, 02 Feb 2020 23:58:26 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:36106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyToW-0007OC-1I for 39364@debbugs.gnu.org; Sun, 02 Feb 2020 23:58:24 -0500 Received: by mail-wr1-f46.google.com with SMTP id z3so16231904wru.3 for <39364@debbugs.gnu.org>; Sun, 02 Feb 2020 20:58:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SdqzdgrXg9gVS5owyAUSODxSyuvnlHN1Hcr6/qPH+74=; b=SkLHnRiOw/Y3jJKDQq3Tm4wnvhpXSFzXJZmnUjlqFTbHn+k6+WJYWcZT6Em3Uw9d8T LAMV4UcmER7m2we2+AukzKETv/QCEc9TsC2iktbPzs/+ljpmZiD2Ruw77eN8vWS9SaA8 5Ly+Avf9hBbge5YSD56FnTzV8hDFKijiD9RuBi79H9EcvL1lW8FUml3ItuNvCOxE8q4M /XtgXZr0oyqXa/At75Ef1J2dkwGFJqwaISPy+8n5WBSax7xxW4zi1vtpbPT9V8MWoS+s +Viim2h9OlUnL5Zz9HSnERjr6Rw9tKyyr2ksghvEL1hcjveK2uiXrwK9Vzjgf1HxFONV dWOw== X-Gm-Message-State: APjAAAWI5hjeHVAgQ58Cv1YKjpzUwcYggDeELi/9Ox9tI6OSv4nS+4AO lSpb4dA2usr5s3opaiYHeAqo9wqAKwxfKC2j5Ok= X-Google-Smtp-Source: APXvYqxi2U9UooawV0q9psPDbHEuo7toKLHy/n7tJOjGK/9sgJltuX4niq93bQ4acTwh59sYqrAzHKUngiPROq+tto8= X-Received: by 2002:a5d:5452:: with SMTP id w18mr12129031wrv.333.1580705895985; Sun, 02 Feb 2020 20:58:15 -0800 (PST) MIME-Version: 1.0 References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> In-Reply-To: From: Jim Meyering Date: Sun, 2 Feb 2020 20:58:04 -0800 Message-ID: Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: Bernhard Voelker Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 Cc: =?UTF-8?Q?P=C3=A1draig_Brady?= , 39364@debbugs.gnu.org, Matthew Pfeiffer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Sun, Feb 2, 2020 at 5:11 AM Bernhard Voelker wrote: > On 2020-02-02 07:32, Jim Meyering wrote: > > FTR, here's a minimal test addition that exercises the bug. Succeeds > > on 6.10, fails on 6.11: > > Minor tweak for the test ... > > -rmdir --ignore-fail-on-non-empty x/y && fail=1 > +returns_ 1 rmdir --ignore-fail-on-non-empty x/y || fail=1 > > > ... due to: > > tests/rmdir/ignore.sh:36:rmdir --ignore-fail-on-non-empty x/y && fail=1 > maint.mk: && fail=1 detected. Please use: returns_ 1 ... || fail=1 > make: *** [cfg.mk:516: sc_prohibit_and_fail_1] Error 1 Thanks. Good point. Though note that I'm pretty sure that prematurely-posted "test" is fundamentally inadequate. I haven't had time to look more closely. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 08:26:46 2020 Received: (at 39364) by debbugs.gnu.org; 3 Feb 2020 13:26:46 +0000 Received: from localhost ([127.0.0.1]:40991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iybkM-00056i-3k for submit@debbugs.gnu.org; Mon, 03 Feb 2020 08:26:46 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iybkK-00056U-Bw for 39364@debbugs.gnu.org; Mon, 03 Feb 2020 08:26:37 -0500 Received: by mail-wm1-f66.google.com with SMTP id a5so15865796wmb.0 for <39364@debbugs.gnu.org>; Mon, 03 Feb 2020 05:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=jH7g4IsF/GWRSiPJZOhNKhd0wczGHkSni6gZ86FoIyw=; b=HnNqqlJXZYlrfyeHe6d6KPPcEBAz5DrOuhbmn6LRR5iar0dfFO7BO8UGf+MisX/QTY 2HU97hmnrj/xjar9P1x3aq/WyuiA0pav6Um3/MYffld++Z02zEKOJhgBGtFenFxjb1yb dLXcl3MMZvKkIjPv2liTxIuRW1D82fh2KTes0gSpDSNMWhB7VthrroraYbvDXpH6xfGY A5eWP/9jUJQ1LSS+jNwRp88rTlYYbye9TjiFnYHDcg8l9IB542EoIydOnPJz2yEjykKp 095Sc5BnT2URN+oQj0Y5maab0MJmw2W61da7yqWOXYgnSlwLaIhMQirhmETB7MqRXPOU RxjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=jH7g4IsF/GWRSiPJZOhNKhd0wczGHkSni6gZ86FoIyw=; b=QtWgLvcvuQZ/05lnnwVUjnZrqC65JqJzy1WMjYEvdu3dLwQ089Gmk4WR1KjW4dqOg2 BlOFOMWl67SWGwT4S6Svs3W3GcsGNtHeAFa7aav+gT81e3jP6wSfY9fuQSgTi8qmNA5y QL/2I/NTYcZX2sK1itGTlpVOToUQFAcIHcQk8bqQoVKh3n8gAzVDhyeRD/mdEIe7Es0r 5faY4utUaSa89kUb8JRvaMXWw0ez85j/vNUcoSyYVoPxUjRTeaHpu/X0+/xE9NTWMihn v5OjINSYLjGt7e5SbI0Us8LoLs3Xu5v9dcs4EddVkXneYtSKOE0BZhkjyo8qSZcIziMt Cr/A== X-Gm-Message-State: APjAAAW29uTEozGrzphv8HOCR0HuXKnfEmheOzzNDfcNVWLjg9tQoNPh gqqJ1rarDjFc8u2NNv0Bv3Q/hUHQ X-Google-Smtp-Source: APXvYqxBXiYQ0C45/I+kAwF+x14iBDRys5CnjgpjcSxaJ2Gxa1m4bB9EuCj+dcfb7gX6YaG8NYV5BA== X-Received: by 2002:a1c:a796:: with SMTP id q144mr30255326wme.6.1580736390268; Mon, 03 Feb 2020 05:26:30 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with ESMTPSA id q124sm35318955wme.2.2020.02.03.05.26.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2020 05:26:29 -0800 (PST) Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno From: =?UTF-8?Q?P=c3=a1draig_Brady?= To: Matthew Pfeiffer , 39364@debbugs.gnu.org References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> Message-ID: Date: Mon, 3 Feb 2020 13:26:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Thunderbird/73.0 MIME-Version: 1.0 In-Reply-To: <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> Content-Type: multipart/mixed; boundary="------------131E8A673634E72AB7A2C5AB" Content-Language: en-US X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) This is a multi-part message in MIME format. --------------131E8A673634E72AB7A2C5AB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 31/01/2020 17:51, Pádraig Brady wrote: > On 31/01/2020 01:46, Matthew Pfeiffer wrote: >> 'rmdir --ignore-fail-on-non-empty' would not report errors on non-empty >> directories that fail for a different reason. >> --- >> src/rmdir.c | 10 ++++++---- >> 1 file changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/src/rmdir.c b/src/rmdir.c >> index c9f417957..7b253ab0d 100644 >> --- a/src/rmdir.c >> +++ b/src/rmdir.c >> @@ -133,18 +133,19 @@ remove_parents (char *dir) >> prog_fprintf (stdout, _("removing directory, %s"), quoteaf (dir)); >> >> ok = (rmdir (dir) == 0); >> + int rmdir_errno = errno; >> >> if (!ok) >> { >> /* Stop quietly if --ignore-fail-on-non-empty. */ >> - if (ignorable_failure (errno, dir)) >> + if (ignorable_failure (rmdir_errno, dir)) >> { >> ok = true; >> } >> else >> { >> /* Barring race conditions, DIR is expected to be a directory. */ >> - error (0, errno, _("failed to remove directory %s"), >> + error (0, rmdir_errno, _("failed to remove directory %s"), >> quoteaf (dir)); >> } >> break; >> @@ -233,12 +234,13 @@ main (int argc, char **argv) >> >> if (rmdir (dir) != 0) >> { >> - if (ignorable_failure (errno, dir)) >> + int rmdir_errno = errno; >> + if (ignorable_failure (rmdir_errno, dir)) >> continue; >> >> /* Here, the diagnostic is less precise, since we have no idea >> whether DIR is a directory. */ >> - error (0, errno, _("failed to remove %s"), quoteaf (dir)); >> + error (0, rmdir_errno, _("failed to remove %s"), quoteaf (dir)); >> ok = false; >> } >> else if (remove_empty_parents) >> > > This looks like a regression introduced in v6.10-21-ged5c4e7 For reference, this was originally discussed at: https://lists.gnu.org/archive/html/bug-coreutils/2008-01/msg00283.html > I.E. is_empty_dir() is globbering errno, and thus > a non specific and non terminating warning is output, > rather than a specific error, and exit. Actually I think the key issue is not errno handling, but a logic error fixed with: @@ -102,7 +102,7 @@ ignorable_failure (int error_number, char const *dir) return (ignore_fail_on_non_empty && (errno_rmdir_non_empty (error_number) || (errno_may_be_empty (error_number) - && is_empty_dir (AT_FDCWD, dir)))); + && ! is_empty_dir (AT_FDCWD, dir)))); Attached is a full patch to address these issues. cheers, Pádraig --------------131E8A673634E72AB7A2C5AB Content-Type: text/x-patch; charset=UTF-8; name="rmdir-ignore-perm.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="rmdir-ignore-perm.patch" >From 3b379d77ec342b66a36d4f39435dccc121ca86eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 30 Jan 2020 20:46:40 -0500 Subject: [PATCH] rmdir: fix --ignore-fail-on-non-empty with permissions errors Since 6.11 `rmdir --ignore-fail-on-non-empty` had reversed the failure status for directories that failed to be removed for permissions reasons. I.E. it would have returned a failure status for such non empty dirs, and vice versa. * src/rmdir.c (errno_may_be_non_empty): Rename from the more confusing errno_may_be_empty(), and remove the EEXIST case (specific to Solaris), which is moot here since handled in errno_rmdir_non_empty(). (ignorable_failure): Fix the logic error so that _non_ empty dirs are deemed to have ignorable failures. (main): Fix clobbering of errno by is_empty_dir(). (remove_parents): Likewise. * tests/rmdir/ignore.sh: Add a test case. * THANKS.in: Add reporter who fixed the errno handling. * NEWS: Mention the bug fix. Fixes https://bugs.gnu.org/39364 --- NEWS | 5 +++++ THANKS.in | 1 + src/rmdir.c | 21 +++++++++++---------- tests/rmdir/ignore.sh | 12 ++++++++++++ 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 5231b84ac..8a349634e 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,11 @@ GNU coreutils NEWS -*- outline -*- (like Solaris 10 and Solaris 11). [bug introduced in coreutils-8.31] + rmdir --ignore-fail-on-non-empty now works correctly for directories + that fail to be removed due to permission issues. Previously the exit status + was reversed, failing for non empty and succeeding for empty directories. + [bug introduced in coreutils-6.11] + 'shuf -r -n 0 file' no longer mistakenly reads from standard input. [bug introduced with the --repeat feature in coreutils-8.22] diff --git a/THANKS.in b/THANKS.in index 23b089754..a667197ed 100644 --- a/THANKS.in +++ b/THANKS.in @@ -420,6 +420,7 @@ Matt Swift swift@alum.mit.edu Matthew Arnison maffew@cat.org.au Matthew Braun matthew@ans.net Matthew Clarke Matthew_Clarke@mindlink.bc.ca +Matthew Pfeiffer spferical@gmail.com Matthew M. Boedicker matthewm@boedicker.org Matthew S. Levine mslevine@theory.lcs.mit.edu Matthew Smith matts@bluesguitar.org diff --git a/src/rmdir.c b/src/rmdir.c index c9f417957..a2f0f0813 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -77,16 +77,15 @@ errno_rmdir_non_empty (int error_number) } /* Return true if when rmdir fails with errno == ERROR_NUMBER - the directory may be empty. */ + the directory may be non empty. */ static bool -errno_may_be_empty (int error_number) +errno_may_be_non_empty (int error_number) { switch (error_number) { case EACCES: case EPERM: case EROFS: - case EEXIST: case EBUSY: return true; default: @@ -101,8 +100,8 @@ ignorable_failure (int error_number, char const *dir) { return (ignore_fail_on_non_empty && (errno_rmdir_non_empty (error_number) - || (errno_may_be_empty (error_number) - && is_empty_dir (AT_FDCWD, dir)))); + || (errno_may_be_non_empty (error_number) + && ! is_empty_dir (AT_FDCWD, dir)))); } /* Remove any empty parent directories of DIR. @@ -133,18 +132,19 @@ remove_parents (char *dir) prog_fprintf (stdout, _("removing directory, %s"), quoteaf (dir)); ok = (rmdir (dir) == 0); + int rmdir_errno = errno; - if (!ok) + if (! ok) { /* Stop quietly if --ignore-fail-on-non-empty. */ - if (ignorable_failure (errno, dir)) + if (ignorable_failure (rmdir_errno, dir)) { ok = true; } else { /* Barring race conditions, DIR is expected to be a directory. */ - error (0, errno, _("failed to remove directory %s"), + error (0, rmdir_errno, _("failed to remove directory %s"), quoteaf (dir)); } break; @@ -233,12 +233,13 @@ main (int argc, char **argv) if (rmdir (dir) != 0) { - if (ignorable_failure (errno, dir)) + int rmdir_errno = errno; + if (ignorable_failure (rmdir_errno, dir)) continue; /* Here, the diagnostic is less precise, since we have no idea whether DIR is a directory. */ - error (0, errno, _("failed to remove %s"), quoteaf (dir)); + error (0, rmdir_errno, _("failed to remove %s"), quoteaf (dir)); ok = false; } else if (remove_empty_parents) diff --git a/tests/rmdir/ignore.sh b/tests/rmdir/ignore.sh index d000c30cb..0d2be25ed 100755 --- a/tests/rmdir/ignore.sh +++ b/tests/rmdir/ignore.sh @@ -29,4 +29,16 @@ test -d "$cwd/a/x" || fail=1 test -d "$cwd/a/b" && fail=1 test -d "$cwd/a/b/c" && fail=1 +# Ensure that with --ignore-fail-on-non-empty, we still fail, e.g., for EPERM. +# Between 6.11 and 8.31, the following rmdir would mistakenly succeed. +mkdir -p x/y || framework_failure_ +chmod a-w x || framework_failure_ +returns_ 1 rmdir --ignore-fail-on-non-empty x/y || fail=1 +test -d x/y || fail=1 +# Between 6.11 and 8.31, the following rmdir would mistakenly fail, +# and also give a non descript error +touch x/y/z || framework_failure_ +rmdir --ignore-fail-on-non-empty x/y || fail=1 +test -d x/y || fail=1 + Exit $fail -- 2.24.1 --------------131E8A673634E72AB7A2C5AB-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 11:36:06 2020 Received: (at 39364) by debbugs.gnu.org; 3 Feb 2020 16:36:06 +0000 Received: from localhost ([127.0.0.1]:42169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyehi-0001ab-4V for submit@debbugs.gnu.org; Mon, 03 Feb 2020 11:36:06 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:52905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyehg-0001a7-5J for 39364@debbugs.gnu.org; Mon, 03 Feb 2020 11:36:05 -0500 Received: by mail-wm1-f49.google.com with SMTP id p9so16695529wmc.2 for <39364@debbugs.gnu.org>; Mon, 03 Feb 2020 08:36:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XkTKuWwyRcCs5LctKB/bGlR0aNa3Hf8jLZBUaz5EgMk=; b=Rch1fGU7xn9dpi38ef/Fk2snYwRIuRsRAhPTfbQGcu5L81K2jkGkmuMgrAW3yX19d3 zGpmyyvKDpThv6ijgUhGJA+50cAX882eZag8//H5IWlppe+JiejjfsLC6XowBEhbAftZ uAo2f50r7UmqtXuW7hzAA8g2ud8PO6AOBNqIu0NEP7IoMpM9DKEv9H00LZhHidFaIHQk Q0pcsSq7mqvPK8UrR6aSefl3yQGBzyP3noStyYyr6duIkMdneryLogSaUsV0GQoW75Rh s4XU+fGfALgDdliuRO1fshc5TBGVpyDmu0F8rSrRfXJZ6W8fh1Kl73SOwHcdEDqAW/Sg tNng== X-Gm-Message-State: APjAAAVhCBjmq85kB12R0+ozTWAxVTOhYVLhTi9a2A1Ibrsq37H0LuTh yju3nJWvhXSAqry5yFPDEn6zDwmx+prsp7fPIW4= X-Google-Smtp-Source: APXvYqwk9KX94jtJ+loz9buWE2yqU/tev18ZtM85PQj6kxQTEJWvMalTzJ6Qa1nMvGPyYJwc2Joxq40tPtkKukH1D7A= X-Received: by 2002:a05:600c:24d2:: with SMTP id 18mr28220462wmu.149.1580747758350; Mon, 03 Feb 2020 08:35:58 -0800 (PST) MIME-Version: 1.0 References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> In-Reply-To: From: Jim Meyering Date: Mon, 3 Feb 2020 08:35:43 -0800 Message-ID: Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: =?UTF-8?Q?P=C3=A1draig_Brady?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 Cc: 39364@debbugs.gnu.org, Matthew Pfeiffer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Mon, Feb 3, 2020 at 5:28 AM P=C3=A1draig Brady wrote: ... > Actually I think the key issue is not errno handling, > but a logic error fixed with: > > @@ -102,7 +102,7 @@ ignorable_failure (int error_number, char const *dir) > return (ignore_fail_on_non_empty > && (errno_rmdir_non_empty (error_number) > || (errno_may_be_empty (error_number) > - && is_empty_dir (AT_FDCWD, dir)))); > + && ! is_empty_dir (AT_FDCWD, dir)))); Nice! Thanks for tracking that down. The patch looks great. You might want to mention (in the log) the commit that introduced the bug, since you already did the work to track it down: v6.10-21-ged5c4e7 I preferred to require that for each NEWS-worthy bug fix, because otherwise, it can be costly to re-derive or dig up in mail archives. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 03 11:45:16 2020 Received: (at 39364) by debbugs.gnu.org; 3 Feb 2020 16:45:16 +0000 Received: from localhost ([127.0.0.1]:42173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyeqa-0001nZ-3k for submit@debbugs.gnu.org; Mon, 03 Feb 2020 11:45:16 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyeqY-0001nH-AU for 39364@debbugs.gnu.org; Mon, 03 Feb 2020 11:45:14 -0500 Received: by mail-wm1-f68.google.com with SMTP id f129so13194wmf.2 for <39364@debbugs.gnu.org>; Mon, 03 Feb 2020 08:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=d4yZfBIT1PGa7GXoZPOBC+6xW2pqdKUUnLBU5gfCv9s=; b=CRyQVSD6SxbiD2fAYi9Bgw1qCqOQ1N9O0cW8tGST/2u7wHREzm5tYUp9HP6/bRCKfY bAxFKJhibbdnTh8Hz1mc5/hUwCbYByh33YfJi6MSxFbkbLgCTnqiXCK/9PGD3cldLYxc WJGpCssZYTKV8XcHnu0jp8IYui4fXPOPwcqhDkN9xgbXLcF70sG2GfvYSmvv6pIogEpI ldPI5O/Wkx6C79HCPQjijM1wI0pSVsf6JdD1olkcBTb4r/vjQHBXON2LYadMIZVpAQiz PBwN4C+IbiJ1WCDb1pI3yPLg1pcYuO1GPYr53y0I5djLrcPQsanai+QKnjtJ8AXmVqx6 nmRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=d4yZfBIT1PGa7GXoZPOBC+6xW2pqdKUUnLBU5gfCv9s=; b=huvZLEbEtsC6UJLTwZzS2DHanFe5ueZv99jd2wxXxIIla4SmXfTigi8CQoBO3v+Eb7 vZmck3O0tbUPvROwStzwDfv08oJyPd1gB0QXlxosEbxMdqXKSXD3PY2Ssup7TEugpcQf pPHyeGXys68KSuH8E4qtqlBYw3KtZNyrZexk6Rp9J0uFHWtoNjp3H0zzOKLqlxtoCX4I AZeuq7eKIbyGJcju6msqVxfP15IB1/Xo5BR8khTbiFMAsEw215coZsQNzMDvIQNl9dSE 59HR+LaRNSPJ79tjRngEKOUIyzJp9wkjgl0Y0/U34Fppp3EXLh2Nmwihly1zzZLEfjfH Bv0A== X-Gm-Message-State: APjAAAV39Y7kjnedtGkPEmx2DeuGorxa2zffYjSDZzjxmzvDT+/Npmeq by3uWKmyzl4tsLQJkrUwhbMPFAJOt/E= X-Google-Smtp-Source: APXvYqx74hxQ9TlNU/7H6nlLn3pg78yfMUB6rJ+EjQcR/ES4Npwfg4zXNAWPfZIaLfRaG2SIozwggg== X-Received: by 2002:a1c:9602:: with SMTP id y2mr29618634wmd.23.1580748308109; Mon, 03 Feb 2020 08:45:08 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with ESMTPSA id m3sm26579462wrs.53.2020.02.03.08.45.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2020 08:45:07 -0800 (PST) Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno From: =?UTF-8?Q?P=c3=a1draig_Brady?= To: Matthew Pfeiffer , 39364@debbugs.gnu.org References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> Message-ID: <6b933a69-53ac-6ba3-bd4e-a4907562236a@draigBrady.com> Date: Mon, 3 Feb 2020 16:45:06 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Thunderbird/73.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 03/02/2020 13:26, Pádraig Brady wrote: > On 31/01/2020 17:51, Pádraig Brady wrote: > Actually I think the key issue is not errno handling, > but a logic error fixed with: > > @@ -102,7 +102,7 @@ ignorable_failure (int error_number, char const *dir) > return (ignore_fail_on_non_empty > && (errno_rmdir_non_empty (error_number) > || (errno_may_be_empty (error_number) > - && is_empty_dir (AT_FDCWD, dir)))); > + && ! is_empty_dir (AT_FDCWD, dir)))); > > > Attached is a full patch to address these issues. I'll also squash this in to the previous commit, to ensure we diagnose the case where we can't determine if the directory is empty. diff --git a/src/rmdir.c b/src/rmdir.c index a2f0f0813..7301db5ee 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -101,7 +101,8 @@ ignorable_failure (int error_number, char const *dir) return (ignore_fail_on_non_empty && (errno_rmdir_non_empty (error_number) || (errno_may_be_non_empty (error_number) - && ! is_empty_dir (AT_FDCWD, dir)))); + && ! is_empty_dir (AT_FDCWD, dir) + && errno == 0 /* definitely non empty */))); } /* Remove any empty parent directories of DIR. diff --git a/src/system.h b/src/system.h index 9d777680c..ebf68349a 100644 --- a/src/system.h +++ b/src/system.h @@ -285,7 +285,9 @@ readdir_ignoring_dot_and_dotdot (DIR *dirp) } } -/* Return true if DIR is determined to be an empty directory. */ +/* Return true if DIR is determined to be an empty directory. + Return false with ERRNO==0 if DIR is a non empty directory. + Return false if not able to determine if directory empty. */ static inline bool is_empty_dir (int fd_cwd, char const *dir) { @@ -310,6 +312,7 @@ is_empty_dir (int fd_cwd, char const *dir) dp = readdir_ignoring_dot_and_dotdot (dirp); saved_errno = errno; closedir (dirp); + errno = saved_errno; if (dp != NULL) return false; return saved_errno == 0 ? true : false; diff --git a/tests/rmdir/ignore.sh b/tests/rmdir/ignore.sh index 0d2be25ed..65e92d012 100755 --- a/tests/rmdir/ignore.sh +++ b/tests/rmdir/ignore.sh @@ -40,5 +40,10 @@ test -d x/y || fail=1 touch x/y/z || framework_failure_ rmdir --ignore-fail-on-non-empty x/y || fail=1 test -d x/y || fail=1 +# assume empty dir if unreadable entries (so failure to remove diagnosed) +rm x/y/z || framework_failure_ +chmod a-r x/y || framework_failure_ +returns_ 1 rmdir --ignore-fail-on-non-empty x/y || fail=1 +test -d x/y || fail=1 Exit $fail From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 04 14:21:54 2020 Received: (at 39364-done) by debbugs.gnu.org; 4 Feb 2020 19:21:54 +0000 Received: from localhost ([127.0.0.1]:44778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iz3li-0007zH-Ct for submit@debbugs.gnu.org; Tue, 04 Feb 2020 14:21:54 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:34537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iz3lf-0007yy-Np; Tue, 04 Feb 2020 14:21:52 -0500 Received: by mail-wm1-f41.google.com with SMTP id s144so2876874wme.1; Tue, 04 Feb 2020 11:21:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fn0WMMfCvnClQYlk4gYlqlAhf1PJlppIjMEvfHIH990=; b=nMEETKV6tPhsN59Y8GCu8GKVya9DghRcisFuNzqbHC3MSpEmI8EOyrTsbbYn13q7pY P65tisrYFQ06+yBPoVfk9aulUu6XMPe8QKrMu2S7Fs4xxkkvpDLkDTYzj1TUnuepBkY6 98PdC413FUmqOlGoBdBoyNlg+M4sG+vL8qKsxtN+Rpj0SDTqCX+K+ObThS/3bdiCt7Mk NyqVqOBeA9M/pd6ASyHlaSSBF3ses46ClOvDGDZbxHVp/UrYp4pzKG+r147Cf987LRKs AEC9V/mzdKHs3byPaZA0VC6Dadq8+2kHhVbN/QwXY/J2R5QR/0lvZ5FEbtVI02tFanUw hRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fn0WMMfCvnClQYlk4gYlqlAhf1PJlppIjMEvfHIH990=; b=BiRjVLLWwqQSUoRzqnqIyBJnnMN/ioLrE85BZwMZZh8nRGzxbpmercDDklLOvQoae2 9Gdo80EaXN93+DultawjCTu9SbAic3UTbz5xm7K0GwCiETtfuGTi0X7V6KhQOuP7oogR cvhte92jzXHqPWDSPBdHMNvwD0WggviZ4ocSZet7iTsWd7IGHA4t0goGPRThAs83XxtX d3XX7q7XL+8sFns3jrmNEq28+B7TP2okJh34PTmTo6xJ99B2KD4JsFsQ2PyWtLXE16gL bsGDX8mRHq0E9FpHbl2p3zBY1XVXwCXv1F4g6Jzx0AcxV/QjhFMa14fPv77F4p5WpERM 4Eig== X-Gm-Message-State: APjAAAVDcWFMi1Go4MyCQ2wvf+SjCfGX/8vD85pu9+rKGKQUv+wuO+WL WxA2atcqnhahJ66z5JZTWTzExKJBuK4= X-Google-Smtp-Source: APXvYqy84O6fLz18apVZ7WusOd4bWul8swoXL3VwI+e2DNHg8/V5I9chUxEKmLhb4GzgsvzvgTBw1Q== X-Received: by 2002:a05:600c:2c0b:: with SMTP id q11mr545822wmg.2.1580844105527; Tue, 04 Feb 2020 11:21:45 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with ESMTPSA id h2sm32473467wrt.45.2020.02.04.11.21.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Feb 2020 11:21:44 -0800 (PST) Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno From: =?UTF-8?Q?P=c3=a1draig_Brady?= To: Matthew Pfeiffer , 39364-done@debbugs.gnu.org References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> <6b933a69-53ac-6ba3-bd4e-a4907562236a@draigBrady.com> Message-ID: Date: Tue, 4 Feb 2020 19:21:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Thunderbird/73.0 MIME-Version: 1.0 In-Reply-To: <6b933a69-53ac-6ba3-bd4e-a4907562236a@draigBrady.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 03/02/2020 16:45, Pádraig Brady wrote: > On 03/02/2020 13:26, Pádraig Brady wrote: >> On 31/01/2020 17:51, Pádraig Brady wrote: >> Actually I think the key issue is not errno handling, >> but a logic error fixed with: >> >> @@ -102,7 +102,7 @@ ignorable_failure (int error_number, char const *dir) >> return (ignore_fail_on_non_empty >> && (errno_rmdir_non_empty (error_number) >> || (errno_may_be_empty (error_number) >> - && is_empty_dir (AT_FDCWD, dir)))); >> + && ! is_empty_dir (AT_FDCWD, dir)))); >> >> >> Attached is a full patch to address these issues. > > I'll also squash this in to the previous commit, > to ensure we diagnose the case where we can't > determine if the directory is empty. pushed. marking done From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 06 13:05:10 2020 Received: (at 39364) by debbugs.gnu.org; 6 Feb 2020 18:05:10 +0000 Received: from localhost ([127.0.0.1]:48434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izlWY-0000DF-GU for submit@debbugs.gnu.org; Thu, 06 Feb 2020 13:05:10 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:43675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1izlWW-0000Cx-IP for 39364@debbugs.gnu.org; Thu, 06 Feb 2020 13:05:09 -0500 Received: from [192.168.101.10] ([93.218.97.181]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MvJjz-1jquAn3unR-00rIae; Thu, 06 Feb 2020 19:05:01 +0100 Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: 39364@debbugs.gnu.org, P@draigBrady.com, spferical@gmail.com References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> <6b933a69-53ac-6ba3-bd4e-a4907562236a@draigBrady.com> From: Bernhard Voelker Autocrypt: addr=mail@bernhard-voelker.de; prefer-encrypt=mutual; keydata= mQENBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+ oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB AAG0K0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT6JATkEEwEC ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BuQENBFPirzMBCADXLWWp QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAGJAR8EGAECAAkFAlPi rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z UyCJ+OymCg== Message-ID: <5e155ff6-91dd-5f8a-6563-6a64ffd6cddb@bernhard-voelker.de> Date: Thu, 6 Feb 2020 19:04:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:M9GsDhvCMiZFIfV9OUd+fJJxoFB2vCzZfHXEVpuTQgErBu4C+QI dyr3A7/Ohx3CGXE21BrvpraW1AIGaAlmFMbeCIr7Q5j0TUB7YBIpYdhyMffgIdNUJHoZX3K iGJY+pXI08VK/b1zWgAcS718qm3TiZ/PpiQR5E5/XoZ6uznjFUFuuznkLMDd/yJSeBwNyFR 0zbF5iQjUxxpfLLZG7qJA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4tT1w9FyQvA=:OwicMBgKiGkbxIvXiLC+C0 JVDQMBDovdgm8+p5AcjVcNY7RgKeA1U1EauwRviLsWvq0LCFIrjo92uz5t7LYWmO0IVh99i4e WE3RPxxq2Q0w84zoubkkLgnCMm7SXhbtJSeiOylGHtUQ7ZE8T6CEW+rjoZUXA97uQpvW8XsV2 /WrtAfWSpb+SMpQFfFyfE1yft5m2kdlERZtmuPvQaXXojZIY0MVsGnapvr/s9wLBZnrC3ENTR doFI3Bnd2jFKnoqUmPRiRwL5LnOq0koxfz6f6YJGeOXU1vUQFfaHnjQZW8arybhZqcEQMd2na Nx2oz2hH3wjTdtIikF85WzTSDiBYoQrLxJ5kP+prOXgYeZS10FUQ3SLDEkilHkEP+ixpbDL1A hWQF50NEczGiIYZUzNq2pMry9CuP49MOvdxYxhke3sG04/zXrfQy9qBxgvNatnRPt2OVJaLYI P7KFn/mIMs4ttzQQv4ZTObonrfHdysXkNSSLriuCr4LwtHGUeBmco+JC7V4xaOnuqYpNliwLP L90DgLR76cgUu+zQkGzpMfRR2vIdJtZapiKn1sD43tXA10bU7NiJkdXrxvQtK+oJKMo+xixSz VsRF2MtDAjIClBiLyqrVuZpREmRl2jUA+LmakGG2YwxMiK8gtkWX9ilCmxzCX7I6nF2vNjhlV 24tDBcKwmuNJUW7wA5ESHbWboG3+daesbZbxRX2coiXKYi56K+h3JHtZniAQxYOKmmrrZELj4 giEyifyiPHOgi13+BEDZZbaPlt47+d5H3lhOZCC0QuSfDwteGfr115MVqyb45r3saL63KFPu9 H0/ixYwCB/ot++lxxa4AtSch4R62FeNUgdGLvL9V6AUvA3RIccfG867HLmY8KENM469AZzS X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39364 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2020-02-04 20:21, Pádraig Brady wrote: > pushed. marking done Hi Padraig, I just noticed that 'is_empty_dir' from 'src/system.h' is also used in 'src/remove.c', so - without having looked there yet - it could be that the patch changed something in rm(1) as well (good or bad). Did you check? Thanks & have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 07 08:58:44 2020 Received: (at 39364) by debbugs.gnu.org; 7 Feb 2020 13:58:44 +0000 Received: from localhost ([127.0.0.1]:49018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j049c-0004Fr-9o for submit@debbugs.gnu.org; Fri, 07 Feb 2020 08:58:44 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j049Z-0004FZ-RP for 39364@debbugs.gnu.org; Fri, 07 Feb 2020 08:58:43 -0500 Received: by mail-wr1-f66.google.com with SMTP id y17so2807885wrh.5 for <39364@debbugs.gnu.org>; Fri, 07 Feb 2020 05:58:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Yf5+i5R35VIktj7a1f9GKZH3XbnojIEihBI90KM1g1c=; b=r4JrqU4xKcDF4pe4HqwKD+B5SPHdZRCgfJPoIh2YsxsfYUE0iEovGczf0IKaGHOAqG fbK16hq9r3pzIRoDD1fW5uXZ6Fq1T/Ko4pgtinAe+mpFxWKvec6X5lwOKahVSRKMZmRx VHHL5EjVaE3w3QnQmmGmrsnBtXsypHX2ejZogtdsa99EhVr+A9jCJoqXayf6O6Mf7kUN otEJS/e9i6pCV6peTAMlTihQG/O3TogVXqFbK38oePAOUpqO48XtfUI3b5TEpyKP4Jas 7aeTxhxpixLpaL4H7GDVEoKWqf0AQ8f6bRvIRD723apWy/lH1636rLZhJFmkMnnAu8MO Io3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Yf5+i5R35VIktj7a1f9GKZH3XbnojIEihBI90KM1g1c=; b=YgmvtKYno2Fza/iypBiO+n7bvOVMavYm+EM6PYFVirtg3V7rUfccxX4z7WCnXPFIMj xbpkpIJvpeDaQhWg+FNB91iRFU4stNA/VlEABYFBmct7t3TD/YJUSbx13raJgEzDq2t3 YXBWUZqmV+IcFSAaCxsP2Csk9o3bS/owz8TKYrqHRroqXr4JxpUPh/afd9yZkBeZBSCm a/sFBtx7Qo+TJ8ORm4+nRopcjmOUf9Y4BOYQkXSm/fNQmrRyaJM7cvk4ndFObx3vTthm BaF6dH37oqlxCXxs6HnyE6aZXrQXP20CeeEHSEYFMsytLA8lqAWDcXGo7TiRN0B2GdS8 1e8Q== X-Gm-Message-State: APjAAAWg8bWBZL7astnirFXxwVIVKz3NhlJWEd7js5QJkTOywwZp/E0y te0fOCsJLaAb7UKBfGOaYYE= X-Google-Smtp-Source: APXvYqyyn2AvHKdmhjrG8kUm0rzgat+N9TzK0HQZoJWOvsFJuejsu/aV8/oNzqoOfBiHfxubObaYbA== X-Received: by 2002:a5d:4446:: with SMTP id x6mr4846600wrr.312.1581083915624; Fri, 07 Feb 2020 05:58:35 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with ESMTPSA id u4sm3431570wrt.37.2020.02.07.05.58.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Feb 2020 05:58:34 -0800 (PST) Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: Bernhard Voelker , 39364@debbugs.gnu.org, spferical@gmail.com References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> <6b933a69-53ac-6ba3-bd4e-a4907562236a@draigBrady.com> <5e155ff6-91dd-5f8a-6563-6a64ffd6cddb@bernhard-voelker.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <6157d362-5658-57e4-f78e-941d5a319c5b@draigBrady.com> Date: Fri, 7 Feb 2020 13:58:33 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Thunderbird/73.0 MIME-Version: 1.0 In-Reply-To: <5e155ff6-91dd-5f8a-6563-6a64ffd6cddb@bernhard-voelker.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 39364 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 06/02/2020 18:04, Bernhard Voelker wrote: > On 2020-02-04 20:21, Pádraig Brady wrote: >> pushed. marking done > > Hi Padraig, > > I just noticed that 'is_empty_dir' from 'src/system.h' is also used > in 'src/remove.c', so - without having looked there yet - it could > be that the patch changed something in rm(1) as well (good or bad). > Did you check? Yes the existing is_empty_dir() interface didn't change. We just added more info (errno) in the non empty case, that is not inspected by remove.c (which is fine for its uses). thanks for checking, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 09 15:29:48 2020 Received: (at 39364) by debbugs.gnu.org; 9 Feb 2020 20:29:48 +0000 Received: from localhost ([127.0.0.1]:53261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0tDA-0004S5-Kh for submit@debbugs.gnu.org; Sun, 09 Feb 2020 15:29:48 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:37185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0tD8-0004Rr-PV for 39364@debbugs.gnu.org; Sun, 09 Feb 2020 15:29:47 -0500 Received: from [192.168.101.10] ([93.218.97.181]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MPooN-1ioSci0cNf-00MrK5; Sun, 09 Feb 2020 21:29:39 +0100 Subject: Re: bug#39364: [PATCH] rmdir: fix clobbered errno To: =?UTF-8?Q?P=c3=a1draig_Brady?= , 39364@debbugs.gnu.org, spferical@gmail.com References: <20200131014640.137395-1-spferical@gmail.com> <452ed139-49e0-554d-2f5d-16f45bb5df1a@draigBrady.com> <6b933a69-53ac-6ba3-bd4e-a4907562236a@draigBrady.com> <5e155ff6-91dd-5f8a-6563-6a64ffd6cddb@bernhard-voelker.de> <6157d362-5658-57e4-f78e-941d5a319c5b@draigBrady.com> From: Bernhard Voelker Autocrypt: addr=mail@bernhard-voelker.de; prefer-encrypt=mutual; keydata= mQENBFPirzMBCACyzYldTjQ4ufFOkByY5Nn5USb5GFoL48nWBwNHjd9KUbtRRNlQiPNKd6hK Gvd3BGi5aoFKA4ytfRk6jbAbW3jVb3R8wYaV08mOy4KVEKxqN4bxsXlMjNChXVR+rtKDmfI+ oPTL+cPH2X6gW4W02IRbVw0uUhNm6zEedC/gNrY/mTlf1enZ46jxZ7BTUZaG+kx38UMISIMB zSzLRtdkwgmHj4jS3p1fF2cwRqLclIfMjKGpbNFPEXeXKWrCLcqHw78795eAR9q0YvrDkfIn GdDBwfb3VM4NdulwIFzvYZMSXvSbbyPLB5YkHU5aAWQHUse4WlfT5ccDpbzUYldRAvF9ABEB AAG0K0Jlcm5oYXJkIFZvZWxrZXIgPG1haWxAYmVybmhhcmQtdm9lbGtlci5kZT6JATkEEwEC ACMFAlPirzMCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBGUC73lpFxle5wCACC dbs0QaJ0vR3Sff2cKdTk41rUq3YfWngsR///IOU0C5DdkePmCnJE/lUsUy0LRTxcUDLxQR+x QHU8ssRT0JUO9726dI3miy36UdsgmBYaOtLvQcidGmW1R7o0PYYf04+TFtyqKgngOUBPpMgR 6o4UsQxy/OD4bN1WDqOgIjL+D/qJpkKmgp6L6+hhaBCpiOFKRmmV7YyQ3SqVlfQNiHs5ZtkR nXpIjgZARV+GllKucI17bO0CGmTJZ1tstVy0+W3DQT1lbBkTTc++5LONM99D3jjn23l1ocOp folR53F7I4cb2RNfT23v1I59RH37lB9wMOqrKj0UjYAC2YoPGQ3BuQENBFPirzMBCADXLWWp QihBldY6reca8ZKdc3T9qXEOa3akE3DWKztIBmNJhtYOjmpLYajQTkGa7UoJTnbmZE2Rn6ZE oNnvb0gcFNAIcY95KOI+bjOR8HEgh4cx2REXh6L6olIgyXqt/KFusE4wtVZAFxZl+30HzN6n D+1HvrjXxPJRX6MsIYOYyyX9/6OofwJK6QHODYGp8WL2olHDnmsXg4AT6Wlr7qKpKrQELlcF R4xkvdmgL/Ghw/tK0yJTxMIcewCCZWLPOXRmFRbvAadZWPAgVsJ63siNyUlVnVMSzDgTJl+s l/DMabXpqrJQx3/1Yy6mTaDs3XZT/wmBKaTLXx/LByaPxQQ7ABEBAAGJAR8EGAECAAkFAlPi rzMCGwwACgkQRlAu95aRcZWVPwgAqZT6iTXkoP37wYb41323RzhBcJ8JSk4cyBDBUXX0lMrM 3qhiClKG7phpxVdu817Gwc6Hsecg7FfjQAV8MHQ0ZFeEFdk3b2rKBqfsStc+h49/xF3Fb+if CzR9qeQF82fMSxkg18++7hMcHCMO/hPZ/Q0xRi+lrSr2QKDJQuLzSyVU14TxrCkevZjEhtma VNvcJlJzCbiBXee9Fpc5jITUXPFG8E8dxqo1n+duOyIMgozrAnzP7X5V/Ob/Ozf/aGGX9+Jd inyfCX18nWcHALKMU/36Eua/ylalf/2c2YkBp9KCLVmGgPkUgW52EeRPgroIsiwu+rwCSV6Z UyCJ+OymCg== Message-ID: <7e68484f-f1cd-9a97-9f97-a95c54008244@bernhard-voelker.de> Date: Sun, 9 Feb 2020 21:29:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <6157d362-5658-57e4-f78e-941d5a319c5b@draigBrady.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:qwaMlEzbJWZjyBoxAI9GnEhIELNQPxZjXTxt42NZnIRbk2R4ucB 7sDQpb1we60K+XH/QCAn+sZJfgPxtWdCfvsq5wsEEKRTTJRas88/dLBxPzMpm5IjhD0Ip3S LG9GdQRJbLWIf3z0HQPmw2oR3IJQFZFmZXNCS+tLIK9+ORlIwdeVNcM2hB49zGMrM/0BJj3 6f9e/YMB0x7XpcLbncrfg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4rhskOLWZac=:9JF5SA4239wI5+nNYAIHtf kV6+jVuSGlZmcdrpnD4RDVCQliYiMZnDrh+C66L7D4qdhYwgslLegY1pf3aC1/n/eo+7fum3j IZsvMhBhFLDicsovZxc7sxGUXaBBzVlbIBdFv88cX8v1KDYIYa9LkVvSyUzejCV4Zg3IB60Aw j1HyBDs6DDZd6PES1VZTOt+tICZVSlnp9YEcBuo8wIous8FkC6Tgugx0O5kjzLMnvowOgkiYO UDbVpVnHummCPAGNLhO+OBfyMytfHnr8+cdNtlnG7Hez4sKEHS/ArtdAHp32kE1kxjfOaOUx8 x+XdNet7p7qyd/wc5SSm7d1rrxqoiWwFmup7uwaZvM9QCAk0TtcljOgVOt9nvOlb2Y1wMRwWz 0OTcZl82Db8VUKu6Z/fvGHMVdJfhSNAeRzNSML7YXpF9Aw6OXyAqZ3Vzbs29i2Pl3dMd3MEV/ nK0MkR9CIO9DJgG/DTTspPecXYDDWw5JRWdLXyr36vNp4n3P/UxhTsIs0PSC6KCiFmlTyMfAR 5/+fj+DmTYz4PhhDdsvxmXWWY7JrSonXb/gAqMgLB+dHwQnssZFUA088wYvKsZ4oMgkyepYlU RPtlfgSQR1wPzgzbEgJNN8MMQADuoMjpHSR66Bbr9WGzuDUPLVJmtM1yIcQOjF7hxJzpQefot zNA1ii73Me6lLp4nBgzG4iliko42O29ig9N6mEE+OaHIHSYcnEvn+KO1YmXmcC4wLyBqTolgn /80HtUfOWP1lwN/aVyt8PGnQZSWkIyP+rBVQUZ+FNYGGa8FqlY4oCDDZAYPEvLaSwY63HP+us EibGKHs2OTzugQsEwhS4AjAC3ue5cRVEZkcPkpy6E6PvqWs8F/A6tjaCZ8VjCVv9A5e0dW7 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39364 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2020-02-07 14:58, Pádraig Brady wrote: > Yes the existing is_empty_dir() interface didn't change. > We just added more info (errno) in the non empty case, > that is not inspected by remove.c (which is fine for its uses). Thanks for checking. Have a nice day, Berny From unknown Tue Jun 17 01:48:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 09 Mar 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator