logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Authors

       This manual page was written by Alfred Perlstein.

Debian                                            April 2, 2004                                     VFS_SUSER(9)

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.

History

       The vfs_suser() function was introduced in FreeBSD 5.2.

Name

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

Return Values

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

See Also

chroot(2), jail(2)

Synopsis

#include<sys/param.h>#include<sys/systm.h>#include<sys/mount.h>intvfs_suser(structmount*mp, structthread*td);

See Also