1d97fcfceSRobert Watson /* 2d97fcfceSRobert Watson * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3d97fcfceSRobert Watson * All rights reserved. 4d97fcfceSRobert Watson * 5d97fcfceSRobert Watson * This software was developed by Robert Watson for the TrustedBSD Project. 6d97fcfceSRobert Watson * 7d97fcfceSRobert Watson * Redistribution and use in source and binary forms, with or without 8d97fcfceSRobert Watson * modification, are permitted provided that the following conditions 9d97fcfceSRobert Watson * are met: 10d97fcfceSRobert Watson * 1. Redistributions of source code must retain the above copyright 11d97fcfceSRobert Watson * notice, this list of conditions and the following disclaimer. 12d97fcfceSRobert Watson * 2. Redistributions in binary form must reproduce the above copyright 13d97fcfceSRobert Watson * notice, this list of conditions and the following disclaimer in the 14d97fcfceSRobert Watson * documentation and/or other materials provided with the distribution. 15d97fcfceSRobert Watson * 3. The names of the authors may not be used to endorse or promote 16d97fcfceSRobert Watson * products derived from this software without specific prior written 17d97fcfceSRobert Watson * permission. 18d97fcfceSRobert Watson * 19d97fcfceSRobert Watson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20d97fcfceSRobert Watson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21d97fcfceSRobert Watson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22d97fcfceSRobert Watson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 23d97fcfceSRobert Watson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24d97fcfceSRobert Watson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25d97fcfceSRobert Watson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26d97fcfceSRobert Watson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27d97fcfceSRobert Watson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28d97fcfceSRobert Watson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29d97fcfceSRobert Watson * SUCH DAMAGE. 30d97fcfceSRobert Watson * 31d97fcfceSRobert Watson * $FreeBSD$ 32d97fcfceSRobert Watson */ 33d97fcfceSRobert Watson 34d97fcfceSRobert Watson #include <sys/types.h> 35d97fcfceSRobert Watson #include <sys/mac.h> 36d97fcfceSRobert Watson 37d97fcfceSRobert Watson #include <errno.h> 38d97fcfceSRobert Watson #include <stdlib.h> 39d97fcfceSRobert Watson 40391b1d75SRobert Watson int 41391b1d75SRobert Watson mac_get_fd(int fd, struct mac *label) 42d97fcfceSRobert Watson { 43d97fcfceSRobert Watson 44391b1d75SRobert Watson return (__mac_get_fd(fd, label)); 45d97fcfceSRobert Watson } 46d97fcfceSRobert Watson 47391b1d75SRobert Watson int 48391b1d75SRobert Watson mac_get_file(const char *path, struct mac *label) 49d97fcfceSRobert Watson { 50d97fcfceSRobert Watson 51391b1d75SRobert Watson return (__mac_get_file(path, label)); 52d97fcfceSRobert Watson } 53d97fcfceSRobert Watson 54391b1d75SRobert Watson int 55391b1d75SRobert Watson mac_get_link(const char *path, struct mac *label) 56d97fcfceSRobert Watson { 57d97fcfceSRobert Watson 58391b1d75SRobert Watson return (__mac_get_link(path, label)); 59d97fcfceSRobert Watson } 60d97fcfceSRobert Watson 61391b1d75SRobert Watson int 62391b1d75SRobert Watson mac_get_pid(pid_t pid, struct mac *label) 63391b1d75SRobert Watson { 64391b1d75SRobert Watson 65391b1d75SRobert Watson return (__mac_get_pid(pid, label)); 66d97fcfceSRobert Watson } 67d97fcfceSRobert Watson 68391b1d75SRobert Watson int 69391b1d75SRobert Watson mac_get_proc(struct mac *label) 70391b1d75SRobert Watson { 71391b1d75SRobert Watson 72391b1d75SRobert Watson return (__mac_get_proc(label)); 73d97fcfceSRobert Watson } 74