nfsd_file_acquire_local(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfsd_file_acquire_local(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” this one's a nfsd girlie and she is lowkey powerful, so buckle up πŸŽ€


✨ NAME ✨

nfsd_file_acquire_local β€” get a struct nfsd_file with an open file for localio πŸ¦‹


🌸 SYNOPSIS 🌸

__be32 nfsd_file_acquire_local (struct net *net , struct svc_cred *cred
, struct auth_domain *client , struct svc_fh *fhp , unsigned int
may_flags , struct nfsd_file **pnf );

πŸ’– ARGUMENTS πŸ’–

  • net β€” the network namespace where we do the lookup, like, the where of it all 🌐
  • cred β€” the user credential we validate access with, aka who's asking πŸ‘€
  • client β€” the auth_domain used for the LOCALIO lookup 🫢
  • fhp β€” the NFS filehandle of the file to be opened, the actual address of the thing πŸ“¬
  • may_flags β€” the NFSD_MAY_ settings for the file, like the permission vibe check βœ…
  • pnf β€” OUT: the new or found struct nfsd_file object, this is where the good stuff lands ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so this file lookup interface gives you access to a file given the filehandle and the credential πŸ’« No connection-based authorisation is performed β€” none, zero, nada β€” and honestly that's what makes it quite different to other file access mediated by nfsd. Not me pointing that out dramatically, it's literally the manpage's whole thing 😭

It lets a kernel module (think: the NFS client) reach across network and filesystem namespaces to access a file. Cross-namespace reach, main character energy 🌈

πŸ’€ for real though: the security implications of this should be carefully considered before use. Like, carefully carefully. This is not a "yolo it and ship" situation, bestie. πŸ™ˆ

The nfsd_file_object returned by this API is reference-counted but not garbage-collected πŸŽ€ The object is unhashed after the final nfsd_file_put.

Return values, since you asked:

  • nfs_ok β€” pnf points to an nfsd_file with its reference count boosted πŸŽ‰
  • on error, an nfsstat value in network byte order is returned πŸ“¦ (yes, network byte order, do not come for me)

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/nfsd/filecache.c β€” and the whole entourage, fr fr:


okay that's the whole page, go forth and namespace responsibly πŸ§šβ€β™€οΈπŸ’œ

β€” compliments of the ./fs/nfsd source, dated October 2026, serving you nfsd_file_acquire_local(9) realness, periodt πŸ’…β­

πŸ“¦ where this page comes from