Skip to content

Commit

Permalink
Merge pull request #233 from himmelblau-idm/dmulder/deb_ssh_dep
Browse files Browse the repository at this point in the history
Add a sshd soft depends for the deb package
  • Loading branch information
dmulder authored Oct 10, 2024
2 parents 9949907 + cd49d39 commit 421c486
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion platform/debian/himmelblau_sshd.conf

This file was deleted.

7 changes: 7 additions & 0 deletions platform/debian/scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ if [[ -f /etc/apparmor.d/unix-chkpwd ]]; then
# Reload the AppArmor profile to apply the changes
sudo apparmor_parser -r /etc/apparmor.d/unix-chkpwd
fi

# Only set the sshd config if the ssh server is already installed
SSHD_CONFIG_DIR="/etc/ssh/sshd_config.d"
SSHD_CONFIG_FILE="${SSHD_CONFIG_DIR}/himmelblau.conf"
if [ -d "$SSHD_CONFIG_DIR" ]; then
echo "KbdInteractiveAuthentication yes" > "$SSHD_CONFIG_FILE"
fi
6 changes: 6 additions & 0 deletions platform/debian/scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ if [[ -f /etc/apparmor.d/unix-chkpwd ]]; then
# Reload the AppArmor profile to apply the changes
sudo apparmor_parser -r /etc/apparmor.d/unix-chkpwd
fi

# Remove the sshd config file if it was created during install
SSHD_CONFIG_FILE="/etc/ssh/sshd_config.d/himmelblau.conf"
if [ -f "$SSHD_CONFIG_FILE" ]; then
rm "$SSHD_CONFIG_FILE"
fi
2 changes: 1 addition & 1 deletion src/pam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ assets = [
["target/release/libpam_himmelblau.so", "usr/lib/x86_64-linux-gnu/security/pam_himmelblau.so", "755"],
["../../platform/debian/pam-config", "usr/share/pam-configs/himmelblau", "644"],
["../../platform/debian/apparmor.unix-chkpwd.local", "etc/apparmor.d/local/unix-chkpwd", "644"],
["../../platform/debian/himmelblau_sshd.conf", "/etc/ssh/sshd_config.d/himmelblau.conf", "644"],
]
maintainer-scripts = "../../platform/debian/scripts"
recommends = ["openssh-server"]

0 comments on commit 421c486

Please sign in to comment.