Commit Graph

11 Commits

Author SHA1 Message Date
Jon TURNEY a205ec3ab7 configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used
Commit f37a469134 removed this from
xwin-config.h.in for some reason, but it is used.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-06-02 13:07:46 +01:00
Hans de Goede f37a469134 configure: Change DEFAULT_LOGPREFIX to really be a filename prefix
Rather then a full path prefix, this is a preparation patch for adding
support for logging to another location when not running as root.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-01 17:14:40 +10:00
Hans de Goede e7b84ca469 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-12 08:50:05 +01:00
Ryan Pavlik ab686ce029 include: Add RELOCATE_PROJECTROOT to xwin-config.h header
RELOCATE_PROJECTROOT is AC_DEFINED in configure.ac, but currently has no effect
as it doesn't appear in any AC_CONFIG_HEADER header.

When packaged for Windows, we do not have a unix-style filesystem tree, where
file needed by the X server can be found in fixed, absolute paths under the
prefix (PROJECTROOT).

Instead, the filesystem tree containing files needed by the X server and clients
will be installed with the directory containing the X server executable as the
root directory of that tree.

(Typically, this will be in the Program Files directory, which does not have a
fixed name, as it can be moved, localized, or added to to indicate x86 or x64
binaries)

So, RELOCATE_PROJECTROOT is used to make a native Windows build of the X server
look for various files (fonts, xkb data) in locations relative to the X server
rather than at absolute paths, by translating those paths at run-time.

Additionally the XKEYSYMDB, XERRORDB, XLOCALEDIR env vars checked by libX11 are
set appropriately for clients started by the X server.

Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16 16:48:34 +00:00
Alan Coopersmith 4be68b0312 Remove unused function checks from configure.ac & include/*.h.in
The code that used getisax to check for MMX support was moved to pixman
and removed from the X server by commit eb2d7fe02f.

The code that used HAVE_MKSTEMP was deleted by the Xprint removal in
commit 1c8bd318fb.

All alloca calls were removed by the patch series end in commit 5e363500c8,
and used custom X checks instead of the autoconf HAVE_ALLOCA anyway.

I can find no record of HAVE_GETUID, HAVE_GETEUID, HAVE_LINK, HAVE_MEMMOVE,
HAVE_MEMSET, HAVE_STRCHR, HAVE_STRRCHR, HAVE_GETOPT, HAVE_GETOPT_LONG,
HAVE_DOPRNT, or HAVE_VPRINTF ever being used, and the calls to those
functions are not wrapped in #ifdefs.
(Most of those are in our baseline requirements of C89 & Unix98 anyway.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-12-03 10:19:12 -08:00
Yaakov Selkowitz bf181915e1 Cygwin/X: Allow the default log location to be configurable
Allow the default log location to be configurable (e.g. /var/log),
and use separate logs for each display instance (e.g. XWin.0.log).

Make the type of g_pszLogFile const char*, per os/log.c:LogInit().

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-03-16 14:02:17 +00:00
Yaakov Selkowitz 11252ed82e Cygwin/X: Look for system.Xwinrc in SYSCONFDIR/X11
Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11)
Rename sample system.Xwinrc file not to have a X11R6 path in it's name
Add makefile install rule for system.XWinrc

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:14:52 +00:00
Yaakov Selkowitz 34269a90ea Cygwin/X: Update resources file and About dialog
Use the configured vendor web address in the About dialog

Update resources file: rework About dialog, use 'MS Shell Dlg 2'
logical font for all dialogs, add ellipsis to exit option in tray
menu as it (may) trigger another dialog.

Get short vendor name from xwin-config.h, like other configuration
data presented in the About dialog box, rather than creating the
PROJECT_NAME define

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 18:17:36 +00:00
Kevin E Martin 7c00afd0ec Define XFree86Server only where it is required. 2005-12-02 06:02:45 +00:00
Daniel Stone 8d6e743bc4 Add _XSERVER64 definition to config headers. 2005-08-21 19:23:17 +00:00
Alexander Gottwald 048045a9e7 Add XWin DDX, make Xorg DDX conditional Make XF86VidMode and XF86Misc
conditional
Add XWin DDX
Added DDXTIME, DDXOSFATALERROR, DDXOSVERRORF and DDXBEFORERESET
Added fbcmap.c
Added miinitext.c
Added -I$(top_srcdir)/Xext/extmod to INCLUDES
2005-07-04 22:18:40 +00:00