summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-03-10 07:46:03 +0000
committerache <ache@FreeBSD.org>1997-03-10 07:46:03 +0000
commita340e72bff7cda56735666839b2746c30bc5008e (patch)
tree4665860f70e1bfcbb8c1ffa873a25a5dca37d97b /usr.bin/passwd
parent8a8c723f8ea12237e946071c773a4799b9c7ff96 (diff)
downloadFreeBSD-src-a340e72bff7cda56735666839b2746c30bc5008e.zip
FreeBSD-src-a340e72bff7cda56735666839b2746c30bc5008e.tar.gz
Add ^ getpid() for better srandom results
Diffstat (limited to 'usr.bin/passwd')
-rw-r--r--usr.bin/passwd/local_passwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c
index bb9cd7c..b28d673 100644
--- a/usr.bin/passwd/local_passwd.c
+++ b/usr.bin/passwd/local_passwd.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: local_passwd.c,v 1.13 1997/02/22 19:56:34 peter Exp $
*/
#ifndef lint
@@ -152,7 +152,7 @@ getnewpasswd(pw, nis)
(void)printf("Mismatch; try again, EOF to quit.\n");
}
/* grab a random printable character that isn't a colon */
- (void)srandom((int)time((time_t *)NULL));
+ (void)srandom((unsigned)(time(NULL) ^ getpid()));
#ifdef NEWSALT
salt[0] = _PASSWORD_EFMT1;
to64(&salt[1], (long)(29 * 25), 4);
OpenPOWER on IntegriCloud