mac_vfs.c (113487) | mac_vfs.c (113526) |
---|---|
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_vfs.c 113487 2003-04-14 20:39:06Z rwatson $ | 36 * $FreeBSD: head/sys/security/mac/mac_vfs.c 113526 2003-04-15 19:33:23Z 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 --- 733 unchanged lines hidden (view full) --- 778#endif 779 return (error); 780} 781 782int 783mac_init_mbuf_tag(struct m_tag *tag, int flag) 784{ 785 struct label *label; | 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 --- 733 unchanged lines hidden (view full) --- 778#endif 779 return (error); 780} 781 782int 783mac_init_mbuf_tag(struct m_tag *tag, int flag) 784{ 785 struct label *label; |
786 int error, trflag; | 786 int error; |
787 788 label = (struct label *) (tag + 1); 789 mac_init_label(label); 790 | 787 788 label = (struct label *) (tag + 1); 789 mac_init_label(label); 790 |
791 trflag = (flag == M_DONTWAIT ? M_NOWAIT : M_WAITOK); 792 MAC_CHECK(init_mbuf_label, label, trflag); | 791 MAC_CHECK(init_mbuf_label, label, flag); |
793 if (error) { 794 MAC_PERFORM(destroy_mbuf_label, label); 795 mac_destroy_label(label); 796 } 797#ifdef MAC_DEBUG 798 if (error == 0) 799 atomic_add_int(&nmacmbufs, 1); 800#endif --- 3072 unchanged lines hidden --- | 792 if (error) { 793 MAC_PERFORM(destroy_mbuf_label, label); 794 mac_destroy_label(label); 795 } 796#ifdef MAC_DEBUG 797 if (error == 0) 798 atomic_add_int(&nmacmbufs, 1); 799#endif --- 3072 unchanged lines hidden --- |