aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorAntoine Mazeas <antoine@karthanis.net>2019-04-23 22:38:18 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-27 19:35:20 +0200
commitcfdf5452f1c90db2c8c1f710134e3127506e1a54 (patch)
tree3627ea5ed00f87336c5b742ffb915366e26c3fe7 /community
parentd5dd5c1cd07c3de03ff7f39175a8a2a36215bd4c (diff)
downloadaports-cfdf5452f1c90db2c8c1f710134e3127506e1a54.tar.bz2
aports-cfdf5452f1c90db2c8c1f710134e3127506e1a54.tar.xz
community/shadow: fix broken chpasswd
It was found in bug #10209 (https://bugs.alpinelinux.org/issues/10209) that the chpasswd command was broken due to a lack of a pam configuration file. This is a backport of PR#6980 by @bratkartoffel, targetting the 3.9 branch.
Diffstat (limited to 'community')
-rw-r--r--community/shadow/APKBUILD7
-rw-r--r--community/shadow/chpasswd.pamd3
2 files changed, 9 insertions, 1 deletions
diff --git a/community/shadow/APKBUILD b/community/shadow/APKBUILD
index 2cbd13bdde..1a567be3a5 100644
--- a/community/shadow/APKBUILD
+++ b/community/shadow/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=shadow
pkgver=4.5
-pkgrel=1
+pkgrel=2
pkgdesc="PAM-using login and passwd utilities (usermod, useradd, ...)"
url="http://pkg-shadow.alioth.debian.org/"
arch="all"
@@ -12,6 +12,7 @@ depends=""
makedepends="linux-pam-dev"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-uidmap"
source="https://github.com/shadow-maint/shadow/releases/download/$pkgver/shadow-$pkgver.tar.xz
+ chpasswd.pamd
login.pamd
dots-in-usernames.patch
useradd-usergroups.patch
@@ -83,6 +84,9 @@ package() {
# However, install our own for login.
cp "$srcdir"/login.pamd "$pkgdir"/etc/pam.d/login || return 1
+ # Also install custom pam configuration for chpasswd (see bug #10209)
+ cp "$srcdir"/chpasswd.pamd "$pkgdir"/etc/pam.d/chpasswd || return 1
+
# /etc/login.defs is not very useful - replace it with an *almost* blank file.
rm "$pkgdir"/etc/login.defs
echo "USERGROUPS_ENAB yes" > "$pkgdir"/etc/login.defs
@@ -108,6 +112,7 @@ uidmap() {
}
sha512sums="e57f8db54df23301c229d4be30d4cbb67efa1d1809cffcff79adc480b6019fb2b5fd09e112e82a3f00ad5a6b2994592adac93f70a631cf666b6f4723b61c87b5 shadow-4.5.tar.xz
+38e78aade316350dc26000b35335a778f12f5deb0f54ea23f84000ad92a683c519c7814165b5ed7e63187d11677993082d35dc6c21f7f66c6aee8e3fd4b3694b chpasswd.pamd
46a6f83f3698e101b58b8682852da749619412f75dfa85cecad03d0847f6c3dc452d984510db7094220e4570a0565b83b0556e16198ad894a3ec84b3e513d58d login.pamd
745eea04c054226feba165b635dbb8570b8a04537d41e914400a4c54633c3a9cf350da0aabfec754fb8cf3e58fc1c8cf597b895506312f19469071760c11f31d dots-in-usernames.patch
49f1d5ded82d2d479805c77d7cc6274c30233596e375b28306b31a33f8fbfc3611dbc77d606081b8300247908c267297dbb6c5d1a30d56095dda53c6a636fb56 useradd-usergroups.patch
diff --git a/community/shadow/chpasswd.pamd b/community/shadow/chpasswd.pamd
new file mode 100644
index 0000000000..e2d392f4ef
--- /dev/null
+++ b/community/shadow/chpasswd.pamd
@@ -0,0 +1,3 @@
+auth sufficient pam_rootok.so
+account include base-account
+password include base-password