(Fix): pam_open_session failure (e.g. pam_systemd rejecting the DM process as session leader) is now logged as a warning instead of blocking the entire session spawn.

This commit is contained in:
2026-07-18 22:57:05 +05:30
parent 1eb900c27c
commit f8156f85a5

View File

@@ -153,7 +153,7 @@ func spawnSession(res *login.Result) error {
defer creds.CloseSession() defer creds.CloseSession()
if err := creds.OpenSession(); err != nil { if err := creds.OpenSession(); err != nil {
return fmt.Errorf("pam session: %w", err) log.Printf("pam session warning: %v", err)
} }
session.SetBasicVariables(creds.Username, creds.HomeDir, creds.Shell, res.Config.InitialPath) session.SetBasicVariables(creds.Username, creds.HomeDir, creds.Shell, res.Config.InitialPath)