Deleted Added
full compact
mac_cred.c (102102) mac_cred.c (102103)
1/*-
2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
3 * Copyright (c) 2001 Ilmar S. Habibulin
4 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson and Ilmar Habibulin for the
8 * TrustedBSD Project.

--- 22 unchanged lines hidden (view full) ---

31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
1/*-
2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
3 * Copyright (c) 2001 Ilmar S. Habibulin
4 * Copyright (c) 2001, 2002 Networks Associates Technology, Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson and Ilmar Habibulin for the
8 * TrustedBSD Project.

--- 22 unchanged lines hidden (view full) ---

31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * $FreeBSD: head/sys/security/mac/mac_process.c 102102 2002-08-19 15:28:39Z rwatson $
39 * $FreeBSD: head/sys/security/mac/mac_process.c 102103 2002-08-19 15:30:30Z rwatson $
40 */
41/*
42 * Developed by the TrustedBSD Project.
43 *
44 * Framework for extensible kernel access control. Kernel and userland
45 * interface to the framework, policy registration and composition.
46 */
47

--- 2464 unchanged lines hidden (view full) ---

2512 return (error);
2513}
2514
2515int
2516mac_check_proc_debug(struct ucred *cred, struct proc *proc)
2517{
2518 int error;
2519
40 */
41/*
42 * Developed by the TrustedBSD Project.
43 *
44 * Framework for extensible kernel access control. Kernel and userland
45 * interface to the framework, policy registration and composition.
46 */
47

--- 2464 unchanged lines hidden (view full) ---

2512 return (error);
2513}
2514
2515int
2516mac_check_proc_debug(struct ucred *cred, struct proc *proc)
2517{
2518 int error;
2519
2520 PROC_LOCK_ASSERT(proc, MA_OWNED);
2521
2520 if (!mac_enforce_process)
2521 return (0);
2522
2523 MAC_CHECK(check_proc_debug, cred, proc);
2524
2525 return (error);
2526}
2527
2528int
2529mac_check_proc_sched(struct ucred *cred, struct proc *proc)
2530{
2531 int error;
2532
2522 if (!mac_enforce_process)
2523 return (0);
2524
2525 MAC_CHECK(check_proc_debug, cred, proc);
2526
2527 return (error);
2528}
2529
2530int
2531mac_check_proc_sched(struct ucred *cred, struct proc *proc)
2532{
2533 int error;
2534
2535 PROC_LOCK_ASSERT(proc, MA_OWNED);
2536
2533 if (!mac_enforce_process)
2534 return (0);
2535
2536 MAC_CHECK(check_proc_sched, cred, proc);
2537
2538 return (error);
2539}
2540
2541int
2542mac_check_proc_signal(struct ucred *cred, struct proc *proc, int signum)
2543{
2544 int error;
2545
2537 if (!mac_enforce_process)
2538 return (0);
2539
2540 MAC_CHECK(check_proc_sched, cred, proc);
2541
2542 return (error);
2543}
2544
2545int
2546mac_check_proc_signal(struct ucred *cred, struct proc *proc, int signum)
2547{
2548 int error;
2549
2550 PROC_LOCK_ASSERT(proc, MA_OWNED);
2551
2546 if (!mac_enforce_process)
2547 return (0);
2548
2549 MAC_CHECK(check_proc_signal, cred, proc, signum);
2550
2551 return (error);
2552}
2553

--- 615 unchanged lines hidden ---
2552 if (!mac_enforce_process)
2553 return (0);
2554
2555 MAC_CHECK(check_proc_signal, cred, proc, signum);
2556
2557 return (error);
2558}
2559

--- 615 unchanged lines hidden ---