vfs_suser (9)
Leading comments
Copyright (c) 2004 Alfred Perlstein
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or o...
(The comments found at the beginning of the groff file "man9/vfs_suser.9freebsd".)
NAME
vfs_suser
- check if credentials have superuser privileges for a mount point
SYNOPSIS
In sys/param.h
In sys/systm.h
In sys/mount.h
Ft int
Fn vfs_suser struct mount *mp struct thread *td
DESCRIPTION
The
Fn 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_check9
would have returned.
RETURN VALUES
The
Fn vfs_suser
function returns 0 if the user has superuser powers and
Er EPERM
otherwise.
This is the
reverse logic
of some other implementations of
Fn suser
in which a TRUE response indicates superuser powers.
SEE ALSO
chroot(2),
jail(2)
HISTORY
The
Fn vfs_suser
function was introduced in
Fx 5.2 .
AUTHORS
This manual page was written by
An Alfred Perlstein .