Skip to content

Conversation

@xJayMorex
Copy link

@xJayMorex xJayMorex commented Nov 17, 2025

Without calling pam_setcred, unlocking the machine doesn't also unlock GPG based secrets. Reworked CPam::auth to make it less repetitive.

@xJayMorex xJayMorex force-pushed the add-pam_setcred branch 4 times, most recently from 948a45e to 282be8e Compare November 25, 2025 14:41
@PaideiaDilemma
Copy link
Collaborator

In this new revision I don't like the refactor. Why not spend the extra lines to do the error handling?

About pam_setcred TBH I just can't find any proper documentation why this is required.
Hyprlock doesn't log you out or anything. Why do we need to extend the lifetime of some CREDs? I searched github and saw that a bunch of lockscreen related applications do indeed call it. But I still don't know why.

@xJayMorex
Copy link
Author

xJayMorex commented Nov 27, 2025

In this new revision I don't like the refactor. Why not spend the extra lines to do the error handling?

You mean dropping the for loop and handling the steps individually, right?

About pam_setcred TBH I just can't find any proper documentation why this is required. Hyprlock doesn't log you out or anything. Why do we need to extend the lifetime of some CREDs? I searched github and saw that a bunch of lockscreen related applications do indeed call it. But I still don't know why.

If you aren't comfortable with secrets staying in memory while your screen is locked, you need to reset GPG before locking the screen (I have my keyboard shortcut set to gpg-connect-agent --no-autostart reloadagent /bye && hyprlock). You can unlock GPG in a separate step, it's just a matter of convenience. Display managers always unlock GPG during login, so I don't see why shouldn't all lockscreens do it also.

@xJayMorex xJayMorex force-pushed the add-pam_setcred branch 2 times, most recently from 73d8416 to 1c45ba5 Compare November 27, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants