Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/cgdconfig bugfix: was still pulling random bits from /d...



details:   https://anonhg.NetBSD.org/src/rev/89d7cd818c78
branches:  trunk
changeset: 538737:89d7cd818c78
user:      elric <elric%NetBSD.org@localhost>
date:      Mon Oct 28 05:46:01 2002 +0000

description:
bugfix: was still pulling random bits from /dev/random when generating
a paramsfile of type randomkey which does not need them.  Pointed out
by dan%netbsd.org@localhost.

diffstat:

 sbin/cgdconfig/cgdconfig.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cd64b0973fa5 -r 89d7cd818c78 sbin/cgdconfig/cgdconfig.c
--- a/sbin/cgdconfig/cgdconfig.c        Mon Oct 28 00:55:13 2002 +0000
+++ b/sbin/cgdconfig/cgdconfig.c        Mon Oct 28 05:46:01 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdconfig.c,v 1.3 2002/10/12 21:02:18 elric Exp $ */
+/* $NetBSD: cgdconfig.c,v 1.4 2002/10/28 05:46:01 elric Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 __COPYRIGHT(
 "@(#) Copyright (c) 2002\
        The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: cgdconfig.c,v 1.3 2002/10/12 21:02:18 elric Exp $");
+__RCSID("$NetBSD: cgdconfig.c,v 1.4 2002/10/28 05:46:01 elric Exp $");
 #endif
 
 #include <errno.h>
@@ -576,7 +576,7 @@
        if (ret)
                return ret;
 
-       if (!p->keygen_method != KEYGEN_RANDOMKEY) {
+       if (p->keygen_method != KEYGEN_RANDOMKEY) {
                tmp = getrandbits(DEFAULT_SALTLEN);
                params_setkeygen_salt(p, tmp, DEFAULT_SALTLEN);
                free(tmp);



Home | Main Index | Thread Index | Old Index