Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Override symlink with a normal file

Aperta
#808 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, linux

Direzione di ricerca

Start with bubblewrap's command-line handling for --ro-bind-data and --file, then trace the existing symlink checks used by those options. Define and implement the requested opt-in behavior so a later data or file bind can create a normal file at a symlink path such as /etc/resolv.conf; done means the behavior is explicit and does not silently follow that symlink.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Under systemd /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf

So under a systemd system I need to do like this to setup my mount namespace with my own content on /etc/resolv.conf

$ bwrap --dev-bind / / --proc /proc --tmpfs /run --tmpfs /tmp --unshare-net --ro-bind /run/systemd/resolve /run/systemd/resolve --ro-bind-data 13 /run/systemd/resolve/stub-resolv.conf bash 13< <(echo "nameserver 1.1.1.1")

I would like to see something like this instead

$ bwrap --dev-bind / / --proc /proc --tmpfs /run --tmpfs /tmp --unshare-net --ro-bind-data 13 /etc/resolv.conf bash 13< <(echo "nameserver 1.1.1.1")

Bubblewrap doesn't allow this, it will always resolve the symlink, I would like an option or flag to not resolve the symlink but instead create a normal file in the mount namespace, an overlay file

I know it can be dangerous to escape symlinks, that's why bubblewrap has the checks and this behavior, but I still think this is a legit thing you want to do sometimes, when you are aware of the risks

I would suggest something like a --no-follow-symlink or simliar flag I can do just before --ro-bind-data or --file which would change the behavior of the later, or a completely new data bind / file combo that doesn't follow the symlink first, but makes the user aware it can be dangerous

Lingua principale
C
Stelle
9k
Fork
393
Merge medio
2g 14h
PR unite (30g)
3

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di containers/bubblewrap

Tutte le issue di containers/bubblewrap

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.