-
Notifications
You must be signed in to change notification settings - Fork 234
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
4.14.0: When built with --with-pam and --disable-account-tools-setuid some PAM configs are missing #810
Comments
Is this reproducible in 4.14.3 and/or master? |
Yes for 4.14.3 and master (as of 0138819). If it helps with reproducing:
|
Can you please reduce those flags to a reproducible minimum? I'm having trouble configuring that.
(I hope I don't need to (Oh, well, I just needed to lie a little bit: |
What are the PAM configs that are missing?
|
The following change appears to resolve the issue --- a/etc/pam.d/Makefile.am
+++ b/etc/pam.d/Makefile.am
@@ -2,20 +2,20 @@
# and also cooperate to make a distribution for `make dist'
pamd_files = \
+ chage \
chfn \
chsh \
groupmems \
login \
+ newusers \
passwd
pamd_acct_tools_files = \
- chage \
chgpasswd \
chpasswd \
groupadd \
groupdel \
groupmod \
- newusers \
useradd \
userdel \
usermod |
This is kind of a complex problem, but those links helped me understand it. Out of curiosity, are you changing any configuration for Arch Linux? Those commits that you mention were introduced some time ago and your problem shouldn't happen unless you change the configuration. |
I am not sure I understand what you are asking. I am able to reproduce /etc/pam.d/{chage,newusers} not being installed with the steps from #810 (comment) on the 4.14.3 tarball without any modifications. |
You need
You can alternatively install to a local
As mentioned in first sentence of the initial ticket description, those for |
Yes, this is mostly a question for Arch maintainers. I don't understand why this is a problem for 4.14.0 but it wasn't before. I mean, those commits happened more than ten years ago so I'd have expected a complain at that time. |
I don't think this has something to do with our distribution specific modifications, since the reproducer provided by @loqs in #810 (comment) works with this repository directly (without any modification). However, we do have distribution specific modifications, and you can have a look at the ones on top of 4.14.3 here: https://gitlab.archlinux.org/archlinux/packaging/upstream/shadow/-/commits/4.14.3.arch1
It is not uncommon for maintainers to not report issues upstream and just silently fix things. Before I took over the package a while ago, most of the changes were undocumented and inlined and it was really hard to figure out what changes we should actually be applying 😅
Sure, but it might also just be confirmation bias or other distributions not using shadow in the same capacity as we do (I noticed huge discrepancies in how other distributions package it and which of the tooling they make use of). |
@ikerexxe and here is the build script for 4.14.3 with which the sources are downloaded, verified, patched, built and installed: https://gitlab.archlinux.org/archlinux/packaging/packages/shadow/-/blob/a322022555c652550986e303cc9dc22fab194cd5/PKGBUILD |
On Thu, Jan 25, 2024 at 02:08:29AM -0800, David Runge wrote:
You need `setcap` because that's what `--disable-account-tools-setuid` implies (see title of issue).
If you can't/ do not want to do this on your own machine, I think it should work in a container as well.
Yeah, I'll try in a container.
> (I hope I don't need to `sudo ./configure ...` or fake root.)
>
> (Oh, well, I just needed to lie a little bit: `PATH="/usr/sbin:$PATH"`) (No, I need to be root for installing. :(
You can alternatively install to a local `DESTDIR=foo` and will be able to see the directory tree as well.
No, I was installing to DESTDIR=/tmp and still needed root. It's
probably because of setcap(8); don't remember.
|
Install pam configs for chage and newusers when using ./configure --with-libpam --disable-account-tools-setuid. Fixes shadow-maint#810.
Install pam configs for chage and newusers when using ./configure --with-libpam --disable-account-tools-setuid. Fixes shadow-maint#810.
Install pam configs for chage and newusers when using ./configure --with-libpam --disable-account-tools-setuid. Fixes shadow-maint#810.
Install pam configs for chpasswd and newusers when using ./configure --with-libpam --disable-account-tools-setuid. Fixes shadow-maint#810.
Install pam configs for chpasswd and newusers when using ./configure --with-libpam --disable-account-tools-setuid. Fixes shadow-maint#810. Tested-by: David Runge <dvzrv@archlinux.org>
Install pam configs for chpasswd and newusers when using ./configure --with-libpam --disable-account-tools-setuid. Fixes #810. Tested-by: David Runge <dvzrv@archlinux.org>
Install pam configs for chpasswd and newusers when using: $ ./configure --with-libpam --disable-account-tools-setuid Closes: <#810> Link: <#928> Tested-by: David Runge <dvzrv@archlinux.org> Cherry-picked-from: 341d80c ("Makefile: move chpasswd and newusers to pamd target") Cc: Iker Pedrosa <ipedrosa@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Hi! Upon trying to package 4.14.0 for Arch Linux I ran into the PAM configurations for
chpasswd
andnewusers
not being installed if--with-pam
and--disable-account-tools-setuid
are provided.This seems to be the case because they are both handled in
pamd_acct_tools_files
:shadow/etc/pam.d/Makefile.am
Lines 11 to 21 in 5178f8c
As both
chpasswd
andnewusers
link againstlibpam.so
, I am wondering whether this behavior is correct/ expected.I guess I'd have to install the relevant PAM configs manually for now?
The text was updated successfully, but these errors were encountered: