From: Karolin Varner <karo@cupdev.net>
To: linux-fsdevel@vger.kernel.org
Subject: Proposal: Allow mounting and bind mounting over symlinks – flag to not expand symlinks
Date: Fri, 3 Sep 2021 23:39:23 +0200 [thread overview]
Message-ID: <e2fbd746-bc05-45e0-34e3-93963326ead6@cupdev.net> (raw)
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
reply other threads:[~2021-09-03 21:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2fbd746-bc05-45e0-34e3-93963326ead6@cupdev.net \
--to=karo@cupdev.net \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).