- run elevated actions as fixed System32 tools instead of a hidden subcommand - require a SHA-256 for plugin downloads - keep records of secret files that could not be deleted, and never overwrite files the host did not create - stop two concurrent requests from starting the same VM - drop invalid endpoints instead of failing the whole VM list, and reject ssh users and IPv6 zones that could inject command-line text - accept driver screenshots only at the requested path - do not treat an unreadable guest phase as normal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
490 B
Go
18 lines
490 B
Go
//go:build !windows
|
|
|
|
package host
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
// RunElevatedAction is only available on Windows.
|
|
func RunElevatedAction(_ context.Context, action, _ string) (ElevationResult, error) {
|
|
if _, ok := LookupElevationAction(action); !ok {
|
|
return ElevationResult{Action: action}, fmt.Errorf("unsupported elevation action %q", action)
|
|
}
|
|
return ElevationResult{Action: action}, fmt.Errorf("elevated actions are a Windows feature (current OS: %s)", runtime.GOOS)
|
|
}
|