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.

Full log


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





This bug report was last modified 3 years and 75 days ago.

Previous Next


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