From owner-p4-projects Sat Jul 20 10:28:57 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA0C937B400; Sat, 20 Jul 2002 10:28:46 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7413037B405 for ; Sat, 20 Jul 2002 10:28:45 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11E1743E5E for ; Sat, 20 Jul 2002 10:28:45 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6KHSiJU076422 for ; Sat, 20 Jul 2002 10:28:44 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6KHSiHY076419 for perforce@freebsd.org; Sat, 20 Jul 2002 10:28:44 -0700 (PDT) Date: Sat, 20 Jul 2002 10:28:44 -0700 (PDT) Message-Id: <200207201728.g6KHSiHY076419@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 14530 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14530 Change 14530 by rwatson@rwatson_curry on 2002/07/20 10:28:06 Various cleanups and fixes. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_te/mac_te.c#38 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_te/mac_te.h#7 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_te/mac_te.c#38 (text+ko) ==== @@ -422,7 +422,7 @@ return ("fs unknown"); } - case MAC_TE_CLASS_SYLINK: + case MAC_TE_CLASS_SYMLINK: switch (operation) { default: return ("symlink unknown"); @@ -1052,14 +1052,13 @@ } static int -mac_te_cred_check_readlink_vnode(struct ucred *cred, struct vnode *vp, +mac_te_cred_check_readlink(struct ucred *cred, struct vnode *vp, struct label *vnodelabel) { struct mac_te *subj, *obj; subj = SLOT(&cred->cr_label); - obj = SLOT(filelabel); - KASSERT(vp->v_type == VLNK); + obj = SLOT(vnodelabel); return (mac_te_check(subj, obj, MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK_READLINK)); @@ -1147,7 +1146,7 @@ MAC_TE_CLASS_FILE, MAC_TE_OPERATION_DIR_GETEXTATTR)); case VLNK: return (mac_te_check(SLOT(&cred->cr_label), SLOT(label), - MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK_GETEXTATTR); + MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK_GETEXTATTR)); default: return (mac_te_check(SLOT(&cred->cr_label), SLOT(label), MAC_TE_CLASS_FILE, MAC_TE_OPERATION_FILE_GETEXTATTR)); @@ -1252,7 +1251,7 @@ MAC_TE_CLASS_DIR, MAC_TE_OPERATION_DIR_ADMIN)); case VLNK: return (mac_te_check(SLOT(&cred->cr_label), SLOT(label), - MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK, ADMIN)); + MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK_ADMIN)); default: return (mac_te_check(SLOT(&cred->cr_label), SLOT(label), MAC_TE_CLASS_FILE, MAC_TE_OPERATION_FILE_ADMIN)); @@ -1320,10 +1319,11 @@ MAC_TE_CLASS_DIR, MAC_TE_OPERATION_DIR_DELETE)); case VLNK: return (mac_te_check(SLOT(&cred->cr_label), SLOT(label), - MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK_DELETE); + MAC_TE_CLASS_SYMLINK, MAC_TE_OPERATION_SYMLINK_DELETE)); default: return (mac_te_check(SLOT(&cred->cr_label), SLOT(label), MAC_TE_CLASS_FILE, MAC_TE_OPERATION_FILE_DELETE)); + } } static int @@ -1343,7 +1343,6 @@ MAC_TE_CLASS_FILE, MAC_TE_OPERATION_FILE_DELETEACL)); } } - static int mac_te_cred_check_rename_from_vnode(struct ucred *cred, struct vnode *dvp, @@ -1397,7 +1396,6 @@ mac_te_cred_check_stat_vnode(struct ucred *cred, struct vnode *vp, struct label *label) { - int error; switch (vp->v_type) { case VDIR: ==== //depot/projects/trustedbsd/mac/sys/security/mac_te/mac_te.h#7 (text+ko) ==== @@ -117,6 +117,8 @@ #define MAC_TE_OPERATION_SYMLINK_GETACL 4 #define MAC_TE_OPERATION_SYMLINK_GETEXTATTR 5 #define MAC_TE_OPERATION_SYMLINK_READLINK 6 -#define MAC_TE_OPERATION_SYMLINK_STAT 7 +#define MAC_TE_OPERATION_SYMLINK_SETACL 7 +#define MAC_TE_OPERATION_SYMLINK_SETEXTATTR 8 +#define MAC_TE_OPERATION_SYMLINK_STAT 9 #endif /* _SYS_SECURITY_MAC_TE_H */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message