Deleted Added
full compact
mac_pipe.c (172930) mac_pipe.c (182063)
1/*-
2 * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
3 * Copyright (c) 2006 SPARTA, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project in part by Network
7 * Associates Laboratories, the Security Research Division of Network
8 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"),

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

29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
3 * Copyright (c) 2006 SPARTA, Inc.
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project in part by Network
7 * Associates Laboratories, the Security Research Division of Network
8 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"),

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

29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/security/mac/mac_pipe.c 172930 2007-10-24 19:04:04Z rwatson $");
37__FBSDID("$FreeBSD: head/sys/security/mac/mac_pipe.c 182063 2008-08-23 15:26:36Z rwatson $");
38
39#include "opt_mac.h"
40
41#include <sys/param.h>
42#include <sys/kernel.h>
43#include <sys/lock.h>
44#include <sys/malloc.h>
45#include <sys/module.h>

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

63 MAC_PERFORM(pipe_init_label, label);
64 return (label);
65}
66
67void
68mac_pipe_init(struct pipepair *pp)
69{
70
38
39#include "opt_mac.h"
40
41#include <sys/param.h>
42#include <sys/kernel.h>
43#include <sys/lock.h>
44#include <sys/malloc.h>
45#include <sys/module.h>

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

63 MAC_PERFORM(pipe_init_label, label);
64 return (label);
65}
66
67void
68mac_pipe_init(struct pipepair *pp)
69{
70
71 pp->pp_label = mac_pipe_label_alloc();
71 if (mac_labeled & MPC_OBJECT_PIPE)
72 pp->pp_label = mac_pipe_label_alloc();
73 else
74 pp->pp_label = NULL;
72}
73
74void
75mac_pipe_label_free(struct label *label)
76{
77
78 MAC_PERFORM(pipe_destroy_label, label);
79 mac_labelzone_free(label);
80}
81
82void
83mac_pipe_destroy(struct pipepair *pp)
84{
85
75}
76
77void
78mac_pipe_label_free(struct label *label)
79{
80
81 MAC_PERFORM(pipe_destroy_label, label);
82 mac_labelzone_free(label);
83}
84
85void
86mac_pipe_destroy(struct pipepair *pp)
87{
88
86 mac_pipe_label_free(pp->pp_label);
87 pp->pp_label = NULL;
89 if (pp->pp_label != NULL) {
90 mac_pipe_label_free(pp->pp_label);
91 pp->pp_label = NULL;
92 }
88}
89
90void
91mac_pipe_copy_label(struct label *src, struct label *dest)
92{
93
94 MAC_PERFORM(pipe_copy_label, src, dest);
95}

--- 127 unchanged lines hidden ---
93}
94
95void
96mac_pipe_copy_label(struct label *src, struct label *dest)
97{
98
99 MAC_PERFORM(pipe_copy_label, src, dest);
100}

--- 127 unchanged lines hidden ---