mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 07:44:29 +02:00
- (stevesk) [auth-pam.[ch] session.c] pam_getenvlist() must be
freed by the caller; add free_pam_environment() and use it.
This commit is contained in:
parent
446d886fa5
commit
38b050a0f5
@ -6,6 +6,8 @@
|
|||||||
- (bal) [configure.ac] Missing ;; from cray patch.
|
- (bal) [configure.ac] Missing ;; from cray patch.
|
||||||
- (bal) [monitor_mm.c openbsd-compat/xmmap.h] Move xmmap() defines
|
- (bal) [monitor_mm.c openbsd-compat/xmmap.h] Move xmmap() defines
|
||||||
into it's own header.
|
into it's own header.
|
||||||
|
- (stevesk) [auth-pam.[ch] session.c] pam_getenvlist() must be
|
||||||
|
freed by the caller; add free_pam_environment() and use it.
|
||||||
|
|
||||||
20020721
|
20020721
|
||||||
- (stevesk) [auth-pam.c] merge cosmetic changes from solar's
|
- (stevesk) [auth-pam.c] merge cosmetic changes from solar's
|
||||||
@ -1417,4 +1419,4 @@
|
|||||||
- (stevesk) entropy.c: typo in debug message
|
- (stevesk) entropy.c: typo in debug message
|
||||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2391 2002/07/23 00:03:33 mouring Exp $
|
$Id: ChangeLog,v 1.2392 2002/07/23 00:44:07 stevesk Exp $
|
||||||
|
12
auth-pam.c
12
auth-pam.c
@ -38,7 +38,7 @@ extern char *__progname;
|
|||||||
|
|
||||||
extern int use_privsep;
|
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 \
|
#define NEW_AUTHTOK_MSG \
|
||||||
"Warning: Your password has expired, please change it now."
|
"Warning: Your password has expired, please change it now."
|
||||||
@ -421,6 +421,16 @@ char **fetch_pam_environment(void)
|
|||||||
#endif /* HAVE_PAM_GETENVLIST */
|
#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 */
|
/* Print any messages that have been generated during authentication */
|
||||||
/* or account checking to stderr */
|
/* or account checking to stderr */
|
||||||
void print_pam_messages(void)
|
void print_pam_messages(void)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: auth-pam.h,v 1.15 2002/07/21 23:59:39 stevesk Exp $ */
|
/* $Id: auth-pam.h,v 1.16 2002/07/23 00:44:07 stevesk Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Damien Miller. All rights reserved.
|
* Copyright (c) 2000 Damien Miller. All rights reserved.
|
||||||
@ -35,6 +35,7 @@ void start_pam(const char *user);
|
|||||||
void finish_pam(void);
|
void finish_pam(void);
|
||||||
int auth_pam_password(Authctxt *authctxt, const char *password);
|
int auth_pam_password(Authctxt *authctxt, const char *password);
|
||||||
char **fetch_pam_environment(void);
|
char **fetch_pam_environment(void);
|
||||||
|
void free_pam_environment(char **env);
|
||||||
int do_pam_authenticate(int flags);
|
int do_pam_authenticate(int flags);
|
||||||
int do_pam_account(char *username, char *remote_user);
|
int do_pam_account(char *username, char *remote_user);
|
||||||
void do_pam_session(char *username, const char *ttyname);
|
void do_pam_session(char *username, const char *ttyname);
|
||||||
|
13
session.c
13
session.c
@ -1042,8 +1042,17 @@ do_setup_env(Session *s, const char *shell)
|
|||||||
s->authctxt->krb5_ticket_file);
|
s->authctxt->krb5_ticket_file);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
/* Pull in any environment variables that may have been set by PAM. */
|
/*
|
||||||
copy_environment(fetch_pam_environment(), &env, &envsize);
|
* Pull in any environment variables that may have
|
||||||
|
* been set by PAM.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
char **p;
|
||||||
|
|
||||||
|
p = fetch_pam_environment();
|
||||||
|
copy_environment(p, &env, &envsize);
|
||||||
|
free_pam_environment(p);
|
||||||
|
}
|
||||||
#endif /* USE_PAM */
|
#endif /* USE_PAM */
|
||||||
|
|
||||||
if (auth_sock_name != NULL)
|
if (auth_sock_name != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user