summaryrefslogtreecommitdiffstats
path: root/abs/core/shadow/shadow.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2020-10-04 16:49:52 (GMT)
committerBritney Fransen <brfransen@gmail.com>2020-10-04 16:49:52 (GMT)
commit7c7479d7ea98f4becfd0012b0d50d2e4e3cb249c (patch)
tree3584252b0a469906e421c431ec313d689c1c0764 /abs/core/shadow/shadow.install
parentdc3bb983448c6da7f588014a1a0cb5f3d85d32be (diff)
downloadlinhes_pkgbuild-7c7479d7ea98f4becfd0012b0d50d2e4e3cb249c.zip
linhes_pkgbuild-7c7479d7ea98f4becfd0012b0d50d2e4e3cb249c.tar.gz
linhes_pkgbuild-7c7479d7ea98f4becfd0012b0d50d2e4e3cb249c.tar.bz2
shadow: update to 4.8.1
Diffstat (limited to 'abs/core/shadow/shadow.install')
-rw-r--r--abs/core/shadow/shadow.install27
1 files changed, 20 insertions, 7 deletions
diff --git a/abs/core/shadow/shadow.install b/abs/core/shadow/shadow.install
index 14384c3..83d9ab7 100644
--- a/abs/core/shadow/shadow.install
+++ b/abs/core/shadow/shadow.install
@@ -1,9 +1,22 @@
+setcaps() {
+ _setcap() {
+ if filecap "$1" "$2"; then
+ chmod -s "$1"
+ fi
+ }
+
+ # shadow ships these as setuid, but if we can apply file caps, use those instead.
+ # 'filecap' insists on absolute paths
+ _setcap /usr/bin/newuidmap setuid
+ _setcap /usr/bin/newgidmap setgid
+}
+
+post_install() {
+ setcaps
+}
+
post_upgrade() {
- grpck -r >/dev/null 2>&1
- if [ $? -eq 2 ]; then
- printf '%s\n' \
- "==> Warning: /etc/group or /etc/gshadow are inconsistent." \
- " Run 'grpck' to correct this."
- fi
- return 0
+ setcaps
}
+
+# vim:set ts=2 sw=2 et: