+Fri Mar 15 01:24:39 1996 Richard Basch <basch@lehman.com>
+
+ * configure.in, ftpd.c: Added shadow password support.
+
Fri Feb 16 15:51:59 1996 Mark Eichin <eichin@cygnus.com>
* ftpcmd.y (yylex): error handling changes from kbalk@hp.com.
AC_SUBST([SETENVSRC])
AC_SUBST([SETENVOBJ])
fi
+AC_MSG_CHECKING([shadow password support])
+AC_CACHE_VAL(krb5_cv_shadow_pwd,
+[AC_TRY_LINK(
+[#include <sys/types.h>
+#include <pwd.h>
+#include <shadow.h>],
+[struct spwd *sp = getspnam("root")],
+krb5_cv_shadow_pwd=yes, krb5_cv_shadow_pwd=no)])
+AC_MSG_RESULT($krb5_cv_shadow_pwd)
+if test $krb5_cv_shadow_pwd = yes; then
+AC_DEFINE(HAVE_SHADOW)
+fi
+dnl
dnl
USE_ANAME
KRB5_LIBRARIES
#include <fcntl.h>
#include <time.h>
#include <pwd.h>
+#ifdef HAVE_SHADOW
+#include <shadow.h>
+#endif
#include <setjmp.h>
#include <netdb.h>
#include <errno.h>
{
static struct passwd save;
register struct passwd *p;
+#ifdef HAVE_SHADOW
+ register struct spwd *sp;
+#endif
char *sgetsave();
if ((p = getpwnam(name)) == NULL)
}
save = *p;
save.pw_name = sgetsave(p->pw_name);
+#ifdef HAVE_SHADOW
+ if ((sp = getspnam(name)) == NULL)
+ save.pw_passwd = sgetsave(p->pw_passwd);
+ else
+ save.pw_passwd = sgetsave(sp->sp_pwdp);
+#else
save.pw_passwd = sgetsave(p->pw_passwd);
+#endif
save.pw_gecos = sgetsave(p->pw_gecos);
save.pw_dir = sgetsave(p->pw_dir);
save.pw_shell = sgetsave(p->pw_shell);