diff options
author | Sergio Durigan Junior <sergio.durigan@canonical.com> | 2021-12-03 23:26:54 -0500 |
---|---|---|
committer | Steve Langasek <steve.langasek@canonical.com> | 2021-12-06 11:11:19 -0800 |
commit | 173629db7cf86157efe6c42195e677ae1d6d00ab (patch) | |
tree | 5a1cff27a7ddb1e731da07fbc4605dfdfa5240b0 | |
parent | 241463eead448bff79e063383335c90de51c9bf5 (diff) | |
download | pam-173629db7cf86157efe6c42195e677ae1d6d00ab.tar.gz pam-173629db7cf86157efe6c42195e677ae1d6d00ab.tar.bz2 pam-173629db7cf86157efe6c42195e677ae1d6d00ab.zip |
cherry-pick: Allow /etc/environment files without EOL at EOF.
In other words, allow files without a newline at the end. (LP: #1953201)
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | debian/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch | 30 | ||||
-rw-r--r-- | debian/patches-applied/series | 2 |
3 files changed, 37 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 671f080d..32843a9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,11 @@ pam (1.4.0-11) UNRELEASED; urgency=medium * Whitespace fixes in debconf templates. + [ Sergio Durigan Junior ] + * d/p/pam_env-allow-environment-files-without-EOL-at-EOF.patch: + Allow /etc/environment files without EOL at EOF. In other words, + allow files without a newline at the end. (LP: #1953201) + -- Steve Langasek <vorlon@debian.org> Tue, 26 Oct 2021 07:44:32 -0700 pam (1.4.0-10) unstable; urgency=medium diff --git a/debian/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch b/debian/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch new file mode 100644 index 00000000..340e4a7f --- /dev/null +++ b/debian/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch @@ -0,0 +1,30 @@ +From: Tomas Mraz <tmraz@fedoraproject.org> +Date: Wed, 4 Nov 2020 09:37:36 +0100 +Subject: pam_env: allow environment files without EOL at EOF + +Fixes #263 + +* modules/pam_env/pam_env.c (_assemble_line): Do not error out if at feof() + +Origin: upstream, https://github.com/linux-pam/linux-pam/commit/12824dd648b0668968231044ed805d1f3b212d7e +Applied-Upstream: 1.5.0 +Bug: https://github.com/linux-pam/linux-pam/issues/263 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pam/+bug/1953201 +Reviewed-By: Sergio Durigan Junior <sergiodj@ubuntu.com> +--- + modules/pam_env/pam_env.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c +index 79d4372..4aa3777 100644 +--- a/modules/pam_env/pam_env.c ++++ b/modules/pam_env/pam_env.c +@@ -311,7 +311,7 @@ static int _assemble_line(FILE *f, char *buffer, int buf_len) + D(("_assemble_line: corrupted or binary file")); + return -1; + } +- if (p[strlen(p)-1] != '\n') { ++ if (p[strlen(p)-1] != '\n' && !feof(f)) { + D(("_assemble_line: line too long")); + return -1; + } diff --git a/debian/patches-applied/series b/debian/patches-applied/series index 3cc3e287..d3f4a191 100644 --- a/debian/patches-applied/series +++ b/debian/patches-applied/series @@ -26,3 +26,5 @@ pam_unix_initialize_daysleft pam_faillock_create_directory pam_mkhomedir_stat_before_opendir pam_unix_avoid_checksalt + +pam_env-allow-environment-files-without-EOL-at-EOF.patch |