tail head cat sleep
QR code linking to this page

Manual Pages  — VFS_SUSER

NAME

vfs_suser – check if credentials have superuser privileges for a mount point

CONTENTS

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.

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.

SEE ALSO

chroot(2), jail(2)

HISTORY

The vfs_suser() function was introduced in FreeBSD 5.2 .

AUTHORS

This manual page was written by Alfred Perlstein.

VFS_SUSER (9) April 2, 2004

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the other numerous idiot lights which plague the modern driver. Rather, if the driver makes a mistake, a giant “?” lights up in the center of the dashboard. “The experienced driver,” says Thompson, “will usually know what's wrong.”