VFS_SUSER(9)
π VFS_SUSER π
okay so bestie, welcome to vfs_suser(9) β the Kernel Developer's Manual page for checking if somebody's credentials have superuser privileges for a mount point β¨ this is kernel dev territory, so grab your iced coffee and let's go π«Ά
πΈ NAME πΈ
vfs_suser β check if credentials have superuser privileges for a mount point π
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mount.h>
int
vfs_suser(struct mount *mp, struct thread *td);
literally just three includes and one function, we love a minimal entrance π
π DESCRIPTION π
so the vfs_suser() function checks if the credentials you handed it include superuser powers for the given mount point. it's giving "are you the moment or not" π¦
here's the vibe check it runs: it looks at whether the thread you passed in has the same credentials as the user that mounted the file system. if yes β it returns 0 π otherwise it returns what priv_check(9) would have returned. no cap, that's the whole thing.
π₯ RETURN VALUES π₯
- the
vfs_suser()function returns0if the user has superuser powers π - and
EPERMotherwise π
bestie, pay attention here β this is the reverse logic of some other implementations ofsuser()in which aTRUEresponse indicates superuser powers. so don't come in here thinking nonzero = yes. it's not that. π
π SEE ALSO π
β HISTORY β
the vfs_suser() function was introduced in FreeBSD 5.2. iconic era honestly π
π AUTHORS π
this manual page was written by Alfred Perlstein. thank u king π«Ά
okay and that's a wrap, bestie π this little gem came out of the Debian corner of the world, dated April 2, 2004, and it lives under the VFS_SUSER(9) name. go forth and check those credentials β¨π
π¦ 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) 2004 Alfred Perlstein
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms