From c4b68364efedda842c159081c12cb9bc64720302 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sat, 18 Oct 2025 17:34:44 +0200 Subject: [PATCH] Add FreeBSD-specific PAM file Signed-off-by: AnErrupTion --- build.zig | 2 +- res/pam.d/ly-freebsd | 8 ++++++++ res/pam.d/{ly => ly-linux} | 0 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 res/pam.d/ly-freebsd rename res/pam.d/{ly => ly-linux} (100%) diff --git a/build.zig b/build.zig index 3b9e833..bd1f432 100644 --- a/build.zig +++ b/build.zig @@ -243,7 +243,7 @@ fn install_ly(allocator: std.mem.Allocator, patch_map: PatchMap, install_config: var pam_dir = std.fs.cwd().openDir(pam_path, .{}) catch unreachable; defer pam_dir.close(); - try installFile("res/pam.d/ly", pam_dir, pam_path, "ly", .{ .override_mode = 0o644 }); + try installFile(if (init_system == .freebsd) "res/pam.d/ly-freebsd" else "res/pam.d/ly-linux", pam_dir, pam_path, "ly", .{ .override_mode = 0o644 }); } } diff --git a/res/pam.d/ly-freebsd b/res/pam.d/ly-freebsd new file mode 100644 index 0000000..1cefe07 --- /dev/null +++ b/res/pam.d/ly-freebsd @@ -0,0 +1,8 @@ +#%PAM-1.0 + +# OpenPAM (used in FreeBSD) doesn't support prepending "-" for ignoring missing +# modules. +auth include login +account include login +password include login +session include login diff --git a/res/pam.d/ly b/res/pam.d/ly-linux similarity index 100% rename from res/pam.d/ly rename to res/pam.d/ly-linux