]> arthur.barton.de Git - netatalk.git/commitdiff
patch to fix checking of hostname
authorrufustfirefly <rufustfirefly>
Tue, 13 Nov 2001 15:01:38 +0000 (15:01 +0000)
committerrufustfirefly <rufustfirefly>
Tue, 13 Nov 2001 15:01:38 +0000 (15:01 +0000)
etc/afpd/uam.c
etc/uams/uams_dhx_pam.c
etc/uams/uams_pam.c
include/atalk/uam.h

index d13500f46811f70c6a501e217af996c257b9d6c4..f0d2ea6bd5c7f6fce8058deb416870034cd38e64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uam.c,v 1.14 2001-11-10 18:31:06 srittau Exp $
+ * $Id: uam.c,v 1.15 2001-11-13 15:01:38 rufustfirefly Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -352,7 +352,6 @@ int uam_afpserver_option(void *private, const int what, void *option,
   case UAM_OPTION_PROTOCOL:
     *buf = (void *) obj->proto;
     break;
-#ifdef TRU64
   case UAM_OPTION_CLIENTNAME:
     {
       struct DSI *dsi = obj->handle;
@@ -367,7 +366,6 @@ int uam_afpserver_option(void *private, const int what, void *option,
           *buf = (void *) inet_ntoa( dsi->client.sin_addr );
     }
     break;
-#endif /* TRU64 */
   case UAM_OPTION_COOKIE: 
     /* it's up to the uam to actually store something useful here.
      * this just passes back a handle to the cookie. the uam side
index 999fae7f9fdbdcf7e0ff748a69c0a61cf07acaf1..2a30f670812c2d25f1d135383c5e89e1d3a6a123 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_pam.c,v 1.16 2001-09-05 13:42:16 rufustfirefly Exp $
+ * $Id: uams_dhx_pam.c,v 1.17 2001-11-13 15:01:38 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -360,9 +360,12 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     }
     ibuf += sizeof(sessid);
     
-    if (uam_afpserver_option(obj, UAM_OPTION_HOSTNAME,
+    if (uam_afpserver_option(obj, UAM_OPTION_CLIENTNAME,
                             (void *) &hostname, NULL) < 0)
-      return AFPERR_MISC;
+       {
+       syslog(LOG_INFO, "uams_dhx_pam.c :PAM: unable to retrieve client hostname");
+       hostname = NULL;
+       }
 
     CAST_cbc_encrypt(ibuf, rbuf, CRYPT2BUFLEN, &castkey,
                     msg3_iv, CAST_DECRYPT);
index ab6f765bffdfb705ee81c202aaaf665b6f38aca0..b6222cf605ea71800ab987148a6dba92c969a299 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_pam.c,v 1.9 2001-11-10 18:30:21 srittau Exp $
+ * $Id: uams_pam.c,v 1.10 2001-11-13 15:01:38 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -140,9 +140,13 @@ static int pam_login(void *obj, struct passwd **uam_pwd,
                             (void *) &username, &ulen) < 0)
       return AFPERR_MISC;
 
-    if (uam_afpserver_option(obj, UAM_OPTION_HOSTNAME,
+    if (uam_afpserver_option(obj, UAM_OPTION_CLIENTNAME,
                             (void *) &hostname, NULL) < 0)
-      return AFPERR_MISC;
+       {
+       syslog(LOG_INFO, "uams_pam.c :PAM: unable to retrieve client hostname");
+       hostname = NULL;
+       }
+
 
     len = (unsigned char) *ibuf++;
     if ( len > ulen ) {
index 0345a5485ce25fce600ca3ee5a85b40c9dcb5f64..060bc228588f03b734a94e73fdae4a090b05e637 100644 (file)
@@ -33,9 +33,7 @@
 #define UAM_OPTION_HOSTNAME     (1 << 5) /* get host name */
 #define UAM_OPTION_COOKIE       (1 << 6) /* cookie handle */
 #define UAM_OPTION_PROTOCOL    (1 << 7) /* DSI or ASP */
-#ifdef TRU64
 #define UAM_OPTION_CLIENTNAME   (1 << 8) /* get client IP address */
-#endif /* TRU64 */
 
 /* some password options. you pass these in the length parameter and
  * get back the corresponding option. not all of these are implemented. */