mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
17 lines
398 B
Go
17 lines
398 B
Go
package runhcs
|
|
|
|
import "net/url"
|
|
|
|
const (
|
|
SafePipePrefix = `\\.\pipe\ProtectedPrefix\Administrators\`
|
|
)
|
|
|
|
// ShimSuccess is the byte stream returned on a successful operation.
|
|
var ShimSuccess = []byte{0, 'O', 'K', 0}
|
|
|
|
func SafePipePath(name string) string {
|
|
// Use a pipe in the Administrators protected prefixed to prevent malicious
|
|
// squatting.
|
|
return SafePipePrefix + url.PathEscape(name)
|
|
}
|