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

feature: support hardlinking fds into `Root`s

Aperta
#355 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
linux, rust
Ambito
backend, security

Direzione di ricerca

Start by reading the existing Root APIs and their tests to understand how file descriptors and mount identity checks are handled; the issue does not name specific files or tests. Then trace how /proc/self/fd/$n is used with linkat(2) and what same-mount-id check is required. Done means libpathrs provides a helper for linking an unlinked file descriptor into a Root, with the required check.

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

Descrizione

api/cffi api/root api/rust impact/feature

Unlinked files (such as those created by O_TMPFILE) can be linked back to the filesystem via /proc/self/fd/$n (or linkat(AT_EMPTY_PATH) but this requires privileges and is thus less preferable). There is also a planned extension to renameat2(2) to allow you to also clobber the target file in the same atomic operation.

This is a very useful operation, especially if you use O_TMPFILE to create and populate a temporary file before making it visible to other programs through the filesystem, but is currently not provided by libpathrs.

This is also something that libpathrs really should provide helpers for, because it requires non-trivial usage of /proc/self/fd/$n that cannot be accomplished purely through our APIs (namely the linkat(2) operation needs to do a same-mount-id check for the fd magiclink).

Lingua principale
Rust
Stelle
146
Fork
12
Merge medio
1g 16h
PR unite (30g)
20

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 cyphar/libpathrs

Tutte le issue di cyphar/libpathrs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.