linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Proposal: Allow mounting and bind mounting over symlinks – flag to not expand symlinks
@ 2021-09-03 21:39 Karolin Varner
  0 siblings, 0 replies; only message in thread
From: Karolin Varner @ 2021-09-03 21:39 UTC (permalink / raw)
  To: linux-fsdevel

Morning all!

I would like to propose adding a flag to the syscall underlying mount(2) that disables symlink expansion.

The motivating use case for this is as follows: I am trying to set up a netns namespace that requires a specific DNS setup,
to this end, I am creating a mount namespace and replacing /etc/resolve.conf. Unfortunately, resolv.conf is a symlink provided
by systemd-resolved. Bind mounting over said file with my replacement is impossible: With `-c` option, the `mount` command
actually targets `/etc/resolv.conf` instead of the file it's pointing to, but the kernel expands it internally and seems to
mount over the file being pointed to.

I highly similar use cases exist.

I have tried the nosymfollow option, which did not work. I think it affects only how symlinks are handled once the fs
is mounted.

Best,
Karolin Varner

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-03 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-03 21:39 Proposal: Allow mounting and bind mounting over symlinks – flag to not expand symlinks Karolin Varner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).