de89c6b8c6
If the suid wrapper is enabled, /usr/bin/Xorg is just a shell script that execs either /usr/libexec/Xorg.bin directly or the Xorg.wrap binary which then execve's /usr/libexec/Xorg.bin. Either way, we end up with Xorg.bin, which is problematic for two reasons: * ps shows the command as Xorg.bin * _COMM and _EXE in systemd's journal will both show Xorg.bin as well There's not much we can do about the path, but having the actual command stay as Xorg means better compatibility to existing scripts. And, the reason for this path: the command journalctl _COMM=Xorg works universally, regardless of whether the wrapper is used or not. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Acked-by: Hans de Goede <hdegoede@redhat.com>
12 lines
279 B
Bash
12 lines
279 B
Bash
#!/bin/sh
|
|
#
|
|
# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
|
|
# This allows distros to put the suid wrapper in a separate package.
|
|
|
|
basedir=@SUID_WRAPPER_DIR@
|
|
if [ -x "$basedir"/Xorg.wrap ]; then
|
|
exec "$basedir"/Xorg.wrap "$@"
|
|
else
|
|
exec "$basedir"/Xorg "$@"
|
|
fi
|