diff -uNr qpopper3.0-orig/config.h.in qpopper3.0/config.h.in --- qpopper3.0-orig/config.h.in Sat May 22 00:45:07 1999 +++ qpopper3.0/config.h.in Tue Jun 8 16:38:57 1999 @@ -116,6 +116,12 @@ */ #undef AUTH +/* + * Defines DRAC_AUTH + * + */ +#undef DRAC_AUTH + /* The number of bytes in a unsigned long int. */ #undef SIZEOF_UNSIGNED_LONG_INT diff -uNr qpopper3.0-orig/configure qpopper3.0/configure --- qpopper3.0-orig/configure Sat May 22 00:47:44 1999 +++ qpopper3.0/configure Tue Jun 8 16:55:36 1999 @@ -31,6 +31,8 @@ --enable-log-login Log successful user authentications " ac_help="$ac_help --enable-auto-delete Automatically delete downloaded msgs " +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 @@ -1194,6 +1196,23 @@ 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" + DEFS="$DEFS -DDRAC_AUTH" +fi + SYS_NAME="`uname -sr 2>/dev/null | sed 1q`" if test -z "\$SYS_NAME"; then SYS_NAME=unknown;fi @@ -2714,7 +2733,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -DEFS=-DHAVE_CONFIG_H +DEFS="$DEFS -DHAVE_CONFIG_H" # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} diff -uNr qpopper3.0-orig/configure.in qpopper3.0/configure.in --- qpopper3.0-orig/configure.in Sat May 22 00:45:23 1999 +++ qpopper3.0/configure.in Tue Jun 8 16:36:13 1999 @@ -133,6 +133,13 @@ AC_DEFINE(NOUPDATEONABORT) 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 qpopper3.0-orig/popper/pop_pass.c qpopper3.0/popper/pop_pass.c --- qpopper3.0-orig/popper/pop_pass.c Wed May 5 03:28:12 1999 +++ qpopper3.0/popper/pop_pass.c Tue Jun 8 15:50:22 1999 @@ -14,6 +14,12 @@ # include #endif +#ifdef DRAC_AUTH +#include +#include +#endif /* DRAC_AUTH */ + + #include #include "popper.h" @@ -634,6 +640,14 @@ p->last_msg = 0; p->AuthState = pass; /* plain or kerberos authenticated successfully */ + +#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 */ #ifdef LOG_LOGIN @@ -641,8 +655,8 @@ VERSION, p->user, p->client, p->ipaddr); #endif + 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)); } -