Deleted Added
full compact
uipc_usrreq.c (157927) uipc_usrreq.c (157999)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California.
4 * Copyright 2004-2006 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California.
4 * Copyright 2004-2006 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/kern/uipc_usrreq.c 157927 2006-04-21 09:25:40Z ps $");
35__FBSDID("$FreeBSD: head/sys/kern/uipc_usrreq.c 157999 2006-04-24 19:09:33Z maxim $");
36
37#include "opt_mac.h"
38
39#include <sys/param.h>
40#include <sys/domain.h>
41#include <sys/fcntl.h>
42#include <sys/malloc.h> /* XXX must be before <sys/file.h> */
43#include <sys/eventhandler.h>

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

945 * process's credentials at that time so we can use
946 * them now.
947 */
948 KASSERT(unp2->unp_flags & UNP_HAVEPCCACHED,
949 ("unp_connect: listener without cached peercred"));
950 memcpy(&unp->unp_peercred, &unp2->unp_peercred,
951 sizeof(unp->unp_peercred));
952 unp->unp_flags |= UNP_HAVEPC;
36
37#include "opt_mac.h"
38
39#include <sys/param.h>
40#include <sys/domain.h>
41#include <sys/fcntl.h>
42#include <sys/malloc.h> /* XXX must be before <sys/file.h> */
43#include <sys/eventhandler.h>

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

945 * process's credentials at that time so we can use
946 * them now.
947 */
948 KASSERT(unp2->unp_flags & UNP_HAVEPCCACHED,
949 ("unp_connect: listener without cached peercred"));
950 memcpy(&unp->unp_peercred, &unp2->unp_peercred,
951 sizeof(unp->unp_peercred));
952 unp->unp_flags |= UNP_HAVEPC;
953 if (unp2->unp_flags & UNP_WANTCRED)
954 unp3->unp_flags |= UNP_WANTCRED;
953#ifdef MAC
954 SOCK_LOCK(so);
955 mac_set_socket_peer_from_socket(so, so3);
956 mac_set_socket_peer_from_socket(so3, so);
957 SOCK_UNLOCK(so);
958#endif
959
960 so2 = so3;

--- 876 unchanged lines hidden ---
955#ifdef MAC
956 SOCK_LOCK(so);
957 mac_set_socket_peer_from_socket(so, so3);
958 mac_set_socket_peer_from_socket(so3, so);
959 SOCK_UNLOCK(so);
960#endif
961
962 so2 = so3;

--- 876 unchanged lines hidden ---