Skip to content

Commit

Permalink
fix(init.d/ssh-audit): check if /etc/passwd is writable (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
alebabai authored and osterman committed Sep 13, 2018
1 parent 4d056ea commit 529d2ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rootfs/etc/init.d/ssh-audit
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "${SSH_AUDIT_ENABLED}" == "true" ]; then
echo "# valid login shells" > /etc/shells
echo "/usr/bin/sudosh" >> /etc/shells
echo "session requisite pam_exec.so quiet /usr/bin/sudosh-add-user" > /etc/pam.d/sudosh
chsh -s /usr/bin/sudosh root
[ -w /etc/passwd ] && chsh -s /usr/bin/sudosh root
else
echo "- Disabling SSH Audit Logs"
:>/etc/pam.d/sudosh
Expand Down

0 comments on commit 529d2ce

Please sign in to comment.