Pam Test 40

This commit is contained in:
2026-07-14 00:30:38 -03:00
parent 5ddca88147
commit 492a7f2002
+9 -2
View File
@@ -45,8 +45,15 @@ func pamLogf(format string, args ...interface{}) { pamLogger.Printf(format, args
// reload. Guarded atomically so passwordCallback can read it lock-free.
var pamAuthEnabled atomic.Bool
func setPAMAuthEnabled(v bool) { pamAuthEnabled.Store(v) }
func isPAMAuthEnabled() bool { return pamAuthEnabled.Load() }
func setPAMAuthEnabled(v bool) {
pamAuthEnabled.Store(v)
state := "disabled"
if v {
state = "ENABLED"
}
pamLogf("PAM: system (Linux /etc/shadow) login is now %s", state)
}
func isPAMAuthEnabled() bool { return pamAuthEnabled.Load() }
// importPAMUser registers a freshly PAM-authenticated account in the running
// user manager and persists it (marked use_pam) so it shows up in the panel and