diff options
author | Adam Jackson <ajax@redhat.com> | 2008-02-01 16:15:58 +1100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-02-14 07:52:46 +1100 |
commit | 0bdd20a0454c94f902fd4874855125bf7510fcf5 (patch) | |
tree | 4e61ce703e1b957fd551cffd5e27fbbdcbcd119d /hw/xfree86 | |
parent | 24089b06243101b1bff4f2fd79fcbfd6a93992d5 (diff) |
Eradicate the VTInit code.
"This option should rarely be used." Never sounds like a better idea.
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 5 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Globals.c | 1 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 42 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Privstr.h | 1 | ||||
-rw-r--r-- | hw/xfree86/doc/man/xorg.conf.man.pre | 11 | ||||
-rw-r--r-- | hw/xfree86/parser/xf86tokens.h | 1 |
6 files changed, 0 insertions, 61 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 622c31850..605c6b347 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -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)) diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index d796d627c..ba603f4df 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -97,7 +97,6 @@ InputInfoPtr xf86InputDevs = NULL; xf86InfoRec xf86Info = { -1, /* consoleFd */ -1, /* vtno */ - NULL, /* vtinit */ FALSE, /* vtSysreq */ SKWhenNeeded, /* ddxSpecialKeys */ NULL, /* pMouse */ diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 2a7ecfdc8..41cf1d17c 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -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. */ diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 92a6305a0..d97ca440e 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -75,7 +75,6 @@ typedef enum { typedef struct { int consoleFd; int vtno; - char * vtinit; Bool vtSysreq; SpecialKeysInDDX ddxSpecialKeys; diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 608ba37ed..96f30c4bd 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -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. diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h index 786dac145..6e4fdeab5 100644 --- a/hw/xfree86/parser/xf86tokens.h +++ b/hw/xfree86/parser/xf86tokens.h @@ -208,7 +208,6 @@ typedef enum { XKBVARIANT, XKBOPTIONS, /* The next two have become ServerFlags options */ - VTINIT, VTSYSREQ, /* Obsolete keyboard tokens */ SERVERNUM, |