Local control channel: unprivileged users can trigger --force-update via the running service
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build !windows && !linux
|
||||
|
||||
package control
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
// Serve is a no-op on platforms without a control channel.
|
||||
func Serve(ctx context.Context, h Handler, log *slog.Logger) error {
|
||||
return ErrUnavailable
|
||||
}
|
||||
|
||||
// Ask always reports the channel as unavailable.
|
||||
func Ask(cmd string) (string, error) {
|
||||
return "", ErrUnavailable
|
||||
}
|
||||
Reference in New Issue
Block a user