Correct a mistake in so_cred changes. In practice, I don't think that it

would make a difference. However, my previous diff _did_ change the
behavior in some way (not necessarily break it), so I'm fixing it.

Found by:	bde
Submitted by:	bde
This commit is contained in:
Brian Feldman 1999-07-12 18:58:23 +00:00
parent 2dd1e9f4e1
commit 24ad8fe519
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48788

View file

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
* $Id: in_pcb.c,v 1.50 1999/06/17 23:54:50 green Exp $
* $Id: in_pcb.c,v 1.51 1999/06/25 23:46:47 pb Exp $
*/
#include <sys/param.h>
@ -202,7 +202,7 @@ in_pcbbind(inp, nam, p)
return (EACCES);
if (p && p->p_prison)
prison = 1;
if (so->so_cred &&
if (so->so_cred && so->so_cred->p_ruid != 0 &&
!IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) {
t = in_pcblookup_local(inp->inp_pcbinfo,
sin->sin_addr, lport,