elevate: wire SessionValid to verify session existence

This commit is contained in:
Levi Neely 2026-07-29 16:30:31 +02:00
parent 563c6dce2f
commit acfc4854d4
1 changed files with 5 additions and 4 deletions

View File

@ -249,10 +249,11 @@ func runServer(sockPath string) {
} }
var err error var err error
elevateBroker, err = elevate.NewBroker(elevate.BrokerConfig{ elevateBroker, err = elevate.NewBroker(elevate.BrokerConfig{
SocketPath: elevateSocket, SocketPath: elevateSocket,
PolicyPath: policyPath, PolicyPath: policyPath,
Notify: notifyFn, Notify: notifyFn,
Logf: func(f string, a ...any) { fmt.Printf(f+"\n", a...) }, Logf: func(f string, a ...any) { fmt.Printf(f+"\n", a...) },
SessionValid: func(id string) bool { return mgr.Session(id) != nil },
}) })
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "warning: %v\n", err) fmt.Fprintf(os.Stderr, "warning: %v\n", err)