New submission from Serhiy Storchaka <[email protected]>:
There is a subtle difference between implementations of os.stat() that use
system calls stat() and fstatat(). On Linux, fstatat() by default automounts
the terminal ("basename") component of pathname if it is a directory that is an
automount point. The Linux-specific AT_NO_AUTOMOUNT flag should be set to
prevent automounting. Both stat() and lstat() act as though AT_NO_AUTOMOUNT was
set.
Therefore os.stat() should set AT_NO_AUTOMOUNT if it is defined to simulate the
behavior of stat() and lstat(). New keyword parameter can be added to os.stat()
in new Python release to control this behavior.
There is the same issue with DirEntry.stat().
----------
components: Extension Modules
messages: 333143
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Do not automount in stat() by default
type: behavior
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35677>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com