vfs_suser(9)

vfs_suser9

Check if credentials have superuser privileges for a mount point

Usage

#include <sys/param.h>

#include <sys/systm.h>

#include <sys/mount.h>

int

vfs_suser(struct mount *mp, struct thread *td);

Overview

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 suser(9) would have returned.

Return values

The vfs_suser() function returns 0 if the user has superuser powers and EPERM otherwise. This is the reverse logic of some other implementations of suser() in which a TRUE response indicates superuser powers.

History

The vfs_suser() function was introduced in FreeBSD 5.2.

Authors

This manual page was written by Alfred Perlstein.

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.