diff options
author | jdp <jdp@FreeBSD.org> | 1999-01-21 22:02:31 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1999-01-21 22:02:31 +0000 |
commit | 25c77b90fda774b7f67f29f9fb7aa157ac005f5c (patch) | |
tree | fa49a69202590c9d84508cd8eff107ab8831a0bb /lib/libpam/modules | |
parent | 764f54ee764c51a494be78b184de066a86ad7181 (diff) | |
download | FreeBSD-src-25c77b90fda774b7f67f29f9fb7aa157ac005f5c.zip FreeBSD-src-25c77b90fda774b7f67f29f9fb7aa157ac005f5c.tar.gz |
Revert my last change, "Rename some globals to reduce namespace
pollution." Unfortunately, some of these globals are used by ftpd,
and I broke make world. Pointy hat, please.
Diffstat (limited to 'lib/libpam/modules')
-rw-r--r-- | lib/libpam/modules/pam_kerberosIV/klogin.c | 20 | ||||
-rw-r--r-- | lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/lib/libpam/modules/pam_kerberosIV/klogin.c b/lib/libpam/modules/pam_kerberosIV/klogin.c index d2c2d06..7c61b84 100644 --- a/lib/libpam/modules/pam_kerberosIV/klogin.c +++ b/lib/libpam/modules/pam_kerberosIV/klogin.c @@ -52,9 +52,8 @@ static const char sccsid[] = "@(#)klogin.c 8.3 (Berkeley) 4/2/94"; #define INITIAL_TICKET "krbtgt" #define VERIFY_SERVICE "rcmd" -extern int _pam_notickets; -extern char *_pam_krbtkfile_env; -extern int _pam_noticketsdontcomplain; +extern int notickets; +extern char *krbtkfile_env; /* * Attempt to log the user in using Kerberos authentication @@ -63,7 +62,7 @@ extern int _pam_noticketsdontcomplain; * 1 if Kerberos failed (try local password in login) */ int -_pam_klogin(pw, instance, localhost, password) +klogin(pw, instance, localhost, password) struct passwd *pw; char *instance, *localhost, *password; { @@ -71,6 +70,7 @@ _pam_klogin(pw, instance, localhost, password) char realm[REALM_SZ], savehost[MAXHOSTNAMELEN]; char tkt_location[MAXPATHLEN]; char *krb_get_phost(); + extern int noticketsdontcomplain; #ifdef KLOGIN_PARANOID AUTH_DAT authdata; @@ -78,7 +78,7 @@ _pam_klogin(pw, instance, localhost, password) struct hostent *hp; unsigned long faddr; - _pam_noticketsdontcomplain = 0; /* enable warning message */ + noticketsdontcomplain = 0; /* enable warning message */ #endif /* @@ -93,7 +93,7 @@ _pam_klogin(pw, instance, localhost, password) krb_get_lrealm(realm, 0) != KSUCCESS) return (1); - _pam_noticketsdontcomplain = 0; /* enable warning message */ + noticketsdontcomplain = 0; /* enable warning message */ /* * get TGT for local realm @@ -105,7 +105,7 @@ _pam_klogin(pw, instance, localhost, password) (void)sprintf(tkt_location, "%s%d", TKT_ROOT, pw->pw_uid); else { (void)sprintf(tkt_location, "%s_root_%d", TKT_ROOT, pw->pw_uid); - _pam_krbtkfile_env = tkt_location; + krbtkfile_env = tkt_location; } (void)krb_set_tkt_string(tkt_location); @@ -155,7 +155,7 @@ _pam_klogin(pw, instance, localhost, password) syslog(LOG_NOTICE, "warning: TGT not verified (%s); %s.%s not registered, or srvtab is wrong?", krb_err_txt[kerror], VERIFY_SERVICE, savehost); - _pam_notickets = 0; + notickets = 0; return (0); } @@ -179,7 +179,7 @@ _pam_klogin(pw, instance, localhost, password) &authdata, ""); if (kerror == KSUCCESS) { - _pam_notickets = 0; + notickets = 0; return (0); } @@ -197,7 +197,7 @@ _pam_klogin(pw, instance, localhost, password) dest_tkt(); return (1); #else - _pam_notickets = 0; + notickets = 0; return (0); #endif } diff --git a/lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c b/lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c index a4e3226..403f8d6 100644 --- a/lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c +++ b/lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c @@ -39,12 +39,12 @@ #define PASSWORD_PROMPT "Password:" -extern int _pam_klogin(struct passwd *, char *, char *, char *); +extern int klogin(struct passwd *, char *, char *, char *); -/* Globals used by _pam_klogin.c */ -int _pam_notickets = 1; -int _pam_noticketsdontcomplain = 1; -char *_pam_krbtkfile_env; +/* Globals used by klogin.c */ +int notickets = 1; +int noticketsdontcomplain = 1; +char *krbtkfile_env; PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, @@ -77,17 +77,17 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, else instance = ""; if ((pwd = getpwnam(user)) != NULL && - _pam_klogin(pwd, instance, localhost, (char *)password) == 0) { - if (!(flags & PAM_SILENT) && _pam_notickets && - !_pam_noticketsdontcomplain) + klogin(pwd, instance, localhost, (char *)password) == 0) { + if (!(flags & PAM_SILENT) && notickets && + !noticketsdontcomplain) pam_prompt(pamh, PAM_ERROR_MSG, "Warning: no Kerberos tickets issued", NULL); /* * XXX - I think the ticket file really isn't supposed to * be even created until pam_sm_setcred() is called. */ - if (_pam_krbtkfile_env != NULL) - setenv("KRBTKFILE", _pam_krbtkfile_env, 1); + if (krbtkfile_env != NULL) + setenv("KRBTKFILE", krbtkfile_env, 1); retval = PAM_SUCCESS; } else retval = PAM_AUTH_ERR; |