Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
a14613fc
Commit
a14613fc
authored
Aug 17, 2000
by
Brian Wellington
Browse files
--with-randomdev sets HAVE_RANDOMDEV, use that instead of /dev/random.
parent
708c4ac0
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
acconfig.h
View file @
a14613fc
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acconfig.h,v 1.2
5
2000/08/
01 01:10:56 tale
Exp $ */
/* $Id: acconfig.h,v 1.2
6
2000/08/
17 18:56:38 bwelling
Exp $ */
/***
*** This file is not to be included by any public header files, because
...
...
@@ -102,3 +102,6 @@ int sigwait(const unsigned int *set, int *sig);
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
} while (0)
#endif
/* SHUTUP_STDARG_CAST && __GNUC__ */
/* define if the system has a random number generating device */
#undef HAVE_RANDOMDEV
bin/dnssec/dnssectool.c
View file @
a14613fc
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.1
8
2000/08/17
01:22:10 gson
Exp $ */
/* $Id: dnssectool.c,v 1.1
9
2000/08/17
18:56:44 bwelling
Exp $ */
#include <config.h>
...
...
@@ -190,7 +190,7 @@ kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
if
(
!
wantkeyboard
)
{
fprintf
(
stderr
,
"You must use the keyboard to create "
"entropy, since your system is lacking
\n
"
);
fprintf
(
stderr
,
"/dev/random
\n\n
"
);
fprintf
(
stderr
,
"/dev/random
(or equivalent)
\n\n
"
);
}
first
=
ISC_FALSE
;
}
...
...
@@ -258,13 +258,15 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
isc_result_totext
(
result
));
}
else
{
#ifdef HAVE_RANDOMDEV
if
(
randomfile
==
NULL
)
{
result
=
isc_entropy_createfilesource
(
*
ectx
,
"/dev/random"
);
HAVE_RANDOMDEV
);
if
(
result
==
ISC_R_SUCCESS
)
return
;
}
else
#endif
wantkeyboard
=
ISC_TRUE
;
result
=
isc_entropy_createcallbacksource
(
*
ectx
,
kbdstart
,
kbdget
,
kbdstop
,
...
...
bin/named/main.c
View file @
a14613fc
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.c,v 1.
79
2000/08/17
01:30:31 gson
Exp $ */
/* $Id: main.c,v 1.
80
2000/08/17
18:56:45 bwelling
Exp $ */
#include <config.h>
...
...
@@ -425,7 +425,9 @@ create_managers(void) {
return
(
ISC_R_UNEXPECTED
);
}
(
void
)
isc_entropy_createfilesource
(
ns_g_entropy
,
"/dev/random"
);
#ifdef HAVE_RANDOMDEV
(
void
)
isc_entropy_createfilesource
(
ns_g_entropy
,
HAVE_RANDOMDEV
);
#endif
return
(
ISC_R_SUCCESS
);
}
...
...
bin/tests/dst/dst_test.c
View file @
a14613fc
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dst_test.c,v 1.3
0
2000/08/
01 01:13:40 tale
Exp $ */
/* $Id: dst_test.c,v 1.3
1
2000/08/
17 18:56:48 bwelling
Exp $ */
#include <config.h>
...
...
@@ -243,7 +243,9 @@ main(void) {
dns_result_register
();
isc_entropy_create
(
mctx
,
&
ectx
);
isc_entropy_createfilesource
(
ectx
,
"/dev/random"
);
#ifdef HAVE_RANDOMDEV
isc_entropy_createfilesource
(
ectx
,
HAVE_RANDOMDEV
);
#endif
isc_entropy_createfilesource
(
ectx
,
"randomfile"
);
dst_lib_init
(
mctx
,
ectx
,
ISC_ENTROPY_BLOCKING
|
ISC_ENTROPY_GOODONLY
);
...
...
bin/tests/dst/t_dst.c
View file @
a14613fc
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: t_dst.c,v 1.3
6
2000/08/
01 01:13:41 tale
Exp $ */
/* $Id: t_dst.c,v 1.3
7
2000/08/
17 18:56:49 bwelling
Exp $ */
#include <config.h>
...
...
@@ -370,7 +370,9 @@ t1(void) {
t_result
(
T_UNRESOLVED
);
return
;
}
isc_entropy_createfilesource
(
ectx
,
"/dev/random"
);
#ifdef HAVE_RANDOMDEV
isc_entropy_createfilesource
(
ectx
,
HAVE_RANDOMDEV
);
#endif
result
=
isc_entropy_createfilesource
(
ectx
,
"randomfile"
);
if
(
isc_result
!=
ISC_R_SUCCESS
)
{
t_info
(
"isc_entropy_create failed %d
\n
"
,
...
...
@@ -844,7 +846,9 @@ t2_vfy(char **av) {
isc_result_totext
(
isc_result
));
return
(
T_UNRESOLVED
);
}
isc_entropy_createfilesource
(
ectx
,
"/dev/random"
);
#ifdef HAVE_RANDOMDEV
isc_entropy_createfilesource
(
ectx
,
HAVE_RANDOMDEV
);
#endif
result
=
isc_entropy_createfilesource
(
ectx
,
"randomfile"
);
if
(
isc_result
!=
ISC_R_SUCCESS
)
{
t_info
(
"isc_entropy_create failed %d
\n
"
,
...
...
bin/tests/tkey_test.c
View file @
a14613fc
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tkey_test.c,v 1.
29
2000/08/
01 01:13:27 tale
Exp $ */
/* $Id: tkey_test.c,v 1.
30
2000/08/
17 18:56:46 bwelling
Exp $ */
/*
* Principal Author: Brian Wellington (core copied from res_test.c)
...
...
@@ -375,10 +375,14 @@ main(int argc, char *argv[]) {
ectx
=
NULL
;
RUNTIME_CHECK
(
isc_entropy_create
(
mctx
,
&
ectx
)
==
ISC_R_SUCCESS
);
result
=
isc_entropy_createfilesource
(
ectx
,
"/dev/random"
);
#ifdef HAVE_RANDOMDEV
result
=
isc_entropy_createfilesource
(
ectx
,
HAVE_RANDOMDEV
);
#else
result
=
ISC_R_NOTFOUND
;
#endif
if
(
result
!=
ISC_R_SUCCESS
)
{
fprintf
(
stderr
,
"%s only runs when
/dev/
random is available.
\n
"
,
"%s only runs when
a
random
device
is available.
\n
"
,
argv
[
0
]);
exit
(
-
1
);
}
...
...
config.h.in
View file @
a14613fc
...
...
@@ -6,16 +6,18 @@
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
*
DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
*
IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
*
INTERNET SOFTWARE
CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
*
INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
*
FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT,
*
NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION
*
WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
*/
/* $Id: config.h.in,v 1.35 2000/08/17 18:56:39 bwelling Exp $ */
/***
*** This file is not to be included by any public header files, because
*** it does not get installed.
...
...
@@ -112,6 +114,9 @@ int sigwait(const unsigned int *set, int *sig);
} while (0)
#endif /* SHUTUP_STDARG_CAST && __GNUC__ */
/* define if the system has a random number generating device */
#undef HAVE_RANDOMDEV
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
...
...
configure
View file @
a14613fc
This diff is collapsed.
Click to expand it.
configure.in
View file @
a14613fc
...
...
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.17
6
$)
AC_REVISION($Revision: 1.17
7
$)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
...
...
@@ -242,7 +242,7 @@ case "$use_gssapi" in
USE_GSSAPI=''
DST_GSSAPI_INC=''
DNS_GSSAPI_LIBS=''
AC_MSG_RESULT(no
ne foun
d)
AC_MSG_RESULT(no
t specifie
d)
;;
yes)
AC_MSG_ERROR([--with-gssapi must specify a path])
...
...
@@ -259,6 +259,39 @@ AC_SUBST(USE_GSSAPI)
AC_SUBST(DST_GSSAPI_INC)
AC_SUBST(DNS_GSSAPI_LIBS)
#
# was --with-randomdev specified?
#
AC_MSG_CHECKING(for random device)
AC_ARG_WITH(randomdev,
[ --with-randomdev=PATH Specify path for random device],
use_randomdev="$withval", use_randomdev="unspec")
case "$use_randomdev" in
unspec)
case "$host" in
*-openbsd*)
AC_DEFINE(HAVE_RANDOMDEV, "/dev/srandom")
AC_MSG_RESULT(using /dev/srandom)
;;
*-linux*|*-freebsd*|*-netbsd*)
AC_DEFINE(HAVE_RANDOMDEV, "/dev/random")
AC_MSG_RESULT(using /dev/random)
;;
*)
AC_MSG_RESULT(not found)
;;
esac
;;
yes)
AC_MSG_ERROR([--with-randomdev must specify a path])
;;
*)
AC_DEFINE_UNQUOTED(HAVE_RANDOMDEV, "$use_randomdev")
AC_MSG_RESULT(using "$use_randomdev")
;;
esac
#
# NetBSD has multiple pthreads implementations. The recommended
# one to use is "unproven-pthreads". The older "mit-pthreads"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment