From: rufustfirefly Date: Tue, 13 Nov 2001 15:01:38 +0000 (+0000) Subject: patch to fix checking of hostname X-Git-Tag: netatalk-1-5-rc1~54 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=7ccc1958a6d4538a3af18bb55ca4f8a7c7e31504;p=netatalk.git patch to fix checking of hostname --- diff --git a/etc/afpd/uam.c b/etc/afpd/uam.c index d13500f4..f0d2ea6b 100644 --- a/etc/afpd/uam.c +++ b/etc/afpd/uam.c @@ -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 diff --git a/etc/uams/uams_dhx_pam.c b/etc/uams/uams_dhx_pam.c index 999fae7f..2a30f670 100644 --- a/etc/uams/uams_dhx_pam.c +++ b/etc/uams/uams_dhx_pam.c @@ -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); diff --git a/etc/uams/uams_pam.c b/etc/uams/uams_pam.c index ab6f765b..b6222cf6 100644 --- a/etc/uams/uams_pam.c +++ b/etc/uams/uams_pam.c @@ -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 ) { diff --git a/include/atalk/uam.h b/include/atalk/uam.h index 0345a548..060bc228 100644 --- a/include/atalk/uam.h +++ b/include/atalk/uam.h @@ -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. */