Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etc/pam.d/Makefile.am: Fix typo #949

Merged
merged 1 commit into from Feb 13, 2024

Conversation

alejandro-colomar
Copy link
Collaborator

@alejandro-colomar alejandro-colomar commented Feb 13, 2024

Fixes: 341d80c ("Makefile: move chpasswd and newusers to pamd target")
Link: #928 (comment)
Link: #926 (comment)
Reported-by: @DimStar77
Reported-by: @jubalh
Cc: @loqs
Cc: @dvzrv
Cc: @ikerexxe

To be cherry-picked to 4.14.x.

Copy link

@DimStar77 DimStar77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends - the original commit message mentioned wanting to move chpasswd up - now it's chgpasswd..

@alejandro-colomar
Copy link
Collaborator Author

alejandro-colomar commented Feb 13, 2024

@DimStar77

Do you mean this?

diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am
index fe676b44..6a76551f 100644
--- a/etc/pam.d/Makefile.am
+++ b/etc/pam.d/Makefile.am
@@ -2,6 +2,7 @@
 # and also cooperate to make a distribution for `make dist'
 
 pamd_files = \
+       chpasswd \
        chfn \
        chgpasswd \
        chsh \
@@ -12,7 +13,6 @@ pamd_files = \
 
 pamd_acct_tools_files = \
        chage \
-       chpasswd \
        groupadd \
        groupdel \
        groupmod \

or this?

diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am
index fe676b44..b8e4321f 100644
--- a/etc/pam.d/Makefile.am
+++ b/etc/pam.d/Makefile.am
@@ -2,8 +2,8 @@
 # and also cooperate to make a distribution for `make dist'
 
 pamd_files = \
+       chpasswd \
        chfn \
-       chgpasswd \
        chsh \
        groupmems \
        login \
@@ -12,7 +12,7 @@ pamd_files = \
 
 pamd_acct_tools_files = \
        chage \
-       chpasswd \
+       chgpasswd \
        groupadd \
        groupdel \
        groupmod \

Or none?

@DimStar77
Copy link

@DimStar77

2nd variant is more in line with the commit message of the original PR;

@alejandro-colomar
Copy link
Collaborator Author

It depends - the original commit message mentioned wanting to move chpasswd up - now it's chgpasswd..

Yeah, that's why I want someone with the original problem to test this thing. :)
The problem was reproducible on Arch Linux, so if any of the packagers from Arch can check this, it would help. Did Suse or Gentoo have the original problem too maybe?

@alejandro-colomar
Copy link
Collaborator Author

@DimStar77

2nd variant is more in line with the commit message of the original PR;

Yep. Thanks!

@DimStar77
Copy link

It depends - the original commit message mentioned wanting to move chpasswd up - now it's chgpasswd..

Yeah, that's why I want someone with the original problem to test this thing. :) The problem was reproducible on Arch Linux, so if any of the packagers from Arch can check this, it would help. Did Suse or Gentoo have the original problem too maybe?

At least openSUSE/SUSE did not - as we build shadow with --enable-account-tools-setuid

@alejandro-colomar
Copy link
Collaborator Author

alejandro-colomar commented Feb 13, 2024

v2 changes:

  • Respect the original commit message, so the typo seems somewhere else. Document it in the commit message. [@DimStar77 ]
  • Co-developed-by: @DimStar77
$ git range-diff shadow/master gh/tfix tfix 
1:  52af3050 < -:  -------- etc/pam.d/Makefile.am: Fix typo
-:  -------- > 1:  3ad184cc etc/pam.d/Makefile.am: Fix typo

@alejandro-colomar
Copy link
Collaborator Author

I've marked 4.14.4 as broken (https://github.com/shadow-maint/shadow/releases/tag/4.14.4), and set 4.14.3 as the latest release.

@alejandro-colomar
Copy link
Collaborator Author

I'll take your approval as a Signed-off-by ;)

@alejandro-colomar
Copy link
Collaborator Author

v2b changes:

$ git range-diff shadow/master gh/tfix tfix 
1:  3ad184cc ! 1:  8e8a817a etc/pam.d/Makefile.am: Fix typo
    @@ Commit message
         Cc: David Runge <[email protected]>
         Cc: Iker Pedrosa <[email protected]>
         Co-developed-by: Dominique Leuenberger <[email protected]>
    +    Signed-off-by: Dominique Leuenberger <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>
     
      ## etc/pam.d/Makefile.am ##

@alejandro-colomar
Copy link
Collaborator Author

alejandro-colomar commented Feb 13, 2024

@DimStar77

Can you please confirm that this fixes the build on Suse?

Copy link
Collaborator

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups! Big mistake on my side for not realizing this. Thanks @alejandro-colomar for providing the fix.

@jubalh
Copy link
Member

jubalh commented Feb 13, 2024

I pulled this PR into a patch and get:

Complete spec file

  --enable-shadowgrp \
  --enable-account-tools-setuid \
  --with-audit \
  --with-libpam \
  --with-sha-crypt \
  --with-acl \
  --with-attr \
  --with-nscd \
  --with-selinux \
  --without-libcrack \
  --without-libbsd \
  --with-group-name-max-length=32 \

