Skip to content

Commit

Permalink
Merge pull request #244 from himmelblau-idm/stable-0.6.x_rm_sshd_config
Browse files Browse the repository at this point in the history
Move sshd config into it's own debian package
  • Loading branch information
dmulder authored Oct 14, 2024
2 parents 5069708 + 42fc2ad commit 561c6d1
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 19 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ members = [
"src/users",
"src/idmap",
"src/file_permissions",
"src/sshd-config",
]
resolver = "2"

[workspace.package]
version = "0.6.10"
version = "0.6.11"
authors = [
"David Mulder <[email protected]>"
]
Expand Down Expand Up @@ -76,7 +77,7 @@ tracing-forest = "^0.1.6"
rusqlite = "^0.32.0"
hashbrown = { version = "0.14.0", features = ["serde", "inline-more", "ahash"] }
lru = "^0.12.3"
kanidm_lib_crypto = { path = "./src/crypto", version = "0.6.10" }
kanidm_lib_crypto = { path = "./src/crypto", version = "0.6.11" }
kanidm_utils_users = { path = "./src/users" }
walkdir = "2"
csv = "1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion images/ubuntu/Dockerfile.22.04
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-deb

# Build the project and create the .deb package
CMD cargo deb --deb-revision=ubuntu22.04 -p himmelblaud && cargo deb --deb-revision=ubuntu22.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p pam_himmelblau
CMD cargo deb --deb-revision=ubuntu22.04 -p himmelblaud && cargo deb --deb-revision=ubuntu22.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p pam_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p sshd-config
2 changes: 1 addition & 1 deletion images/ubuntu/Dockerfile.24.04
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-deb

# Build the project and create the .deb package
CMD cargo deb --deb-revision=ubuntu24.04 -p himmelblaud && cargo deb --deb-revision=ubuntu24.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p pam_himmelblau
CMD cargo deb --deb-revision=ubuntu24.04 -p himmelblaud && cargo deb --deb-revision=ubuntu24.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p pam_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p sshd-config
8 changes: 0 additions & 8 deletions platform/debian/scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,3 @@ 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"
echo "Please restart the ssh daemon to ensure MFA works properly!"
fi
6 changes: 0 additions & 6 deletions platform/debian/scripts/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,3 @@ 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
1 change: 1 addition & 0 deletions platform/debian/sshd_config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KbdInteractiveAuthentication yes
1 change: 0 additions & 1 deletion src/pam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ assets = [
["../../platform/debian/apparmor.unix-chkpwd.local", "etc/apparmor.d/local/unix-chkpwd", "644"],
]
maintainer-scripts = "../../platform/debian/scripts"
recommends = ["openssh-server"]
19 changes: 19 additions & 0 deletions src/sshd-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "sshd-config"
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lib]
path = "src/lib.rs"

[package.metadata.deb]
name = "himmelblau-sshd-config"
depends = ["openssh-server"]
assets = [
["../../platform/debian/sshd_config", "etc/ssh/sshd_config.d/himmelblau.conf", "644"],
]
Empty file added src/sshd-config/src/lib.rs
Empty file.

0 comments on commit 561c6d1

Please sign in to comment.