mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-26 15:24:47 +02:00
session.c: use "denylist" terminology
Follow upstream (6d755706a0059eb9e2d63517f288b75cbc3b4701) language improvements in this portable-specific code.
This commit is contained in:
parent
33267feaff
commit
a575cf44e5
20
session.c
20
session.c
@ -944,8 +944,8 @@ read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
|
|||||||
|
|
||||||
#if defined(USE_PAM) || defined(HAVE_CYGWIN)
|
#if defined(USE_PAM) || defined(HAVE_CYGWIN)
|
||||||
static void
|
static void
|
||||||
copy_environment_blacklist(char **source, char ***env, u_int *envsize,
|
copy_environment_denylist(char **source, char ***env, u_int *envsize,
|
||||||
const char *blacklist)
|
const char *denylist)
|
||||||
{
|
{
|
||||||
char *var_name, *var_val;
|
char *var_name, *var_val;
|
||||||
int i;
|
int i;
|
||||||
@ -961,8 +961,8 @@ copy_environment_blacklist(char **source, char ***env, u_int *envsize,
|
|||||||
}
|
}
|
||||||
*var_val++ = '\0';
|
*var_val++ = '\0';
|
||||||
|
|
||||||
if (blacklist == NULL ||
|
if (denylist == NULL ||
|
||||||
match_pattern_list(var_name, blacklist, 0) != 1) {
|
match_pattern_list(var_name, denylist, 0) != 1) {
|
||||||
debug3("Copy environment: %s=%s", var_name, var_val);
|
debug3("Copy environment: %s=%s", var_name, var_val);
|
||||||
child_set_env(env, envsize, var_name, var_val);
|
child_set_env(env, envsize, var_name, var_val);
|
||||||
}
|
}
|
||||||
@ -976,7 +976,7 @@ copy_environment_blacklist(char **source, char ***env, u_int *envsize,
|
|||||||
static void
|
static void
|
||||||
copy_environment(char **source, char ***env, u_int *envsize)
|
copy_environment(char **source, char ***env, u_int *envsize)
|
||||||
{
|
{
|
||||||
copy_environment_blacklist(source, env, envsize, NULL);
|
copy_environment_denylist(source, env, envsize, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1138,15 +1138,15 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
|
|||||||
* Don't allow PAM-internal env vars to leak
|
* Don't allow PAM-internal env vars to leak
|
||||||
* back into the session environment.
|
* back into the session environment.
|
||||||
*/
|
*/
|
||||||
#define PAM_ENV_BLACKLIST "SSH_AUTH_INFO*,SSH_CONNECTION*"
|
#define PAM_ENV_DENYLIST "SSH_AUTH_INFO*,SSH_CONNECTION*"
|
||||||
p = fetch_pam_child_environment();
|
p = fetch_pam_child_environment();
|
||||||
copy_environment_blacklist(p, &env, &envsize,
|
copy_environment_denylist(p, &env, &envsize,
|
||||||
PAM_ENV_BLACKLIST);
|
PAM_ENV_DENYLIST);
|
||||||
free_pam_environment(p);
|
free_pam_environment(p);
|
||||||
|
|
||||||
p = fetch_pam_environment();
|
p = fetch_pam_environment();
|
||||||
copy_environment_blacklist(p, &env, &envsize,
|
copy_environment_denylist(p, &env, &envsize,
|
||||||
PAM_ENV_BLACKLIST);
|
PAM_ENV_DENYLIST);
|
||||||
free_pam_environment(p);
|
free_pam_environment(p);
|
||||||
}
|
}
|
||||||
#endif /* USE_PAM */
|
#endif /* USE_PAM */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user