-dnl $Id: configure.in,v 1.179.2.3.2.37.2.8 2008-12-02 03:11:58 didg Exp $
+dnl $Id: configure.in,v 1.179.2.3.2.37.2.9 2008-12-03 19:17:27 didg Exp $
dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
bdb_required=no
AC_NETATALK_CNID([bdb_required=yes],[bdb_required=no])
-dnl Check for Berkeley DB library
-if test "x$bdb_required" = "xyes"; then
- AC_PATH_BDB(, [
- AC_MSG_RESULT([])
- AC_MSG_RESULT([Make sure you have the required Berkeley DB libraries AND headers installed.])
- AC_MSG_RESULT([You can download the latest version from http://www.sleepycat.com.])
- AC_MSG_RESULT([If you have installed BDB in a non standard location use the])
- AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option and make sure])
- AC_MSG_RESULT([your linker is configured to check for libraries there.])
- AC_MSG_ERROR([Berkeley DB library required but not found!])
- ])
-fi
-
dnl Check for quota support
AC_CHECK_QUOTA
dnl -- look for openssl, if found enables DHX UAM and Randnum UAM
AC_PATH_SSL
+dnl Check for Berkeley DB library
+if test "x$bdb_required" = "xyes"; then
+ AC_PATH_BDB(, [
+ AC_MSG_RESULT([])
+ AC_MSG_RESULT([Make sure you have the required Berkeley DB libraries AND headers installed.])
+ AC_MSG_RESULT([You can download the latest version from http://www.sleepycat.com.])
+ AC_MSG_RESULT([If you have installed BDB in a non standard location use the])
+ AC_MSG_RESULT([--with-bdb=/path/to/bdb configure option and make sure])
+ AC_MSG_RESULT([your linker is configured to check for libraries there.])
+ AC_MSG_ERROR([Berkeley DB library required but not found!])
+ ])
+fi
+
dnl -- check for crypt
AC_CRYPT
/*
- * $Id: config.c,v 1.13.6.5.2.5 2008-11-14 10:04:52 didg Exp $
+ * $Id: config.c,v 1.13.6.5.2.6 2008-12-03 19:17:27 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int plumb()
{
struct interface *iface;
- char device[ MAXPATHLEN + 1], *p;
+ char device[ MAXPATHLEN + 1], *p, *t;
int fd, ppa;
+ int digits = 0;
for ( iface = interfaces; iface != NULL; iface = iface->i_next ) {
if ( strcmp( iface->i_name, LOOPIFACE ) == 0 ) {
strcpy( device, "/dev/" );
strcat( device, iface->i_name );
- if (( p = strpbrk( device, "0123456789" )) == NULL ) {
+ for (t = device; *t != '\0' ; ++t) {
+ if (isdigit(*t) == 0) {
+ p = t + 1;
+ }
+ else {
+ digits++;
+ }
+ }
+
+ if (digits == 0) {
LOG(log_error, logtype_atalkd, "plumb: invalid device: %s", device );
return -1;
}
/*
- * $Id: uams_dhx_pam.c,v 1.24.6.5.2.1 2005-09-27 10:40:41 didg Exp $
+ * $Id: uams_dhx_pam.c,v 1.24.6.5.2.2 2008-12-03 19:17:27 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
BIGNUM *bn, *gbn, *pbn;
DH *dh;
- /* TODO: seed dhx_setup properly... this is a hack */
-#ifdef sun
- /* *SEVERE* hack... fix */
- RAND_load_file("/var/adm/messages", KEYSIZE);
-#endif /* sun */
-
/* get the client's public key */
if (!(bn = BN_bin2bn(ibuf, KEYSIZE, NULL))) {
/* Log Entry */
/* generate key and make sure that we have enough space */
dh->p = pbn;
dh->g = gbn;
- if (!DH_generate_key(dh) || (BN_num_bytes(dh->pub_key) > KEYSIZE)) {
- /* Log Entry */
- LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s",
- strerror(errno));
- /* Log Entry */
- goto pam_fail;
+ if (DH_generate_key(dh) == 0) {
+ unsigned long dherror;
+ char errbuf[256];
+
+ ERR_load_crypto_strings();
+ dherror = ERR_get_error();
+ ERR_error_string_n(dherror, errbuf, 256);
+
+ LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key (OpenSSL error code: %u, %s)", dherror, errbuf);
+
+ ERR_free_strings();
+ goto pam_fail;
+ }
+ if (BN_num_bytes(dh->pub_key) > KEYSIZE) {
+ LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s", strerror(errno));
+ goto pam_fail;
}
/* figure out the key. store the key in rbuf for now. */
-dnl $Id: db3-check.m4,v 1.11.6.9.2.2 2006-09-09 01:36:39 didg Exp $
+dnl $Id: db3-check.m4,v 1.11.6.9.2.3 2008-12-03 19:17:27 didg Exp $
dnl Autoconf macros to check for the Berkeley DB library
CPPFLAGS="-I${bdbdir}${subdir} $CFLAGS"
CFLAGS=""
LDFLAGS="-L$bdblibdir $LDFLAGS"
+ if test "x$need_dash_r" = "xyes"; then
+ LDFLAGS="$LDFLAGS -R${bdblibdir}"
+ fi
NETATALK_BERKELEY_LINK
if test x"${atalk_cv_lib_db}" != x"no"; then
NETATALK_BDB_CHECK_VERSION
if test x"${atalk_cv_bdb_version}" != x"no"; then
BDB_LIBS="-L${bdblibdir} ${atalk_cv_lib_db}"
+ if test "x$need_dash_r" = "xyes"; then
+ BDB_LIBS="$BDB_LIBS -R${bdblibdir}"
+ fi
BDB_CFLAGS="-I${bdbdir}${subdir}"
BDB_BIN=$bdbbindir
BDB_PATH="`echo $bdbdir | sed 's,include\/db4$,,'`"