VFS_CHECKEXP(9)
π VFS_CHECKEXP β the manual page, bestie edition (section 9, Kernel Developer's Manual, in case you were wondering)
okay so like. you're poking around the kernel dev docs and you found VFS_CHECKEXP(9). iconic of you honestly. let's get into it π
β¨ NAME β¨
VFS_CHECKEXP β the little macro that checks if a file system is exported to a client πΈ
π¦ SYNOPSIS π¦
#include <sys/param.h>
#include <sys/mount.h>
int
VFS_CHECKEXP(struct mount *mp, struct sockaddr *nam, int *exflagsp,
struct ucred **credanonp);
π DESCRIPTION π
so the VFS_CHECKEXP() macro is what the NFS server uses to check if a mount point is exported to a client. that's it, that's the whole job. she's a vibe checker for exports π
here's what she expects you to hand her:
mpβ the mount point that's getting checked. the main character in question πnamβ an mbuf containing the network address of the client. like, who's asking to get in π«Άexflagspβ return parameter for the export flags for this client β¨credanonpβ return parameter for the anonymous credentials for this client π
so you call VFS_CHECKEXP() on a file system's mount structure to figure out if it's exported to a client whose address is sitting inside nam. no cap.
it's generally called before VFS_FHTOVP(9), so you can validate that a client actually has access to the file system. like, check the guest list before you let anyone in the door fr fr πͺ
the file system should call vfs_export_lookup(9) with the address of an appropriate netexport structure and the address of the client, nam, to verify that the client can access this file system. that's the assignment. periodt.
β RETURN VALUES β
the export flags and the anonymous credentials specific to the client β the ones that come back from vfs_export_lookup(9) β get returned in *exflagsp and *credanonp. that's the tea, she hands you back your flags and your creds and you go about your day π
π SEE ALSO π
π AUTHORS π
this manual page was written by Alfred Perlstein. thank you king π«Ά
and that's the whole page babes π this little beauty came to you from Debian, dated January 4, 2010, filed under VFS_CHECKEXP(9) β yes she's been slaying since 2010, we love a legacy icon β¨π
πΈ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1999 Alfred Perlstein
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms