diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-11 02:01:03 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-11 02:01:03 +0900 |
| commit | 6220f7e197f01846f5e4e3090acf9251f3ae6ade (patch) | |
| tree | b6282fefd49f321ca341c61019b144b2ea4260e5 /internal/app/launch.sudo.go | |
| parent | b86fa6b4c91a2bf331ae4a50a5aa14b668efc4e6 (diff) | |
app: migrate to new shim implementation
Both machinectl and sudo launch methods launch shim as shim is now responsible for setting up the sandbox. Various app structures are adapted to accommodate bwrap configuration and mediated wayland access.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app/launch.sudo.go')
| -rw-r--r-- | internal/app/launch.sudo.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/app/launch.sudo.go b/internal/app/launch.sudo.go index 666d0b3a..777cb2a7 100644 --- a/internal/app/launch.sudo.go +++ b/internal/app/launch.sudo.go @@ -10,8 +10,8 @@ const ( sudoAskPass = "SUDO_ASKPASS" ) -func (a *app) commandBuilderSudo() (args []string) { - args = make([]string, 0, 4+len(a.seal.env)+len(a.seal.command)) +func (a *app) commandBuilderSudo(shimEnv string) (args []string) { + args = make([]string, 0, 8) // -Hiu $USER args = append(args, "-Hiu", a.seal.sys.Username) @@ -22,12 +22,11 @@ func (a *app) commandBuilderSudo() (args []string) { args = append(args, "-A") } - // environ - args = append(args, a.seal.env...) + // shim payload + args = append(args, shimEnv) // -- $@ - args = append(args, "--") - args = append(args, a.seal.command...) + args = append(args, "--", a.seal.sys.executable, "-V", "--license") // magic for shim.Try() return } |
