This breaks on machines which have both srandom and srand48. Instead,
change krlogin to use krb5_random_confounder; it will do the right
thing.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4561
dc483132-0cff-0310-8789-
dd5450dbe970
+Mon Oct 24 14:46:07 1994 (tytso@rsx-11)
+
+ * configure.in
+ * krlogin.c (des_write): Don't check for srand48 and then try to
+ define srandom to be srand48. This breaks on machines
+ which have both srandom and srand48. Instead, use
+ krb5_random_confounder; it will do the right thing.
+
Wed Oct 19 12:36:47 1994 Theodore Y. Ts'o (tytso@dcl)
* krlogind.c (protocol): Change yet another variable to be an
AC_FUNC_CHECK(setpriority,AC_DEFINE(HAVE_SETPRIORITY))
AC_FUNC_CHECK(setreuid,AC_DEFINE(HAVE_SETREUID))
AC_FUNC_CHECK(setresuid,AC_DEFINE(HAVE_SETRESUID))
-dnl if srand48 is there, use it (krlogind needs it)
-AC_FUNC_CHECK(srand48,AC_DEFINE(srandom,srand48) AC_DEFINE(random,lrand48))
AC_FUNC_CHECK(sigprocmask,
AC_COMPILE_CHECK([sigset_t],
[#include <signal.h>],
seeded = 1;
srandom((int) time((long *)0));
}
+#if 0
garbage = random();
/* insert random garbage */
(void) memcpy(garbage_buf, &garbage, min(sizeof(long),8));
+#else
+ krb5_random_confounder(8, &garbage_buf);
+#endif
/* this "right-justifies" the data in the buffer */
(void) memcpy(garbage_buf + 8 - len, buf, len);