Deleted Added
full compact
kern_prot.c (277698) kern_prot.c (293897)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
3 * The Regents of the University of California.
4 * (c) UNIX System Laboratories, Inc.
5 * Copyright (c) 2000-2001 Robert N. M. Watson.
6 * All rights reserved.
7 *
8 * All or some portions of this file are derived from material licensed

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

37 * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94
38 */
39
40/*
41 * System calls related to processes and protection
42 */
43
44#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
3 * The Regents of the University of California.
4 * (c) UNIX System Laboratories, Inc.
5 * Copyright (c) 2000-2001 Robert N. M. Watson.
6 * All rights reserved.
7 *
8 * All or some portions of this file are derived from material licensed

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

37 * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94
38 */
39
40/*
41 * System calls related to processes and protection
42 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: stable/10/sys/kern/kern_prot.c 277698 2015-01-25 13:15:12Z kib $");
45__FBSDID("$FreeBSD: stable/10/sys/kern/kern_prot.c 293897 2016-01-14 09:11:42Z glebius $");
46
47#include "opt_compat.h"
48#include "opt_inet.h"
49#include "opt_inet6.h"
50
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/acct.h>

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

83
84#include <security/audit/audit.h>
85#include <security/mac/mac_framework.h>
86
87static MALLOC_DEFINE(M_CRED, "cred", "credentials");
88
89SYSCTL_NODE(_security, OID_AUTO, bsd, CTLFLAG_RW, 0, "BSD security policy");
90
46
47#include "opt_compat.h"
48#include "opt_inet.h"
49#include "opt_inet6.h"
50
51#include <sys/param.h>
52#include <sys/systm.h>
53#include <sys/acct.h>

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

83
84#include <security/audit/audit.h>
85#include <security/mac/mac_framework.h>
86
87static MALLOC_DEFINE(M_CRED, "cred", "credentials");
88
89SYSCTL_NODE(_security, OID_AUTO, bsd, CTLFLAG_RW, 0, "BSD security policy");
90
91static void crextend(struct ucred *cr, int n);
92static void crsetgroups_locked(struct ucred *cr, int ngrp,
93 gid_t *groups);
94
95#ifndef _SYS_SYSPROTO_H_
96struct getpid_args {
97 int dummy;
98};
99#endif

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

1976 crcopy(cr, oldcred);
1977
1978 return (oldcred);
1979}
1980
1981/*
1982 * Extend the passed in credential to hold n items.
1983 */
91static void crsetgroups_locked(struct ucred *cr, int ngrp,
92 gid_t *groups);
93
94#ifndef _SYS_SYSPROTO_H_
95struct getpid_args {
96 int dummy;
97};
98#endif

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

1975 crcopy(cr, oldcred);
1976
1977 return (oldcred);
1978}
1979
1980/*
1981 * Extend the passed in credential to hold n items.
1982 */
1984static void
1983void
1985crextend(struct ucred *cr, int n)
1986{
1987 int cnt;
1988
1989 /* Truncate? */
1990 if (n <= cr->cr_agroups)
1991 return;
1992

--- 238 unchanged lines hidden ---
1984crextend(struct ucred *cr, int n)
1985{
1986 int cnt;
1987
1988 /* Truncate? */
1989 if (n <= cr->cr_agroups)
1990 return;
1991

--- 238 unchanged lines hidden ---