Files
pipelines/internal/server/webauth_owner_unix.go
T
alan f11ff8650d Require step-up password confirmation for shells, terminals and file changes
A new elevate request verifies the web sign-in password (scrypt hash, read-only,
rate-limited, constant time) and elevates that connection for 15 minutes.
chat_shell_run/input, rename/move/delete, terminal_open/input and POST /files
(via a per-connection upload token) are refused with code elevation_required
until then.
2026-11-10 01:21:15 +00:00

14 lines
209 B
Go

//go:build darwin || linux
package server
import (
"os"
"syscall"
)
func ownedByCurrentUser(info os.FileInfo) bool {
stat, ok := info.Sys().(*syscall.Stat_t)
return ok && int(stat.Uid) == os.Getuid()
}