mutter-launch: Don't test the argument name to validate launching things
Somebody could do: $ mv my-evil-program mutter-wayland $ PATH=.:$PATH mutter-launch mutter-wayland It's not secure, and it's hard to test with, so just drop it for now We'll be relying on logind to hand us permissions in the future.
This commit is contained in:
parent
f4fc498e65
commit
1c0e6f26e2
@ -738,9 +738,6 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (optind >= argc)
|
if (optind >= argc)
|
||||||
error(1, 0, "Expected program argument");
|
error(1, 0, "Expected program argument");
|
||||||
if (strcmp (argv[optind], "mutter-wayland") &&
|
|
||||||
strcmp (argv[optind], "gnome-shell-wayland"))
|
|
||||||
error(1, 0, "mutter-launch can only be used to launch mutter or gnome-shell");
|
|
||||||
|
|
||||||
wl.pw = getpwuid(getuid());
|
wl.pw = getpwuid(getuid());
|
||||||
if (wl.pw == NULL)
|
if (wl.pw == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user