diff --git a/configure.ac b/configure.ac index ae43b9b1..ebb3b1b0 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ AC_CHECK_HEADERS(crypt.h utmp.h \ dnl shadow now uses the libc's shadow implementation AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])]) -AC_CHECK_FUNCS(arc4random_buf l64a fchmod fchown fsync futimes \ +AC_CHECK_FUNCS(arc4random_buf fchmod fchown fsync futimes \ getentropy getrandom getspnam getusershell \ getutent initgroups lckpwdf lutimes \ setgroups updwtmp updwtmpx innetgr getpwnam_r \ diff --git a/libmisc/salt.c b/libmisc/salt.c index e5f633ab..0aeff738 100644 --- a/libmisc/salt.c +++ b/libmisc/salt.c @@ -10,8 +10,6 @@ * * Written by Marek Michalkiewicz , * it is in the public domain. - * - * l64a was Written by J.T. Conklin . Public domain. */ #include @@ -111,42 +109,6 @@ static /*@observer@*/unsigned long YESCRYPT_get_salt_cost (/*@null@*/const int * static /*@observer@*/void YESCRYPT_salt_cost_to_buf (char *buf, unsigned long cost); #endif /* USE_YESCRYPT */ -#if !USE_XCRYPT_GENSALT && !defined(HAVE_L64A) -static /*@observer@*/char *l64a (long value) -{ - static char buf[8]; - char *s = buf; - int digit; - int i; - - if (value < 0) { - errno = EINVAL; - return(NULL); - } - - for (i = 0; value != 0 && i < 6; i++) { - digit = value & 0x3f; - - if (digit < 2) { - *s = digit + '.'; - } else if (digit < 12) { - *s = digit + '0' - 2; - } else if (digit < 38) { - *s = digit + 'A' - 12; - } else { - *s = digit + 'a' - 38; - } - - value >>= 6; - s++; - } - - *s = '\0'; - - return buf; -} -#endif /* !USE_XCRYPT_GENSALT && !defined(HAVE_L64A) */ - /* Read sizeof (long) random bytes from /dev/urandom. */ static long read_random_bytes (void) {