diff -uNr qpopper2.53.orig/config.h.in qpopper2.53/config.h.in --- qpopper2.53.orig/config.h.in Thu Jul 9 18:44:06 1998 +++ qpopper2.53/config.h.in Wed Apr 28 18:02:13 1999 @@ -40,6 +40,7 @@ #undef APOP #undef POPUID #undef GDBM +#undef DRAC_AUTH /* * Define this macro if your system supports special authorization * mechanisms like shadow passowrds or special crypt programs. diff -uNr qpopper2.53.orig/configure qpopper2.53/configure --- qpopper2.53.orig/configure Thu Jul 9 18:44:06 1998 +++ qpopper2.53/configure Wed Apr 28 18:02:20 1999 @@ -23,6 +23,8 @@ --enable-apop=path Set the pop.auth file path [/etc/pop.auth]" ac_help="$ac_help --with-apopuid=pop Set the user who would own the pop.auth file. [pop]" +ac_help="$ac_help + --enable-dracauth enable drac relay authorization " # Initialize some variables set by options. # The variables have the same names as the options, with @@ -970,6 +972,22 @@ fi fi +# Check whether --enable-dracauth or --disable-dracauth was given. +if test "${enable_dracauth+set}" = set; then + enableval="$enable_dracauth" + dracauth="$enableval" +else + dracauth="no" +fi + +if test "$dracauth" != "no"; then + cat >> confdefs.h <&6 + LIBS="$LIBS -L/usr/lib/drac -ldrac" + +fi SYS_NAME="`uname -sr 2>/dev/null | sed 1q`" if test -z "\$SYS_NAME"; then SYS_NAME=unknown;fi diff -uNr qpopper2.53.orig/configure.in qpopper2.53/configure.in --- qpopper2.53.orig/configure.in Thu Jul 9 18:44:06 1998 +++ qpopper2.53/configure.in Wed Apr 28 18:02:50 1999 @@ -76,6 +76,13 @@ fi fi +AC_ARG_ENABLE(dracauth, [ --enable-dracauth enable DRAC_AUTH ], + dracauth="$enableval", dracauth="no") +if test "$dracauth" != "no"; then + AC_MSG_RESULT(Enabled DRAC_AUTH) + AC_DEFINE(DRAC_AUTH) +fi + dnl dnl query for the OS options dnl diff -uNr qpopper2.53.orig/pop_pass.c qpopper2.53/pop_pass.c --- qpopper2.53.orig/pop_pass.c Thu Jul 9 18:44:07 1998 +++ qpopper2.53/pop_pass.c Wed Apr 28 18:02:39 1999 @@ -15,7 +15,11 @@ #if HAVE_STRINGS_H # include #endif - +#ifdef DRAC_AUTH +#include +#include +#endif /* DRAC_AUTH */ + #include #include "popper.h" @@ -630,9 +634,16 @@ /* Initialize the last-message-accessed number */ p->last_msg = 0; +#ifdef DRAC_AUTH + { + char *err; + if (dracauth("localhost", inet_addr(p->ipaddr), &err) != 0) + pop_log(p,POP_PRIORITY,err); + } +#endif /* DRAC_AUTH */ + /* Authorization completed successfully */ return (pop_msg (p,POP_SUCCESS, "%s has %d message%s (%d octets).", p->user,p->msg_count, p->msg_count == 1 ? "" : "s", p->drop_size)); } -