summaryrefslogtreecommitdiffstats
path: root/lib/libpam
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1999-01-20 22:50:37 +0000
committerjdp <jdp@FreeBSD.org>1999-01-20 22:50:37 +0000
commit27b3c47e849a1b0e669fc87ee360edc9b5d0716e (patch)
tree22a542306f5d95de2cf1baccf98be4e1680280dd /lib/libpam
parent54b13b2539a02054a483f2b9fa413910d32b3867 (diff)
downloadFreeBSD-src-27b3c47e849a1b0e669fc87ee360edc9b5d0716e.zip
FreeBSD-src-27b3c47e849a1b0e669fc87ee360edc9b5d0716e.tar.gz
Rename some globals to reduce namespace pollution.
Diffstat (limited to 'lib/libpam')
-rw-r--r--lib/libpam/modules/pam_kerberosIV/klogin.c20
-rw-r--r--lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c20
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 7c61b84..d2c2d06 100644
--- a/lib/libpam/modules/pam_kerberosIV/klogin.c
+++ b/lib/libpam/modules/pam_kerberosIV/klogin.c
@@ -52,8 +52,9 @@ static const char sccsid[] = "@(#)klogin.c 8.3 (Berkeley) 4/2/94";
#define INITIAL_TICKET "krbtgt"
#define VERIFY_SERVICE "rcmd"
-extern int notickets;
-extern char *krbtkfile_env;
+extern int _pam_notickets;
+extern char *_pam_krbtkfile_env;
+extern int _pam_noticketsdontcomplain;
/*
* Attempt to log the user in using Kerberos authentication
@@ -62,7 +63,7 @@ extern char *krbtkfile_env;
* 1 if Kerberos failed (try local password in login)
*/
int
-klogin(pw, instance, localhost, password)
+_pam_klogin(pw, instance, localhost, password)
struct passwd *pw;
char *instance, *localhost, *password;
{
@@ -70,7 +71,6 @@ 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 @@ klogin(pw, instance, localhost, password)
struct hostent *hp;
unsigned long faddr;
- noticketsdontcomplain = 0; /* enable warning message */
+ _pam_noticketsdontcomplain = 0; /* enable warning message */
#endif
/*
@@ -93,7 +93,7 @@ klogin(pw, instance, localhost, password)
krb_get_lrealm(realm, 0) != KSUCCESS)
return (1);
- noticketsdontcomplain = 0; /* enable warning message */
+ _pam_noticketsdontcomplain = 0; /* enable warning message */
/*
* get TGT for local realm
@@ -105,7 +105,7 @@ 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);
- krbtkfile_env = tkt_location;
+ _pam_krbtkfile_env = tkt_location;
}
(void)krb_set_tkt_string(tkt_location);
@@ -155,7 +155,7 @@ 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);
- notickets = 0;
+ _pam_notickets = 0;
return (0);
}
@@ -179,7 +179,7 @@ klogin(pw, instance, localhost, password)
&authdata, "");
if (kerror == KSUCCESS) {
- notickets = 0;
+ _pam_notickets = 0;
return (0);
}
@@ -197,7 +197,7 @@ klogin(pw, instance, localhost, password)
dest_tkt();
return (1);
#else
- notickets = 0;
+ _pam_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 403f8d6..a4e3226 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 klogin(struct passwd *, char *, char *, char *);
+extern int _pam_klogin(struct passwd *, char *, char *, char *);
-/* Globals used by klogin.c */
-int notickets = 1;
-int noticketsdontcomplain = 1;
-char *krbtkfile_env;
+/* Globals used by _pam_klogin.c */
+int _pam_notickets = 1;
+int _pam_noticketsdontcomplain = 1;
+char *_pam_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 &&
- klogin(pwd, instance, localhost, (char *)password) == 0) {
- if (!(flags & PAM_SILENT) && notickets &&
- !noticketsdontcomplain)
+ _pam_klogin(pwd, instance, localhost, (char *)password) == 0) {
+ if (!(flags & PAM_SILENT) && _pam_notickets &&
+ !_pam_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 (krbtkfile_env != NULL)
- setenv("KRBTKFILE", krbtkfile_env, 1);
+ if (_pam_krbtkfile_env != NULL)
+ setenv("KRBTKFILE", _pam_krbtkfile_env, 1);
retval = PAM_SUCCESS;
} else
retval = PAM_AUTH_ERR;
OpenPOWER on IntegriCloud