glibc/hurd
Sergey Bugaev bc8879f4f5 hurd: Stop mapping AT_NO_AUTOMOUNT to O_NOTRANS
While AT_NO_AUTOMOUNT is similar in function to the Hurd's O_NOTRANS,
there are significant enough differences in semantics:

1. AT_NO_AUTOMOUNT has no effect on already established mounts,
   whereas O_NOTRANS causes the lookup to ignore both passive and active
   translators. A better approximation of the AT_NO_AUTOMOUNT behavior
   would be to honor active translators, but avoid starting passive
   ones; like what the file_name_lookup_carefully () routine from
   sutils/clookup.c in the Hurd source tree does.

2. On GNU/Hurd, translators are used much more pervasively than mounts
   on "traditional" Unix systems: among other things, translators
   underlie features like symlinks, device nodes, and sockets. And while
   on a "traditional" Unix system, the mountpoint and the root of the
   mounted tree may look similar enough for many purposes (they're both
   directories, for one thing), the Hurd allows for any combination of
   the two node types, and indeed it is common to have e.g. a device
   node "mounted" on top of a regular file node on the underlying
   filesystem. Ignoring the translator and stat'ing the underlying node
   is therefore likely to return very different results from what you'd
   get if you stat the translator's root node.

In practice, mapping AT_NO_AUTOMOUNT to O_NOTRANS was breaking GNU
Coreutils, including stat(1) and ls(1):

$ stat /dev/hd0s1
  File: /dev/hd0s1
  Size: 0       Blocks: 8          IO Block: 8192   regular empty file
Device: 0,8     Inode: 32866       Links: 1

This was also breaking GNOME's glib, where a g_local_file_stat () call
that is supposed to stat () a file through a symlink uses
AT_NO_AUTOMOUNT, which gets mapped to O_NOTRANS, which then causes the
stat () call to stat symlink itself like lstat () would, rather then the
file it points to, which is what the logic expects to happen.

This reverts most of 13710e7e6a
"hurd: Add support for AT_NO_AUTOMOUNT".

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2024-04-30 22:08:16 +02:00
..
hurd hurd: Stop mapping AT_NO_AUTOMOUNT to O_NOTRANS 2024-04-30 22:08:16 +02:00
alloc-fd.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
catch-exc.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
catch-signal.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
compat-20.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ctty-input.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ctty-output.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Depend * Makefile (subdir-target-args): New variable. 2006-02-28 07:11:04 +00:00
dtable.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
exc2signal.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
faultexc.defs Sun May 12 11:16:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> 1996-05-12 16:38:08 +00:00
fchroot.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fcntl-internal.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fd-cleanup.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fd-close.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fd-read.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fd-write.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
fopenport.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
get-host.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
getdport.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
geteuids.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
getumask.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd-raise.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdauth.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdchdir.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdexec.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdfault.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdfault.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdfchdir.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdhost.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdid.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdinit.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdioctl.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdkill.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdlock.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdlock.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdlookup.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdmalloc.c hurd: Fix static-PIE startup 2021-12-28 10:28:22 +01:00
hurdmalloc.h hurdmalloc: Run fork handler as late as possible [BZ #19431] 2016-09-22 01:45:48 +02:00
hurdmsg.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdpid.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdports.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdprio.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdrlimit.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdselect.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdsig.c hurd: Stop relying on VM_MAX_ADDRESS 2024-03-23 22:44:02 +01:00
hurdsock.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdsocket.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdstartup.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurdstartup.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
intern-fd.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
intr-msg.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
intr-rpc.defs Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
intr-rpc.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
longjmp-ts.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
lookup-at.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
lookup-retry.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile hurd: Reformat Makefile. 2024-02-25 13:38:16 -05:00
msgportdemux.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
new-fd.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Notes initial import 1995-02-18 01:27:10 +00:00
openport.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
path-lookup.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pid2task.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
port2fd.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
port-cleanup.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ports-get.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ports-set.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
preempt-sig.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
privports.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
report-wait.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
RPC_gsync_wait_intr.c hurd: Add __lll_abstimed_wait_intr 2020-12-16 01:58:33 +01:00
set-hooks.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
set-host.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
setauth.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
seteuids.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
siginfo.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sigunwind.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stack_chk_fail_local.c hurd: fix build with -fstack-protector-strong 2017-08-27 22:10:17 +02:00
task2pid.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
thread-cancel.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
thread-self.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
trampoline.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Versions hurd: Fix using interposable hurd_thread_self 2023-05-19 20:45:51 +02:00
vpprintf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
xattr.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00