xref: /freebsd/share/man/man9/securelevel_gt.9 (revision b2c76c41be32f904179efed29c0ca04d53f3996c)
12cd7fe4dSJosef El-Rayes.\"
22cd7fe4dSJosef El-Rayes.\" Copyright (c) 2000 Christian S.J. Peron <maneo@bsdpro.com>
32cd7fe4dSJosef El-Rayes.\" All rights reserved.
42cd7fe4dSJosef El-Rayes.\"
52cd7fe4dSJosef El-Rayes.\" Redistribution and use in source and binary forms, with or without
62cd7fe4dSJosef El-Rayes.\" modification, are permitted provided that the following conditions
72cd7fe4dSJosef El-Rayes.\" are met:
82cd7fe4dSJosef El-Rayes.\" 1. Redistributions of source code must retain the above copyright
92cd7fe4dSJosef El-Rayes.\"    notice, this list of conditions and the following disclaimer.
102cd7fe4dSJosef El-Rayes.\" 2. Redistributions in binary form must reproduce the above copyright
112cd7fe4dSJosef El-Rayes.\"    notice, this list of conditions and the following disclaimer in the
122cd7fe4dSJosef El-Rayes.\"    documentation and/or other materials provided with the distribution.
132cd7fe4dSJosef El-Rayes.\" 3. The name of the author may not be used to endorse or promote products
142cd7fe4dSJosef El-Rayes.\"    derived from this software without specific prior written permission.
152cd7fe4dSJosef El-Rayes.\"
162cd7fe4dSJosef El-Rayes.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
172cd7fe4dSJosef El-Rayes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
182cd7fe4dSJosef El-Rayes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
192cd7fe4dSJosef El-Rayes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
202cd7fe4dSJosef El-Rayes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
212cd7fe4dSJosef El-Rayes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
222cd7fe4dSJosef El-Rayes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
232cd7fe4dSJosef El-Rayes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
242cd7fe4dSJosef El-Rayes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
252cd7fe4dSJosef El-Rayes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
262cd7fe4dSJosef El-Rayes.\" SUCH DAMAGE.
272cd7fe4dSJosef El-Rayes.\"
28a1f6cb79SRemko Lodder.Dd June 2, 2007
292cd7fe4dSJosef El-Rayes.Dt SECURELEVEL_GT 9
302cd7fe4dSJosef El-Rayes.Os
312cd7fe4dSJosef El-Rayes.Sh NAME
322cd7fe4dSJosef El-Rayes.Nm securelevel_gt , securelevel_ge
332cd7fe4dSJosef El-Rayes.Nd test active securelevel
342cd7fe4dSJosef El-Rayes.Sh SYNOPSIS
352cd7fe4dSJosef El-Rayes.In sys/types.h
362cd7fe4dSJosef El-Rayes.In sys/proc.h
372cd7fe4dSJosef El-Rayes.Ft int
382cd7fe4dSJosef El-Rayes.Fn securelevel_gt "struct ucred *cr" "int level"
392cd7fe4dSJosef El-Rayes.Ft int
402cd7fe4dSJosef El-Rayes.Fn securelevel_ge "struct ucred *cr" "int level"
412cd7fe4dSJosef El-Rayes.Sh DESCRIPTION
422cd7fe4dSJosef El-RayesThese functions test the active security level against the given
432cd7fe4dSJosef El-Rayes.Fa level .
442cd7fe4dSJosef El-RayesIf the calling credential
452cd7fe4dSJosef El-Rayes.Fa cr
462cd7fe4dSJosef El-Rayeswas imprisoned by the
472cd7fe4dSJosef El-Rayes.Xr jail 2
482cd7fe4dSJosef El-Rayessystem call, and has a
492cd7fe4dSJosef El-Rayesdifferent security level set than the host environment,
502cd7fe4dSJosef El-Rayesthe security level with the highest value is used.
512cd7fe4dSJosef El-Rayes.Pp
522cd7fe4dSJosef El-RayesThe
532cd7fe4dSJosef El-Rayes.Fn securelevel_gt
542cd7fe4dSJosef El-Rayesfunction
552cd7fe4dSJosef El-Rayeswill evaluate whether or not the active security
562cd7fe4dSJosef El-Rayeslevel is greater than the supplied
572cd7fe4dSJosef El-Rayes.Fa level .
582cd7fe4dSJosef El-Rayes.Pp
592cd7fe4dSJosef El-RayesThe
602cd7fe4dSJosef El-Rayes.Fn securelevel_ge
612cd7fe4dSJosef El-Rayesfunction
622cd7fe4dSJosef El-Rayeswill evaluate whether or not the active security
632cd7fe4dSJosef El-Rayeslevel is greater than or equal to the supplied
642cd7fe4dSJosef El-Rayes.Fa level .
652cd7fe4dSJosef El-Rayes.Sh RETURN VALUES
662cd7fe4dSJosef El-RayesThese functions return
672cd7fe4dSJosef El-Rayes.Er EPERM
682cd7fe4dSJosef El-Rayesif condition evaluated to true, and 0 otherwise.
692cd7fe4dSJosef El-Rayes.Sh SEE ALSO
70a1f6cb79SRemko Lodder.Xr securelevel 7
71