Deleted Added
full compact
mac_cred.c (106412) mac_cred.c (106460)
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.

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

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
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.

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

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

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

1252}
1253
1254void
1255mac_execve_transition(struct ucred *old, struct ucred *new, struct vnode *vp)
1256{
1257
1258 ASSERT_VOP_LOCKED(vp, "mac_execve_transition");
1259
37 */
38/*
39 * Developed by the TrustedBSD Project.
40 *
41 * Framework for extensible kernel access control. Kernel and userland
42 * interface to the framework, policy registration and composition.
43 */
44

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

1252}
1253
1254void
1255mac_execve_transition(struct ucred *old, struct ucred *new, struct vnode *vp)
1256{
1257
1258 ASSERT_VOP_LOCKED(vp, "mac_execve_transition");
1259
1260 if (!mac_enforce_process && !mac_enforce_fs)
1261 return;
1262
1260 MAC_PERFORM(execve_transition, old, new, vp, &vp->v_label);
1261}
1262
1263int
1264mac_execve_will_transition(struct ucred *old, struct vnode *vp)
1265{
1266 int result;
1267
1263 MAC_PERFORM(execve_transition, old, new, vp, &vp->v_label);
1264}
1265
1266int
1267mac_execve_will_transition(struct ucred *old, struct vnode *vp)
1268{
1269 int result;
1270
1271 ASSERT_VOP_LOCKED(vp, "mac_execve_will_transition");
1272
1273 if (!mac_enforce_process && !mac_enforce_fs)
1274 return (0);
1275
1268 result = 0;
1269 MAC_BOOLEAN(execve_will_transition, ||, old, vp, &vp->v_label);
1270
1271 return (result);
1272}
1273
1274int
1275mac_check_vnode_access(struct ucred *cred, struct vnode *vp, int acc_mode)

--- 2261 unchanged lines hidden ---
1276 result = 0;
1277 MAC_BOOLEAN(execve_will_transition, ||, old, vp, &vp->v_label);
1278
1279 return (result);
1280}
1281
1282int
1283mac_check_vnode_access(struct ucred *cred, struct vnode *vp, int acc_mode)

--- 2261 unchanged lines hidden ---