Skip to content

Commit

Permalink
set up working sudo configuration
Browse files Browse the repository at this point in the history
This fixes: #9561 (comment)
  • Loading branch information
dustinkirkland committed Jan 8, 2024
1 parent ebf9923 commit 0646f3e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion sudo-rs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: sudo-rs
version: 0.2.1
epoch: 0
epoch: 1
description: A memory safe implementation of sudo and su.
copyright:
- license: MIT
Expand Down Expand Up @@ -36,6 +36,20 @@ pipeline:
chmod u+s ${{targets.destdir}}/usr/bin/sudo
chmod u+s ${{targets.destdir}}/usr/bin/su
# Establish a minimal working configuration
mkdir -p ${{targets.destdir}}/etc/pam.d/
cat <<EOF >${{targets.destdir}}/etc/pam.d/sudo
auth required pam_env.so
auth sufficient pam_unix.so
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
EOF
cp ${{targets.destdir}}/etc/pam.d/sudo ${{targets.destdir}}/etc/pam.d/sudo-i
chmod 644 ${{targets.destdir}}/etc/pam.d/sudo*
echo "root ALL = (ALL:ALL) NOPASSWD:ALL" > ${{targets.destdir}}/etc/sudoers
chmod 440 ${{targets.destdir}}/etc/sudoers
- uses: strip

update:
Expand Down

0 comments on commit 0646f3e

Please sign in to comment.