aboutsummaryrefslogtreecommitdiff
path: root/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2022-04-25 11:33:27 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2022-04-25 11:33:27 -0700
commited8beed9a35b961f2fe31d47b3730e29b5e22466 (patch)
treeee479bd56a4aa29f78196b3183a05ae650a52fb6 /patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch
downloadpam-ed8beed9a35b961f2fe31d47b3730e29b5e22466.tar.gz
pam-ed8beed9a35b961f2fe31d47b3730e29b5e22466.tar.bz2
pam-ed8beed9a35b961f2fe31d47b3730e29b5e22466.zip
Import pam_1.4.0-12.debian.tar.xz
[dgit import tarball pam 1.4.0-12 pam_1.4.0-12.debian.tar.xz]
Diffstat (limited to 'patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch')
-rw-r--r--patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch b/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch
new file mode 100644
index 00000000..340e4a7f
--- /dev/null
+++ b/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;
+ }