Complete build log

[   71s] Making all in pam.d
[   71s] make[3]: *** No rule to make target 'chgpasswd', needed by 'all-am'.  Stop.

@DimStar77
Copy link

I pulled this PR into a patch and get:
[ 71s] Making all in pam.d
[ 71s] make[3]: *** No rule to make target 'chgpasswd', needed by 'all-am'. Stop.

Patching the released 4.14.4 tarball with only this patch won't work - as the file https://github.com/shadow-maint/shadow/blob/master/etc/pam.d/chgpasswd is missing in the tarball (make dist had incomplete data)

you will have to add the content of that file to your build

@jubalh
Copy link
Member

jubalh commented Feb 13, 2024

is missing in the tarball (make dist had incomplete data)

Ah of course. I thought I'm missing something here.
Excuse me, I was doing this while being in a meeting and wanted to use the time "productive" ;) That obviously didn't work out :)

Everything builds fine now.

@alejandro-colomar
Copy link
Collaborator Author

v2c changes:

$ git range-diff shadow/master gh/tfix tfix 
1:  8e8a817a ! 1:  60d6b698 etc/pam.d/Makefile.am: Fix typo
    @@ Commit message
         Reported-by: Michael Vetter <[email protected]>
         Cc: loqs <https://github.com/loqs>
         Cc: David Runge <[email protected]>
    -    Cc: Iker Pedrosa <[email protected]>
    +    Reviewed-by: Iker Pedrosa <[email protected]>
    +    Tested-by: Michael Vetter <[email protected]>
    +    Reviewed-by: Michael Vetter <[email protected]>
         Co-developed-by: Dominique Leuenberger <[email protected]>
         Signed-off-by: Dominique Leuenberger <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>

While I'd like if someone from Arch could have a look at this,

  • Versions 4.14.3 and older have been broken for Arch for a long time.
  • 4.14.4 has introduced a regression for Gentoo (and possibly others), and is marked as broken, so no recent good version has ever worked for Arch correctly.
  • This fixes the regression for Gentoo (and possibly others).
  • We believe it probably won't break Arch, but we don't know for sure.

So, @ikerexxe , I'll let you merge. I think we can merge already, but maybe you want to give them some time to have a look.

@loqs
Copy link
Contributor

loqs commented Feb 13, 2024

This does not cause any change on Arch due to its use of --disable-account-tools-setuid ships chgpasswd without pam support.

The commit we're fixing mentions that it wanted to move 'chpasswd', but
it removed 'ch_g_passwd' from 'pamd_acct_tools_files' and added
'chpasswd' to 'pamd_files'.  It seems it removed the wrong thing by
accident.

Fixes: 341d80c ("Makefile: move chpasswd and newusers to pamd target")
Link: <shadow-maint#928 (comment)>
Link: <shadow-maint#926 (comment)>
Reported-by: Dominique Leuenberger <[email protected]>
Reported-by: Michael Vetter <[email protected]>
Cc: David Runge <[email protected]>
Reviewed-by: Iker Pedrosa <[email protected]>
Tested-by: Michael Vetter <[email protected]>
Reviewed-by: Michael Vetter <[email protected]>
Reviewed-by: loqs <https://github.com/loqs>
Co-developed-by: Dominique Leuenberger <[email protected]>
Signed-off-by: Dominique Leuenberger <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
@alejandro-colomar
Copy link
Collaborator Author

This does not cause any change on Arch due to its use of --disable-account-tools-setuid ships chgpasswd without pam support.

v2d changes:

$ git range-diff shadow/master gh/tfix tfix 
1:  60d6b698 ! 1:  96fc104a etc/pam.d/Makefile.am: Fix typo
    @@ Commit message
         Link: <https://github.com/shadow-maint/shadow/issues/926#issuecomment-1941324761>
         Reported-by: Dominique Leuenberger <[email protected]>
         Reported-by: Michael Vetter <[email protected]>
    -    Cc: loqs <https://github.com/loqs>
         Cc: David Runge <[email protected]>
         Reviewed-by: Iker Pedrosa <[email protected]>
         Tested-by: Michael Vetter <[email protected]>
         Reviewed-by: Michael Vetter <[email protected]>
    +    Reviewed-by: loqs <https://github.com/loqs>
         Co-developed-by: Dominique Leuenberger <[email protected]>
         Signed-off-by: Dominique Leuenberger <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>

Now I'll merge. :)

@alejandro-colomar alejandro-colomar merged commit 7eb10e6 into shadow-maint:master Feb 13, 2024
8 checks passed
jubalh added a commit to jubalh/gentoo that referenced this pull request Feb 13, 2024
4.14.4 is under certain conditions broken.
See shadow-maint/shadow#949.

Signed-off-by: Michael Vetter <[email protected]>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Feb 14, 2024
4.14.4 is under certain conditions broken.
See shadow-maint/shadow#949.

Signed-off-by: Michael Vetter <[email protected]>
Closes: #35309
Signed-off-by: Sam James <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants