![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYSystem Utilities Library (libutil, -lutil) SYNOPSIS
int
DESCRIPTIONThis function does some basic security checking on a given path. It is intended to be used by processes running with root privileges in order to decide whether or not to trust the contents of a given file. It uses a method often used to detect system compromise. A file is considered ‘secure’ if it meets the following conditions:
RETURN VALUESThis function returns zero if the file exists and may be considered secure, -2 if the file does not exist, and -1 otherwise to indicate a security failure. The syslog(3) function is used to log any failure of this function, including the reason, at LOG_ERR priority. SEE ALSOHISTORYCode from which this function was derived was contributed to the
FreeBSD project by Berkeley Software Design, Inc.
The function BUGSThe checks carried out are rudimentary and no attempt is made to eliminate race conditions between use of this function and access to the file referenced.
|