Skip to content

Commit

Permalink
Merge pull request #10864 from dustinkirkland/sudo-rs
Browse files Browse the repository at this point in the history
set up working sudo configuration
  • Loading branch information
rawlingsj authored Jan 9, 2024
2 parents 18e7d93 + 0646f3e commit 7d4feab
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 7d4feab

Please sign in to comment.