VFS_SUSER(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so this is VFS_SUSER(9), the Kernel Developer's Manual page for vfs_suser β€” the function that checks 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);

🌸 DESCRIPTION 🌸

The vfs_suser() function checks if the credentials given include superuser powers for the given mount point. πŸ‘‘

It will check to see if the thread passed in has the same credentials as the user that mounted the file system. If so, it returns 0, otherwise it returns what priv_check(9) would have returned. no cap. ✨

πŸ’– RETURN VALUES πŸ’–

The vfs_suser() function returns 0 if the user has superuser powers and EPERM otherwise.

bestie be careful: this is the reverse logic of some other implementations of suser() in which a TRUE response indicates superuser powers. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ”₯ HISTORY πŸ”₯

The vfs_suser() function was introduced in FreeBSD 5.2. πŸŽ€

πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Alfred Perlstein. 🫢


kisses bestie, this page comes from Debian, dated April 2, 2004, and it’s VFS_SUSER(9) πŸ’…βœ¨

πŸ“¦ where this page comes from