Commit Graph

32 Commits

Author SHA1 Message Date
Adam Jackson 2d1ed64d2a dix: Remove -to option to set the default connection timeout
One minute is admittedly arbitrary, but again, pretty sure this never
gets set on the command line in practice.
2019-10-30 16:17:04 +00:00
Adam Jackson 56ea4c769c dix: Remove -fn and -fc options to set default text/cursor fonts
I strongly suspect these never get used in the wild, and it's not an
especially useful thing to do in any case.
2019-10-30 16:17:04 +00:00
Adam Jackson 53d32c94f3 dix: Remove the magic WhenMapped backing store hack
Automatic compositing exists, if that's what you want then use it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-10-23 18:37:46 +00:00
Adam Jackson 3a4d7c79e7 dix: Remove MaxClients
This variable was no longer being read anywhere. MAXCLIENTS the macro is
the compile-time maximum limit, LIMITCLIENTS the macro is the default
limit, LimitClients the variable is the limit for the current server.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-12 19:31:07 +00:00
Olivier Fourdan d206c240c0 configurable maximum number of clients
Make the maximum number of clients user configurable, either from the command
line or from xorg.conf

This patch works by using the MAXCLIENTS (raised to 512) as the maximum
allowed number of clients, but allowing the actual limit to be set by the
user to a lower value (keeping the default of 256).

There is a limit size of 29 bits to be used to store both the client ID and
the X resources ID, so by reducing the number of clients allowed to connect to
the X server, the user can increase the number of X resources per client or
vice-versa.

Parts of this patch are based on a similar patch from Adam Jackson
<ajax@redhat.com>

This now requires at least xproto 7.0.28

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-24 00:00:18 -07:00
Eric Anholt 99f0365b1f Add a command line argument for disabling indirect GLX.
The attack surface for indirect GLX is huge, and it's of no use to
most people (if you get an indirect GL context, you're better served
by a immediate X error than actually trying to use an indirect GL
context and finding out that it doesn't support doing anything you
want, slowly).  This flag gives you a chance to disable indirect GLX
in environments where you just don't need it.

I put in both the '+' and '-' arguments right now, so that it's easy
to patch the value to change the default policy.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-23 13:24:22 -07:00
Jon TURNEY bc348bd2c4 Handle -displayfd and an explicit display number sensibly
Handle -displayfd and an explicit display number sensibly, e.g. use the
explicitly specified display number, and write it to the displayfd

v2: displayfd might be 0, so use -1 as invalid value
v3: Rebase for addition of NoListenAll flag

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-27 14:34:34 +00:00
Kristian Høgsberg 44fe1b8ea2 os: Add a mechanism to prevent creating any listen sockets
A socket-activated server will receive its listening sockets from the
parent process and should not create its own sockets.  This patch
introduces a NoListen flag that can be set by a DDX to prevent
the server from creating the sockets.  When NoListen is enabled, we
also disable the server lock checking, since the parent process is
responsible for checking the lock before picking the display name and
creating the sockets.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-03-20 09:23:16 +10:00
Keith Packard d89b42bda4 Clean up warnings in DIX
As usual, mostly const char changes. However, filter_device_events had
a potentially uninitialized value, 'raw', which I added a bunch of
checks for. I suspect most of those are 'can't happen', but it's hard
to see that inside the function.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Chase Douglas 88bacc49f0 os: Add -displayfd option
This option specifies a file descriptor in the launching process.  X
will scan for an available display number and write that number back to
the launching process, at the same time as SIGUSR1 generation.  This
means display managers don't need to guess at available display numbers.
As a consequence, if X fails to start when using -displayfd, it's not
because the display was in use, so there's no point in retrying the X
launch on a higher display number.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Tested-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-01 11:36:30 +10:00
Keith Packard 9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Tiago Vignatti 8976e9766e dix: adds support for none root window background
It lets the driver notify the server whether it can draw a background when
'-background none' option is used by the system platform. Use cases for that
could be video drivers performing mode-setting in kernel time, before X is up,
so a seamless transition would happen until X clients start to show up.

If the driver can copy the framebuffer cleanly then it can set the flag
(canDoBGNoneRoot), otherwise the server will fallback to the normal behaviour.
The system must explicit indicates willingness of doing so through
'-background none'. We could do this option as default; in such case,
malicious users would be able to steal the framebuffer with a bit of tricks.

For instance, I can see the content of my nVidia Quadro FX 580 framebuffer
old X session modifying a bit nv driver:

     xf86DPMSInit(pScreen, xf86DPMSSet, 0);

-    /* Clear the screen */
-    if(pNv->xaa) {
-        /* Use the acceleration engine */
-        pNv->xaa->SetupForSolidFill(pScrn, 0, GXcopy, ~0);
-        pNv->xaa->SubsequentSolidFillRect(pScrn,
-            0, 0, pScrn->displayWidth, pNv->offscreenHeight);
-        G80DmaKickoff(pNv);
-    } else {
-        /* Use a slow software clear path */
-        memset(pNv->mem, 0, pitch * pNv->offscreenHeight);
-    }
+    pScreen->canDoBGNoneRoot = TRUE;

The commit is originally based on discussions happened on xorg-devel:
http://lists.freedesktop.org/archives/xorg-devel/2010-June/009755.html

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Acked-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-11-11 23:24:43 +02:00
Tiago Vignatti bfe9cdd11b dix: delete logo hack screen saver
Protocol doesn't mention about screen saver with logo being required and
people are already using more intelligent ways to draw screen saver themes. So
consider -logo as deprecated option, deleting its code.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-11-11 23:20:35 +02:00
Vignatti Tiago (Nokia-MS/Helsinki) 5b680f2c23 os: add -sigstop option for Upstart (or equivalent) startup
This is very similar to the RunFromSmartParent (implicit) option, except
we do not send the signal to our parent process, but our own process
instead, and that signal is SIGSTOP, not SIGUSR1.

Upstart or a similar equivalent program will detect this, realize that
we are ready to accept clients now, send us SIGCONT and move our job
status from SPAWNED to RUNNING.

Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-10 11:54:14 -07:00
Paulo Cesar Pereira de Andrade 49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Adam Jackson 0bb317a78b Default to -br. Add -retro option for the nostalgic.
-retro also reverts to the classic cursor display behavior, meaning,
the cursor will be visible before anyone calls XDefineCursor().
2008-09-22 10:51:51 -04:00
Adam Jackson 0ce687634f Eviscerate save-under support.
Use a compositing manager already.  Plus I really wanted to use 'eviscerate'
in a commit message.
2008-08-13 17:28:08 -04:00
Adam Jackson 2efe1abb6f Remove global argc/argv variables.
Was only used in the logging code anymore, and uselessly so there.
2008-05-14 15:53:11 -04:00
Daniel Stone cb0a565d2b dix: add whiteroot flag
Add a -wr option to use a white root window, and use a BackPixel rather
than BackPixmap for both white and black root windows.
2006-08-18 17:04:48 +03:00
Daniel Stone 12dbd8a02f remove optional R3 backwards compatibility
Remove the permitOldBugs flag, which enabled backwards compatbility with
broken R2/R3 era clients.
2006-08-07 23:43:40 +03:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone 825a95a1fa Remove use of dix-config and xorg-config.h from public headers. 2005-08-24 11:18:35 +00:00
Alan Coopersmith ead37b0869 Mark variables modified in signal handlers as volatile (part of Sun bug id
4496504)
2005-07-16 20:52:25 +00:00
Daniel Stone e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Egbert Eich 2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich 867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich 147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley d568221710 XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
Kaleb Keithley ded6147bfb R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00