shim: update payload comment
Generating permissive default no longer happens in shim. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
77f2c320a6
commit
3739b56504
|
@ -18,7 +18,7 @@ import (
|
|||
// everything beyond this point runs as target user
|
||||
// proceed with caution!
|
||||
|
||||
func shim(socket string) {
|
||||
func doShim(socket string) {
|
||||
// re-exec
|
||||
if len(os.Args) > 0 && os.Args[0] != "fortify" && path.IsAbs(os.Args[0]) {
|
||||
if err := syscall.Exec(os.Args[0], []string{"fortify", "shim"}, os.Environ()); err != nil {
|
||||
|
@ -163,7 +163,7 @@ func receiveWLfd(conn *net.UnixConn) (int, error) {
|
|||
func Try() {
|
||||
if args := flag.Args(); len(args) == 1 && args[0] == "shim" {
|
||||
if s, ok := os.LookupEnv(EnvShim); ok {
|
||||
shim(s)
|
||||
doShim(s)
|
||||
panic("unreachable")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package shim
|
||||
|
||||
import (
|
||||
"git.ophivana.moe/cat/fortify/helper/bwrap"
|
||||
)
|
||||
import "git.ophivana.moe/cat/fortify/helper/bwrap"
|
||||
|
||||
const EnvShim = "FORTIFY_SHIM"
|
||||
|
||||
|
@ -11,7 +9,7 @@ type Payload struct {
|
|||
Argv []string
|
||||
// bwrap, target full exec path
|
||||
Exec [2]string
|
||||
// bwrap config, nil for permissive
|
||||
// bwrap config
|
||||
Bwrap *bwrap.Config
|
||||
// whether to pass wayland fd
|
||||
WL bool
|
||||
|
|
Loading…
Reference in New Issue