summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 79af58a0..8e149829 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -38,7 +38,7 @@ extern char *__progname;
extern int use_privsep;
-RCSID("$Id: auth-pam.c,v 1.51 2002/07/21 23:59:39 stevesk Exp $");
+RCSID("$Id: auth-pam.c,v 1.52 2002/07/23 00:44:07 stevesk Exp $");
#define NEW_AUTHTOK_MSG \
"Warning: Your password has expired, please change it now."
@@ -421,6 +421,16 @@ char **fetch_pam_environment(void)
#endif /* HAVE_PAM_GETENVLIST */
}
+void free_pam_environment(char **env)
+{
+ int i;
+
+ if (env != NULL) {
+ for (i = 0; env[i] != NULL; i++)
+ xfree(env[i]);
+ }
+}
+
/* Print any messages that have been generated during authentication */
/* or account checking to stderr */
void print_pam_messages(void)