From: deraadt Date: Sat, 1 Feb 1997 00:26:04 +0000 (+0000) Subject: randomize xid mode X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2a3620c9b104b1960c9616673a9d0ba31b500483;p=openbsd randomize xid mode --- diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index f235f92bdb2..3394804545b 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypbind.c,v 1.19 1997/01/30 18:26:55 deraadt Exp $ */ +/* $OpenBSD: ypbind.c,v 1.20 1997/02/01 00:26:04 deraadt Exp $ */ /* * Copyright (c) 1996 Theo de Raadt @@ -34,7 +34,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypbind.c,v 1.19 1997/01/30 18:26:55 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypbind.c,v 1.20 1997/02/01 00:26:04 deraadt Exp $"; #endif #include @@ -1106,7 +1106,7 @@ unique_xid(ypdb) { int xid; - xid = (int)ypdb; /* XXX: & 0xffffffff; */ + xid = arc4random(); while (xid2ypdb(xid) != NULL) xid++;