Eradicate the VTInit code.

"This option should rarely be used."  Never sounds like a better idea.
This commit is contained in:
Adam Jackson 2008-02-01 16:15:58 +11:00
parent 24089b0624
commit 0bdd20a045
6 changed files with 0 additions and 61 deletions

View File

@ -733,7 +733,6 @@ typedef enum {
FLAG_DISABLEMODINDEV,
FLAG_MODINDEVALLOWNONLOCAL,
FLAG_ALLOWMOUSEOPENFAIL,
FLAG_VTINIT,
FLAG_VTSYSREQ,
FLAG_XKBDISABLE,
FLAG_PCIPROBE1,
@ -785,8 +784,6 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{ FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_VTINIT, "VTInit", OPTV_STRING,
{0}, FALSE },
{ FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_XKBDISABLE, "XkbDisable", OPTV_BOOLEAN,
@ -977,8 +974,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
#endif
}
xf86Info.vtinit = xf86GetOptValString(FlagOptions, FLAG_VTINIT);
if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE1))
xf86Info.pciFlags = PCIProbe1;
if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE2))

View File

@ -97,7 +97,6 @@ InputInfoPtr xf86InputDevs = NULL;
xf86InfoRec xf86Info = {
-1, /* consoleFd */
-1, /* vtno */
NULL, /* vtinit */
FALSE, /* vtSysreq */
SKWhenNeeded, /* ddxSpecialKeys */
NULL, /* pMouse */

View File

@ -102,7 +102,6 @@ static void xf86PrintBanner(void);
static void xf86PrintMarkers(void);
static void xf86PrintDefaultModulePath(void);
static void xf86PrintDefaultLibraryPath(void);
static void xf86RunVtInit(void);
static Bool probe_devices_from_device_sections(DriverPtr drvp);
static Bool add_matching_devices_to_configure_list(DriverPtr drvp);
@ -238,9 +237,6 @@ PostConfigInit(void)
xf86OSPMClose = xf86OSPMOpen();
#endif
/* Run an external VT Init program if specified in the config file */
xf86RunVtInit();
/* Do this after XF86Config is read (it's normally in OsInit()) */
OsInitColors();
}
@ -1915,44 +1911,6 @@ xf86PrintDefaultLibraryPath(void)
ErrorF("%s\n", DEFAULT_LIBRARY_PATH);
}
static void
xf86RunVtInit(void)
{
int i;
/*
* If VTInit was set, run that program with consoleFd as stdin and stdout
*/
if (xf86Info.vtinit) {
switch(fork()) {
case -1:
FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno));
break;
case 0: /* child */
if (setuid(getuid()) == -1) {
xf86Msg(X_ERROR, "xf86RunVtInit: setuid failed (%s)\n",
strerror(errno));
exit(255);
}
/* set stdin, stdout to the consoleFd */
for (i = 0; i < 2; i++) {
if (xf86Info.consoleFd != i) {
close(i);
dup(xf86Info.consoleFd);
}
}
execl("/bin/sh", "sh", "-c", xf86Info.vtinit, (void *)NULL);
xf86Msg(X_WARNING, "exec of /bin/sh failed for VTInit (%s)\n",
strerror(errno));
exit(255);
break;
default: /* parent */
wait(NULL);
}
}
}
/*
* xf86LoadModules iterates over a list that is being passed in.
*/

View File

@ -75,7 +75,6 @@ typedef enum {
typedef struct {
int consoleFd;
int vtno;
char * vtinit;
Bool vtSysreq;
SpecialKeysInDDX ddxSpecialKeys;

View File

@ -507,17 +507,6 @@ This allows the server to start up even if the mouse device can't be
opened/initialised.
Default: false.
.TP 7
.BI "Option \*qVTInit\*q \*q" command \*q
Runs
.I command
after the VT used by the server has been opened.
The command string is passed to \*q/bin/sh \-c\*q, and is run with the real
user's id with stdin and stdout set to the VT.
The purpose of this option is to allow system dependent VT initialisation
commands to be run.
This option should rarely be needed.
Default: not set.
.TP 7
.BI "Option \*qVTSysReq\*q \*q" boolean \*q
enables the SYSV\-style VT switch sequence for non\-SYSV systems
which support VT switching.

View File

@ -208,7 +208,6 @@ typedef enum {
XKBVARIANT,
XKBOPTIONS,
/* The next two have become ServerFlags options */
VTINIT,
VTSYSREQ,
/* Obsolete keyboard tokens */
SERVERNUM,