Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions crates/visaged/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,22 @@ assets = [
["../../packaging/debian/pam-auth-update", "usr/share/pam-configs/visage", "644"],
["../../README.md", "usr/share/doc/visage/README.md", "644"],
]

# Fedora/RHEL RPM: `cargo generate-rpm -p crates/visaged` (paths are workspace-relative).
[package.metadata.generate-rpm]
name = "visage"
auto-req = "no"
requires = { pam = "*", dbus = "*", systemd = "*" }
post_install_script = "systemctl daemon-reload >/dev/null 2>&1 || :"
post_uninstall_script = "systemctl daemon-reload >/dev/null 2>&1 || :"
assets = [
{ source = "target/release/visaged", dest = "/usr/bin/visaged", mode = "755" },
{ source = "target/release/visage", dest = "/usr/bin/visage", mode = "755" },
{ source = "target/release/libpam_visage.so", dest = "/usr/lib64/security/pam_visage.so", mode = "644" },
{ source = "packaging/dbus/org.freedesktop.Visage1.conf", dest = "/usr/share/dbus-1/system.d/org.freedesktop.Visage1.conf", mode = "644", config = true },
{ source = "packaging/systemd/visaged.service", dest = "/usr/lib/systemd/system/visaged.service", mode = "644" },
{ source = "packaging/systemd/visage-resume.service", dest = "/usr/lib/systemd/system/visage-resume.service", mode = "644" },
{ source = "packaging/rpm/visage.pam", dest = "/usr/share/visage/pam.d/visage", mode = "644", doc = true },
{ source = "README.md", dest = "/usr/share/doc/visage/README.md", mode = "644", doc = true },
{ source = "LICENSE", dest = "/usr/share/licenses/visage/LICENSE", mode = "644", doc = true },
]
1 change: 1 addition & 0 deletions crates/visaged/tests/pam_control_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const DECLARING_FILES: &[&str] = &[
"packaging/debian/pam-auth-update",
"packaging/aur/visage.install",
"packaging/nix/module.nix",
"packaging/rpm/visage.pam",
];

/// Valid PAM actions, per `pam.conf(5)`. Anything else — including `end` — is
Expand Down
21 changes: 21 additions & 0 deletions docs/operations-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,27 @@ from `/etc/pam.d/system-auth` manually.

---

### Fedora (RPM, build from source)

```bash
sudo dnf install pam-devel dbus-devel clang-devel
cargo install cargo-generate-rpm
cargo build --release --workspace
cargo generate-rpm -p crates/visaged
sudo dnf install ./target/generate-rpm/visage-*.rpm
sudo systemctl enable --now visaged visage-resume
```

PAM is manual on Fedora: authselect owns `system-auth` and `password-auth` and overwrites
edits there. Add the line from `/usr/share/visage/pam.d/visage` as the second line of each
service you want (`sudo`, `polkit-1`, `gdm-password`):

```text
auth [success=done default=ignore] pam_visage.so
```

---

## First-Time Setup

### 1. Download models (one-time):
Expand Down
4 changes: 4 additions & 0 deletions packaging/rpm/visage.pam
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#%PAM-1.0
# Fedora has no pam-auth-update and authselect owns system-auth. Add this line
# as the second line of each service that should accept a face (sudo, polkit-1, gdm-password).
auth [success=done default=ignore] pam_visage.so