xserver-multidpi/manpages.am

44 lines
1.9 KiB
Plaintext
Raw Normal View History

appmandir = $(APP_MAN_DIR)
#appman_PRE = list of application man page files set by calling Makefile.am
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
drivermandir = $(DRIVER_MAN_DIR)
#driverman_PRE = list of driver man page files set by calling Makefile.am
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
filemandir = $(FILE_MAN_DIR)
#fileman_PRE = list of file man page files set by calling Makefile.am
fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
# The calling Makefile should only contain man page targets
# Otherwise the following three global variables may conflict
EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE)
CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
# 's|/,|/, |g' will add a space to help font path formatting
MAN_SUBSTS += -e 's|__logdir__|$(logdir)|g' \
-e 's|__datadir__|$(datadir)|g' \
-e 's|__mandir__|$(mandir)|g' \
-e 's|__sysconfdir__|$(sysconfdir)|g' \
-e 's|__xconfigdir__|$(__XCONFIGDIR__)|g' \
-e 's|__xkbdir__|$(XKB_BASE_DIRECTORY)|g' \
-e 's|__XKB_DFLT_RULES__|$(XKB_DFLT_RULES)|g' \
-e 's|__XKB_DFLT_MODEL__|$(XKB_DFLT_MODEL)|g' \
-e 's|__XKB_DFLT_LAYOUT__|$(XKB_DFLT_LAYOUT)|g' \
-e 's|__XKB_DFLT_VARIANT__|$(XKB_DFLT_VARIANT)|g' \
-e 's|__XKB_DFLT_OPTIONS__|$(XKB_DFLT_OPTIONS)|g' \
-e 's|__bundle_id_prefix__|$(BUNDLE_ID_PREFIX)|g' \
-e 's|__modulepath__|$(DEFAULT_MODULE_PATH)|g' \
Xorg: Add a suid root wrapper With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? The function of this wrapper is to see if a system still needs root-rights, if it does not (it supports kms and the kms drivers are properly loaded), then it will immediately drop all elevated rights before executing the real Xorg binary. If it finds (some) cards which don't support kms, or no cards at all, then it will execute the Xorg server with elevated rights so that ie the nvidia binary driver and the vesa driver can keep working normally. To make it possible for security concious users who don't need the root rights to completely remove the wrapper, Xorg is started in a 3 step process when the wrapper is enabled during build time: 1) A simple shell script which checks if the wrapper is there, if it is it executes the wrapper, if not it directly executes the real Xorg binary 2) The wrapper gets executed, does its checks, normally drops all elevated rights and then executes the real Xorg binary 3) The real Xorg binary does its thing This allows distributions to put the wrapper binary in a separate package, and will allow users to remove this package. IE the plan with Fedora is to make "legacy" drivers depend on the wrapper pkg, and since our default install contains some legacy drivers it will be part of the default install, but users can later yum remove it (which will also automatically remove the legacy driver packages as those won't work without it anyways). The wrapper is loosely modelled after the existing Debian Xwrapper, it uses the same config-file + config-file format, and also allows restricting Xserver execution (through the wrapper) to console users only. There also is a new needs_root_rights config file directive, which can be used to override the auto-detection the wrapper does. Hopefully this will allow Debian to replace their own wrapper with this upstream one. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-05 16:41:14 +01:00
-e 's|__suid_wrapper_dir__|$(SUID_WRAPPER_DIR)|g' \
-e 's|__default_font_path__|$(COMPILEDDEFAULTFONTPATH)|g' \
-e '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(FILE_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@