Commit Graph

1168 Commits

Author SHA1 Message Date
Peter Hutterer
de89c6b8c6 xfree86: rename Xorg.bin to Xorg
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>
2015-01-05 09:53:58 +10:00
Alan Coopersmith
d153a85f74 Add request length checking test cases for some Xinput 1.x requests
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08 18:09:49 -08:00
Keith Packard
e9db768202 Update to version 1.16.99.901
1.17 RC1

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:32:24 -07:00
Keith Packard
f36f16f055 dri2: Distribute new pci_ids headers
Create hw/xfree86/dri2/pci_ids/Makefile.am which includes all of the new
pci id files in the tarballs. Build that from configure.ac, and run it
from dri2/Makefile.am

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:30:23 -07:00
Keith Packard
3a123fbdda Merge remote-tracking branch 'jturney/master'
Conflicts:
	hw/xwin/winpixmap.c

Adam removed a pile of windows code, including this file.
2014-10-27 15:39:26 -07:00
Keith Packard
de55aafa8f Merge remote-tracking branch 'ajax/xwin' 2014-10-23 17:28:24 -07:00
Jon TURNEY
7ea4a21fee configure.ac: Force --disable-libdrm on Cygwin
This is now needed to avoid trying to build the modesetting driver by default
when building the Xorg DDX on Cygwin.

http://tinderbox.x.org/builds/2014-09-18-0011/logs/xserver/#build

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-09 16:49:29 +01:00
Jon TURNEY
883927d2e8 configure.ac: Avoid "Your OS is unknown" warning when configuring for Cygwin
Don't emit "Your OS is unknown" warning when configuring with --enable-xorg to
build the XOrg DDX for Cygwin.

The list of supported OSes is getting a bit unwieldy, so just remove it.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-09 16:42:50 +01:00
Alan Coopersmith
da887726ee Use unique display name for each xi2 test program [v3]
make -j 8 check was sporadically failing in different xi2 tests.
After adding the asserts in the previous commit to catch xkb failure
it became easier to catch the failures and see that multiple tests
were running at once trying to write to /tmp/server-(null).xkm and
then delete it, and interfering with each other.

Putting a unique string into the display variable let them each write
to their own file and not interfere with others.

v2: Fix Linux bits:

  Add #include <errno.h> to get a declaration of
  program_invocation_name on Linux.

  Use only the last portion of the pathname so that the resulting
  display name doesn't contain any slashes.

v3: use program_invocation_short_name on Linux

  This is the same as program_invocation_name, except is has
  stripped off any path prefix.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-09 14:15:45 +02:00
Adam Jackson
c79f824bf6 xwin: Remove primary DirectDraw engine
Again, as the documentation says, "unsupported, obsolete".

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 09:28:04 +02:00
Adam Jackson
8465ee788f xwin: Remove native GDI engine (v2)
As the man page says, "unsupported, experimental, and barely
functional".  The last even minor updates to any of this were back in
2004, presumably it's not getting better any time soon.

This is also the only GC ops implementation in the tree that actually
falls all the way down to the spans routines for everything, so that's
pretty nice to be rid of.

v2: Fix stray break statement (Jon)

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 09:27:21 +02:00
Keith Packard
78c27d12e1 Merge remote-tracking branch 'jturney/xwin-clipboard-refactoring' 2014-09-29 13:04:49 -07:00
Keith Packard
cc59be38b7 os: Don't listen to 'tcp' by default. Add '-listen' option. [v2]
This disables the tcp listen socket by default. Then, it
uses a new xtrans interface, TRANS(Listen), to provide a command line
option to re-enable those if desired.

v2: Leave unix socket enabled by default. Add configure options.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-22 13:52:20 -07:00
Keith Packard
8ada3fb32c Require xtrans 1.3.5 or newer
This version of xtrans offers the TRANS(Listen) function.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-22 13:52:20 -07:00
Keith Packard
69d8572ae4 Build required portions of registry.c automatically [v2]
Instead of making the inclusion of the registry code a global
conditional, split the registry into two pieces; the bits required by
the X-Resource extension (the resource names) and the bits required by
the XCSECURITY extension (the protocol names). Build each set of code
if the related extension is being built.

v2: Check for both XCSECURITY and XSELINUX.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-09-18 15:29:29 -07:00
Adam Jackson
670ee0757f ephyr: Properly implement hardware cursors (v3)
When dix hands us a new cursor we proxy it through to the host server;
since we keep the host XID on the cursor bits private we can switch
among them with just ChangeWindowAttributes.

