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_framework.c 106412 2002-11-04 15:13:36Z 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
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
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 ---
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_framework.c 106412 2002-11-04 15:13:36Z 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
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
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 ---