Skip to content

Commit

Permalink
pam_env: deprecation notice of reading the user environment
Browse files Browse the repository at this point in the history
* modules/pam_env/pam_env.8.xml: Add the notice to the manual.
* modules/pam_env/pam_env.c (_pam_parse): Log deprecation warning
  if user_readenv is set.
  • Loading branch information
t8m committed Nov 5, 2020
1 parent 51318fd commit ecd5267
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -13,6 +13,8 @@ Release 1.5.0
* Removed deprecated pam_cracklib module, use pam_passwdqc (from passwdqc project)
or pam_pwquality (from libpwquality project) instead.
* Removed deprecated pam_tally and pam_tally2 modules, use pam_faillock instead.
* pam_env: Reading of the user environment is deprecated and will be removed
at some point in the future.

Release 1.4.0
* Multiple minor bug fixes and documentation improvements
Expand Down
5 changes: 5 additions & 0 deletions modules/pam_env/pam_env.8.xml
Expand Up @@ -163,6 +163,11 @@
behavior of subsequent modules in the stack without the consent
of the system administrator.
</para>
<para>
Due to problematic security this functionality is deprecated
since the 1.5.0 version and will be removed completely at some
point in the future.
</para>
</listitem>
</varlistentry>

Expand Down
3 changes: 3 additions & 0 deletions modules/pam_env/pam_env.c
Expand Up @@ -120,6 +120,9 @@ _pam_parse (const pam_handle_t *pamh, int argc, const char **argv,
pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
}

if (*user_readenv)
pam_syslog(pamh, LOG_DEBUG, "deprecated reading of user environment enabled");

return ctrl;
}

Expand Down

0 comments on commit ecd5267

Please sign in to comment.