GNU bug report logs - #54287
[PATCH] Fix stat command triggering automount.

Previous Next

Package: coreutils;

Reported by: Rohan Sable <rsable <at> redhat.com>

Date: Mon, 7 Mar 2022 07:57:03 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54287 in the body.
You can then email your comments to 54287 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#54287; Package coreutils. (Mon, 07 Mar 2022 07:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rohan Sable <rsable <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 07 Mar 2022 07:57:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rohan Sable <rsable <at> redhat.com>
To: bug-coreutils <at> gnu.org
Cc: ikent <at> redhat.com, rohanjsable <at> gmail.com, kdudka <at> redhat.com
Subject: [PATCH] Fix stat command triggering automount.
Date: Mon, 7 Mar 2022 13:25:26 +0530
Stat command now internally uses statx syscall.
AT_NO_AUTOMOUNT flag was not set when statx was called.
This triggered the mount of autofs shares.
Added AT_NO_AUTOMOUNT flag to fix this behavior.

Signed-off-by: Rohan Sable <rsable <at> redhat.com>
---
 src/stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stat.c b/src/stat.c
index edafd0285..d173d2f17 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1386,7 +1386,7 @@ do_stat (char const *filename, char const *format, char const *format2)
     }
   else if (!follow_links)
     {
-      flags = AT_SYMLINK_NOFOLLOW;
+      flags = AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT;
     }
 
   if (dont_sync)
-- 
2.34.1





Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Mon, 07 Mar 2022 14:41:02 GMT) Full text and rfc822 format available.

Notification sent to Rohan Sable <rsable <at> redhat.com>:
bug acknowledged by developer. (Mon, 07 Mar 2022 14:41:02 GMT) Full text and rfc822 format available.

Message #10 received at 54287-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Rohan Sable <rsable <at> redhat.com>, 54287-done <at> debbugs.gnu.org
Cc: ikent <at> redhat.com, rohanjsable <at> gmail.com, kdudka <at> redhat.com
Subject: Re: bug#54287: [PATCH] Fix stat command triggering automount.
Date: Mon, 7 Mar 2022 14:40:25 +0000
[Message part 1 (text/plain, inline)]
New stat patch attached to apply AT_NO_AUTOMOUNT
unless --cached=never is specified.

See https://bugs.gnu.org/54286 for more general discussion.
Marking this as done.

cheers,
Pádraig
[stat-no-automount.patch (text/x-patch, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#54287; Package coreutils. (Mon, 07 Mar 2022 15:53:02 GMT) Full text and rfc822 format available.

Message #13 received at 54287-done <at> debbugs.gnu.org (full text, mbox):

From: Kamil Dudka <kdudka <at> redhat.com>
To: Rohan Sable <rsable <at> redhat.com>, 54287-done <at> debbugs.gnu.org,
 Pádraig Brady <P <at> draigbrady.com>
Cc: ikent <at> redhat.com, rohanjsable <at> gmail.com
Subject: Re: bug#54287: [PATCH] Fix stat command triggering automount.
Date: Mon, 07 Mar 2022 16:52:02 +0100
On Monday, March 7, 2022 3:40:25 PM CET Pádraig Brady wrote:
> New stat patch attached to apply AT_NO_AUTOMOUNT
> unless --cached=never is specified.
> 
> See https://bugs.gnu.org/54286 for more general discussion.
> Marking this as done.
> 
> cheers,
> Pádraig

Works as expected.  Thank you both!

Kamil






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Apr 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.