From bd617e3b9887650446f7c75bb79497db9c517f33 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 2 Jun 2017 17:39:05 +0000 Subject: Remove write only flag UNP_HAVEPCCACHED. --- sys/kern/uipc_usrreq.c | 7 ------- sys/sys/unpcb.h | 6 ------ 2 files changed, 13 deletions(-) (limited to 'sys') diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index d4649a759fc7..1d396bab2f87 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -758,7 +758,6 @@ uipc_listen(struct socket *so, int backlog, struct thread *td) error = solisten_proto_check(so); if (error == 0) { cru2x(td->td_ucred, &unp->unp_peercred); - unp->unp_flags |= UNP_HAVEPCCACHED; solisten_proto(so, backlog); } SOCK_UNLOCK(so); @@ -1429,8 +1428,6 @@ unp_connectat(int fd, struct socket *so, struct sockaddr *nam, * listen(); uipc_listen() cached that process's credentials * at that time so we can use them now. */ - KASSERT(unp2->unp_flags & UNP_HAVEPCCACHED, - ("unp_connect: listener without cached peercred")); memcpy(&unp->unp_peercred, &unp2->unp_peercred, sizeof(unp->unp_peercred)); unp->unp_flags |= UNP_HAVEPC; @@ -2497,10 +2494,6 @@ db_print_unpflags(int unp_flags) db_printf("%sUNP_HAVEPC", comma ? ", " : ""); comma = 1; } - if (unp_flags & UNP_HAVEPCCACHED) { - db_printf("%sUNP_HAVEPCCACHED", comma ? ", " : ""); - comma = 1; - } if (unp_flags & UNP_WANTCRED) { db_printf("%sUNP_WANTCRED", comma ? ", " : ""); comma = 1; diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h index a1194ca79783..f18786553de4 100644 --- a/sys/sys/unpcb.h +++ b/sys/sys/unpcb.h @@ -92,14 +92,8 @@ struct unpcb { * and is really the credentials of the connected peer. This is used * to determine whether the contents should be sent to the user or * not. - * - * UNP_HAVEPCCACHED - indicates that the unp_peercred member is filled - * in, but does *not* contain the credentials of the connected peer - * (there may not even be a peer). This is set in unp_listen() when - * it fills in unp_peercred for later consumption by unp_connect(). */ #define UNP_HAVEPC 0x001 -#define UNP_HAVEPCCACHED 0x002 #define UNP_WANTCRED 0x004 /* credentials wanted */ #define UNP_CONNWAIT 0x008 /* connect blocks until accepted */ -- cgit v1.2.3