Deleted Added
full compact
mac_bsdextended.c (182063) mac_bsdextended.c (182371)
1/*-
2 * Copyright (c) 1999-2002, 2007 Robert N. M. Watson
3 * Copyright (c) 2001-2005 Networks Associates Technology, Inc.
4 * Copyright (c) 2005 Tom Rhodes
5 * Copyright (c) 2006 SPARTA, Inc.
6 * All rights reserved.
7 *
8 * This software was developed by Robert Watson for the TrustedBSD Project.

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

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

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

32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 * $FreeBSD: head/sys/security/mac_bsdextended/mac_bsdextended.c 182063 2008-08-23 15:26:36Z rwatson $
40 * $FreeBSD: head/sys/security/mac_bsdextended/mac_bsdextended.c 182371 2008-08-28 15:23:18Z attilio $
41 */
42
43/*
44 * Developed by the TrustedBSD Project.
45 *
46 * "BSD Extended" MAC policy, allowing the administrator to impose mandatory
47 * firewall-like rules regarding users and file system objects.
48 */

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

431static int
432ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode)
433{
434 int error;
435 struct vattr vap;
436
437 if (!ugidfw_enabled)
438 return (0);
41 */
42
43/*
44 * Developed by the TrustedBSD Project.
45 *
46 * "BSD Extended" MAC policy, allowing the administrator to impose mandatory
47 * firewall-like rules regarding users and file system objects.
48 */

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

431static int
432ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode)
433{
434 int error;
435 struct vattr vap;
436
437 if (!ugidfw_enabled)
438 return (0);
439 error = VOP_GETATTR(vp, &vap, cred, curthread);
439 error = VOP_GETATTR(vp, &vap, cred);
440 if (error)
441 return (error);
442 return (ugidfw_check(cred, vp, &vap, acc_mode));
443}
444
445/*
446 * Object-specific entry point implementations are sorted alphabetically by
447 * object type and then by operation.

--- 304 unchanged lines hidden ---
440 if (error)
441 return (error);
442 return (ugidfw_check(cred, vp, &vap, acc_mode));
443}
444
445/*
446 * Object-specific entry point implementations are sorted alphabetically by
447 * object type and then by operation.

--- 304 unchanged lines hidden ---