v2:
Use xcb-renderutil for argb format lookup (Uli, Keith)
Fall back to core cursors for host RENDER < 0.5 (Keith)
Drop useless ephyrEnableCursor
Consistently create/destroy the cursor image GC on both paths
Treat null cursor from dix as invisible

v3:
Initialize the invisible cursor's image (Keith)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 15:27:10 -07:00
Keith Packard
eaee6572be Merge remote-tracking branch 'anholt/modesetting-import' 2014-09-17 15:49:24 -07:00
Eric Anholt
2feda3b6b5 modesetting: Connect the driver to the build.
v2: Fix libdrm version check, and use XORG_VERSION_* instead of a
    static 1.0.0 version for the driver module.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-16 16:28:42 -07:00
Adam Jackson
2e21c081d3 xfree86: Remove the memory of MTRR awareness
pciaccess does this for us, and none of our internal hooks really
remain.  This does remove a cleanup pass from the BSD code, but the case
it's covering (a previous server leaving MTRRs around) can't happen
anymore.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Jon TURNEY
88d4459704 hw/xwin: Move clipboard integration code down to a subdirectory
Move clipboard integration code down to a subdirectory and build as a
convenience library

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:28 +01:00
Jon TURNEY
a70c2384a2 hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead
Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper,
the completely equivalent client-side mechanism.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:13 +01:00
Laércio de Sousa
3a51418b2d ephyr: set screen size & origin from host X server output's CRTC geometry
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake "Zaphod mode").

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Ross Burton
4afedf545b configure.ac: add option for xshmfence
xshmfence is usable outside of DRI3, and is currently autodetected which isn't
good for distributions where deterministic builds are desired.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:00:43 -07:00
Adam Jackson
4302484ef2 dix: Remove arch awareness from servermd.h (v2)
At this point we have no architectures where image byte order is
different from bitmap bit order, or where either of those two are not
also the native word endianness.  Hooray, one more place where we don't
have to worry about enabling new CPU architectures.

v2: Rebase to master to handle the addition of ppc64le, arc, and xtensa,
and use autoconf's endianness detection instead of gcc predefines.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24 16:46:47 -07:00
Keith Packard
16fbad3c7a Post 1.16 version bump to 1.16.99.1
And we're off towards 1.17; this version bump serves to keep
development versions distinct from stable versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 16:17:53 -07:00
Keith Packard
8b36e1ec8d Update to version 1.16.0
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-17 00:03:33 -07:00
Keith Packard
9308eafb7d Update to version 1.15.99.904
One more RC to get the non-PCI patches tested before release

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:28:26 -07:00
Kristian Høgsberg
2f113d68f6 xwayland: Add glamor and DRI3 support
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-24 15:09:55 -07:00
Alan Coopersmith
1095c26250 config: show default path in help for --with-xkb-bin-directory
Now shows:
  --with-xkb-bin-directory=DIR
                          Directory containing xkbcomp program (default:
                          ${bindir})

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-06 21:08:16 -07:00
Keith Packard
08820f0376 Update to version 1.15.99.903
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 22:35:38 -07:00
Adam Jackson
4cbd3fabaa configure: Require sufficiently new wayland-client for xwayland ddx
The explicit release requests were added in 1.3.0, don't try to build
against older.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 11:16:09 -07:00
Rob Clark
b241934238 default to stub int10 implementation on arm
There should be no reason to need a real int10 implementation on arm,
and switching to stub is an easy way to fix:

  xf86x86emu.c: In function 'xf86Int10ExecSetup':
  xf86x86emu.c:56:9: error: unknown field 'xf_outb' specified in initializer
  xf86x86emu.c:57:9: error: unknown field 'xf_outw' specified in initializer
  xf86x86emu.c:58:9: error: unknown field 'xf_outl' specified in initializer

