Merge ~sergiodj/ubuntu/+source/pam:etc-env-no-newline into ubuntu/+source/pam:ubuntu/devel

Proposed by Sergio Durigan Junior
Status: Merged
Merge reported by: Sergio Durigan Junior
Merged at revision: 7e55970e113d0f6b3ec49dafe239b45657374030
Proposed branch: ~sergiodj/ubuntu/+source/pam:etc-env-no-newline
Merge into: ubuntu/+source/pam:ubuntu/devel
Diff against target: 62 lines (+40/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch (+30/-0)
debian/patches-applied/series (+2/-0)
Reviewer Review Type Date Requested Status
Simon Chopin (community) Approve
Canonical Server Pending
Review via email: mp+412783@code.launchpad.net

Description of the change

This MP fixes bug #1953201.

This was a fun problem to investigate. In the end, upstream already has a bug report and a fix for it, so it's just a matter of backporting the right patch here, which is also very simple.

There's a PPA with the proposed changes here:

https://launchpad.net/~sergiodj/+archive/ubuntu/pam-bugfix/+packages

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Requesting a review from Simon because he's the last person who did the merge from Debian.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I agree to let Simon have a look as last merge-person, but I wanted to mention that I checked and to me formally all LGTM.

Revision history for this message
Simon Chopin (schopin) wrote :

LGTM, not too intrusive.

However, I believe pam is packaged in this repository: https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/pam/+git/pam

I'll just rewrite the commits against that repository and push it there.
Unless Steve wishes us to start adopting the git-ubuntu workflow for pam?

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Monday, December 06 2021, Simon Chopin wrote:

> Review: Approve
>
> LGTM, not too intrusive.
>
> However, I believe pam is packaged in this repository: https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/pam/+git/pam

Thanks for the review, Christian and Simon.

I didn't PAM is packaged elsewhere. Interesting.

> I'll just rewrite the commits against that repository and push it there.
> Unless Steve wishes us to start adopting the git-ubuntu workflow for pam?

No problem for me; feel free to go ahead.

Thanks,

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Steve Langasek (vorlon) wrote :

On Mon, Dec 06, 2021 at 04:00:47PM -0000, Sergio Durigan Junior wrote:
> Thanks for the review, Christian and Simon.

> I didn't PAM is packaged elsewhere. Interesting.

$ apt-cache showsrc pam | grep Vcs
Vcs-Git: https://code.launchpad.net/~ubuntu-core-dev/ubuntu/+source/pam/+git/pam
Debian-Vcs-Browser: https://salsa.debian.org/vorlon/pam
Debian-Vcs-Git: https://salsa.debian.org/vorlon/pam.git
$

:)

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Monday, December 06 2021, Steve Langasek wrote:

> On Mon, Dec 06, 2021 at 04:00:47PM -0000, Sergio Durigan Junior wrote:
>> Thanks for the review, Christian and Simon.
>
>> I didn't PAM is packaged elsewhere. Interesting.
>
> $ apt-cache showsrc pam | grep Vcs
> Vcs-Git: https://code.launchpad.net/~ubuntu-core-dev/ubuntu/+source/pam/+git/pam
> Debian-Vcs-Browser: https://salsa.debian.org/vorlon/pam
> Debian-Vcs-Git: https://salsa.debian.org/vorlon/pam.git
> $

Noted, thanks.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Simon Chopin (schopin) wrote :

As it turns out, I don't have permissions to push on the other repo. I've pushed the relevant commit to git+ssh://git.launchpad.net/~schopin/ubuntu/+source/pam/+git/pam branch eof-fix, if Steve has the time to pick it up?

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Monday, December 06 2021, Sergio Durigan Junior wrote:

> On Monday, December 06 2021, Steve Langasek wrote:
>
>> On Mon, Dec 06, 2021 at 04:00:47PM -0000, Sergio Durigan Junior wrote:
>>> Thanks for the review, Christian and Simon.
>>
>>> I didn't PAM is packaged elsewhere. Interesting.
>>
>> $ apt-cache showsrc pam | grep Vcs
>> Vcs-Git: https://code.launchpad.net/~ubuntu-core-dev/ubuntu/+source/pam/+git/pam
>> Debian-Vcs-Browser: https://salsa.debian.org/vorlon/pam
>> Debian-Vcs-Git: https://salsa.debian.org/vorlon/pam.git
>> $
>
> Noted, thanks.

FWIW, most Ubuntu packages that I touched don't use the Vcs-* fields for
anything useful.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

 pam | 1.4.0-10ubuntu2 | jammy | source

Completed, please set the MR to merged (plenty of pings today as I can't do that anymore nowadays :-/ )

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 28c8ec0..a83147a 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+pam (1.4.0-10ubuntu2) jammy; urgency=medium
7+
8+ * d/p/pam_env-allow-environment-files-without-EOL-at-EOF.patch:
9+ Allow /etc/environment files without EOL at EOF. In other words,
10+ allow files without a newline at the end. (LP: #1953201)
11+
12+ -- Sergio Durigan Junior <sergio.durigan@canonical.com> Sat, 04 Dec 2021 13:53:28 -0500
13+
14 pam (1.4.0-10ubuntu1) jammy; urgency=medium
15
16 * Merge from Debian unstable (LP: #1916509). Remaining changes:
17diff --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
18new file mode 100644
19index 0000000..340e4a7
20--- /dev/null
21+++ b/debian/patches-applied/pam_env-allow-environment-files-without-EOL-at-EOF.patch
22@@ -0,0 +1,30 @@
23+From: Tomas Mraz <tmraz@fedoraproject.org>
24+Date: Wed, 4 Nov 2020 09:37:36 +0100
25+Subject: pam_env: allow environment files without EOL at EOF
26+
27+Fixes #263
28+
29+* modules/pam_env/pam_env.c (_assemble_line): Do not error out if at feof()
30+
31+Origin: upstream, https://github.com/linux-pam/linux-pam/commit/12824dd648b0668968231044ed805d1f3b212d7e
32+Applied-Upstream: 1.5.0
33+Bug: https://github.com/linux-pam/linux-pam/issues/263
34+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pam/+bug/1953201
35+Reviewed-By: Sergio Durigan Junior <sergiodj@ubuntu.com>
36+---
37+ modules/pam_env/pam_env.c | 2 +-
38+ 1 file changed, 1 insertion(+), 1 deletion(-)
39+
40+diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c
41+index 79d4372..4aa3777 100644
42+--- a/modules/pam_env/pam_env.c
43++++ b/modules/pam_env/pam_env.c
44+@@ -311,7 +311,7 @@ static int _assemble_line(FILE *f, char *buffer, int buf_len)
45+ D(("_assemble_line: corrupted or binary file"));
46+ return -1;
47+ }
48+- if (p[strlen(p)-1] != '\n') {
49++ if (p[strlen(p)-1] != '\n' && !feof(f)) {
50+ D(("_assemble_line: line too long"));
51+ return -1;
52+ }
53diff --git a/debian/patches-applied/series b/debian/patches-applied/series
54index 97761f4..ebf57fb 100644
55--- a/debian/patches-applied/series
56+++ b/debian/patches-applied/series
57@@ -31,3 +31,5 @@ pam_unix_initialize_daysleft
58 pam_faillock_create_directory
59 pam_mkhomedir_stat_before_opendir
60 pam_unix_avoid_checksalt
61+
62+pam_env-allow-environment-files-without-EOL-at-EOF.patch

Subscribers

People subscribed via source and target branches