diff -ruN cucipop-1.31.orig/cucipop.c cucipop-1.31/cucipop.c
--- cucipop-1.31.orig/cucipop.c	Tue Jan 11 16:13:12 2000
+++ cucipop-1.31/cucipop.c	Sat Jan  8 18:44:36 2000
@@ -11,7 +11,7 @@
  ************************************************************************/
 #ifdef RCS
 static /*const*/char rcsid[]=
- "$Id: cucipop.c,v 1.31 1998/05/13 16:57:39 srb Exp $";
+ "$Id: cucipop.c,v 1.2 2000/01/08 16:44:36 root Exp $";
 #endif
 
 #include "patchlevel.h"
@@ -254,7 +254,7 @@
   if(!(pass=auth_finduser(user,fileno(sockin)))||auth_whatuid(pass)<LOWEST_UID)
      goto ret0;
 #ifdef PAM
-  if(do_pam_authentication(pamh, user, pw))
+  if(do_pam_authentication(pamh, user, pw, peer()))
 #else
   ;{ char*secret;
      if((secret=(char*)auth_getsecret(pass))&&*secret)
diff -ruN cucipop-1.31.orig/pam_authentication.c cucipop-1.31/pam_authentication.c
--- cucipop-1.31.orig/pam_authentication.c	Tue Jan 11 16:13:12 2000
+++ cucipop-1.31/pam_authentication.c	Sat Jan  8 18:42:32 2000
@@ -36,7 +36,8 @@
 int do_pam_authentication(
   pam_handle_t *pamh, 
   const char *user,
-  const char *pass
+  const char *pass,
+  const char *rhost
 ){
     extern struct pam_conv conv_struct;  
 
@@ -45,6 +46,9 @@
 
     if (pam_retval == PAM_SUCCESS) 
         pam_retval = pam_set_item(pamh, PAM_USER, user);
+
+    if (pam_retval == PAM_SUCCESS) 
+        pam_retval = pam_set_item(pamh, PAM_RHOST, rhost);
 
     if (pam_retval == PAM_SUCCESS)
         pam_retval = pam_authenticate(pamh, 0);    /* is user really user? */
diff -ruN cucipop-1.31.orig/pam_authentication.h cucipop-1.31/pam_authentication.h
--- cucipop-1.31.orig/pam_authentication.h	Tue Jan 11 16:13:12 2000
+++ cucipop-1.31/pam_authentication.h	Sat Jan  8 18:40:24 2000
@@ -22,7 +22,8 @@
 int do_pam_authentication(
   pam_handle_t *pamh,
   const char *user,
-  const char *pass
+  const char *pass,
+  const char *rhost
 );
 int cucipop_conv(
   int num_msg,