which is caused by the following in compiler.h:

  #define outb xf_outb
  #define outw xf_outw
  #define outl xf_outl

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
2014-04-27 12:01:56 -04:00
Keith Packard
ba5c2b6c87 Merge remote-tracking branch 'krh/xwayland-for-keithp' 2014-04-21 14:59:51 -07:00
Julien Cristau
28fa5dd5ca configure: require xproto 7.0.26 for pointer typedef removal
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 11:56:39 -07:00
Julien Cristau
d2274f2f46 configure: require fontsproto 2.1.3 for pointer typedef removal
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 11:56:20 -07:00
Kristian Høgsberg
d2c6e801b5 configure.ac: Remove check for WAYLAND_SCANNER_RULES
This makes configure fail if the wayland autoconf macros aren't found.
We don't need the scanner for shm-only xwayland so just drop this line for
now.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-21 11:15:56 -07:00
Julien Cristau
208157a76c configure: fix help text for dmx
As of 93fa64e17d it's disabled by default,
so stop saying it's automatically enabled in configure --help.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-04-18 11:23:07 +02:00
Keith Packard
bd3de10f86 Bump to version 1.15.99.902. Closing the 1.16 merge window.
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-08 14:25:18 -07:00
Keith Packard
b4d0bec22c Merge remote-tracking branch 'krh/xwayland-for-keithp' 2014-04-03 15:35:01 -07:00
Kristian Høgsberg
6e539d8817 Xwayland DDX
Started out as an Xorg module to be used from Xorg drivers to let
Xorg run under a wayland server.  The idea was to be able to reuse the
2D acceleration from the Xorg driver.  Now with glamor being credible,
a better plan is to just make Xwayland its own DDX, similar to Xwin
and Xquartz.  This is a much better fit, as much of the code in the
original approach had to hack around Xorg doing Xorg things like take
over the VT, probe input devices and read config files.  Another big win
is that Xwayland dosn't need to be setuid root.

The Xwayland support for DRI3, Glamor and render nodes was done by
Axel Davy <axel.davy@ens.fr>, who also did a lot of work on the rebase
to the Xwayland DDX.

Contributions from:

  Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
  Corentin Chary <corentin.chary@gmail.com>
  Daniel Stone <daniel@fooishbar.org>
  Kristian Høgsberg <krh@bitplanet.net>
  Robert Bragg <robert@linux.intel.com>
  Scott Moreau <oreaus@gmail.com>
  Tiago Vignatti <tiago.vignatti@intel.com>
  Giovanni Campagna <gcampagn@redhat.com>
  Jonas Ådahl <jadahl@gmail.com>
  Ray Strode <rstrode@redhat.com>
  Trevor McCort <tjmccort@gmail.com>
  Rui Matos <tiagomatos@gmail.com>
  Axel Davy <axel.davy@ens.fr>
  Jasper St. Pierre <jstpierre@mecheye.net>

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2014-04-03 15:19:22 -07:00
Keith Packard
84f977467b Merge remote-tracking branch 'whot/for-keith' 2014-04-03 10:44:28 -07:00
Hans de Goede
9d65c515d8 xf86LogInit: log to XDG_DATA_HOME when not running as root
When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not
running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to
log to the default /var/log/... when it is 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-03 14:17:35 +10: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
Jon TURNEY
432fc37e2c Build fbcmap_mi.c once, rather than once for each DDX
Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb
or libwfb convenience library.

Since 84e8de1271 we don't have fbcmap.c

This is a sort of revert of 17d85387d1

v2: Remove libkdrivestubs.la from configure.ac

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27 14:34:06 +00:00
Gaetan Nadon
ca8f26f636 suid: replace deprecated AC_HELP_STRING with AS_HELP_STRING
Fixes automake warning.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-26 09:48:15 +10:00
Alan Coopersmith
bf087659f0 Add necessary headers for major()/minor() on Solaris to xf86Xinput.c
Without these, after commit fdb4ec86c2, it fails to build on Solaris,
with errors of:
xf86Xinput.c: In function 'xf86stat':
xf86Xinput.c:816:5: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration]
xf86Xinput.c:817:5: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22 14:42:09 -07:00
Gaetan Nadon
99bee6c054 Default font path: remove the check for ${sysconfdir}/X11/fontpath.d
The location ${sysconfdir}/X11/fontpath.d is unknown at configuration time
(only at make time) as evidenced by the configuration output:

    checking for ${prefix}/etc/X11/fontpath.d... no

Unlike font-util for the X fonts, there is no mechanism to query where
fontpath.d is. Fedora have chosen /etc/X11 and others have followed, but this
is not a standard. It might also be installed at another location, it may or may
not be under the xserver installation prefix. We just don't know. Debian does
not use this at all.

Distros are using --with-default-path when they support fontpath.d, so they
never relied on the server default as it never worked.

The patch essentially is a noop, which leaves the door open for anyone who
could potentially provide a reliable implementation of choosing fontpath.d
when applicable.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22 14:04:25 -07: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
Keith Packard
1c61d38528 Merge remote-tracking branch 'jwrdecoede/for-keith' 2014-03-07 22:07:19 -08:00
Eric Anholt
8d1cca3063 xorg: Build a glamor_egl module.
This is not exposing the API we want long term, but it should get
existing DDX drivers up and running while we massage the API into
shape.

v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use
    version 0.5.1 (the point it was forked from the external repo).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05 13:10:17 -08:00