[PATCH 2/2] Rename GiveConsole and TakeConsole to follow other additional files.
Matěj Cepl
mcepl at redhat.com
Tue Aug 9 06:34:53 PDT 2011
GiveConsole -> Xstartup_0
TakeConsole -> Xreset_0
Signed-off-by: Matěj Cepl <mcepl at redhat.com>
---
config/GiveConsole.cpp | 11 -----------
config/Makefile.am | 8 ++++----
config/TakeConsole | 6 ------
config/Xreset.cpp | 2 +-
config/Xreset_0 | 6 ++++++
config/Xstartup.cpp | 2 +-
config/Xstartup_0.cpp | 11 +++++++++++
config/xdm-config.cpp | 4 ++--
man/xdm.man | 4 ++--
9 files changed, 27 insertions(+), 27 deletions(-)
delete mode 100644 config/GiveConsole.cpp
delete mode 100644 config/TakeConsole
create mode 100644 config/Xreset_0
create mode 100644 config/Xstartup_0.cpp
diff --git a/config/GiveConsole.cpp b/config/GiveConsole.cpp
deleted file mode 100644
index 850757e..0000000
--- a/config/GiveConsole.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-XCOMM!/bin/sh
-XCOMM Assign ownership of the console to the invoking user
-XCOMM
-XCOMM By convention, both xconsole and xterm -C check that the
-XCOMM console is owned by the invoking user and is readable before attaching
-XCOMM the console output. This way a random user can invoke xterm -C without
-XCOMM causing serious grief.
-XCOMM
-chown $USER /dev/console
-exec BINDIR/sessreg -a -x "/etc/X11/xdm/Xservers" \
- -l $DISPLAY -h "" $USER
diff --git a/config/Makefile.am b/config/Makefile.am
index 31b53b3..4d1683e 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -19,8 +19,8 @@ xdmscript_SCRIPTS = \
Xstartup
dist_xdmscript_SCRIPTS = \
- GiveConsole \
- TakeConsole \
+ Xstartup_0 \
+ Xreset_0 \
Xsetup_0 \
Xwilling
@@ -29,11 +29,11 @@ pixmapdir = $(XDM_PIXMAPDIR)
dist_pixmap_DATA = xorg-bw.xpm xorg.xpm
BUILT_SOURCES = Xservers.ws xdm-config Xreset Xresources Xsession \
- Xstartup GiveConsole
+ Xstartup Xstartup_0
CLEANFILES = $(BUILT_SOURCES) Xservers
-EXTRA_DIST = Xservers.ws.cpp Xservers.fs GiveConsole.cpp \
+EXTRA_DIST = Xservers.ws.cpp Xservers.fs Xstartup_0.cpp \
xdm-config.cpp Xreset.cpp Xresources.cpp Xsession.cpp Xstartup.cpp
Xservers: Xservers.$(SERVERSTYPE)
diff --git a/config/TakeConsole b/config/TakeConsole
deleted file mode 100644
index a4ac108..0000000
--- a/config/TakeConsole
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Reassign ownership of the console to root, this should disallow
-# assignment of console output to any random users's xterm
-#
-chmod 622 /dev/console
-chown root /dev/console
diff --git a/config/Xreset.cpp b/config/Xreset.cpp
index 321cd89..e7e9e38 100644
--- a/config/Xreset.cpp
+++ b/config/Xreset.cpp
@@ -1,5 +1,5 @@
XCOMM!/bin/sh
-XCOMM Deregister a login. (Derived from TakeConsole as follows:)
+XCOMM Deregister a login. (Derived from Xreset_0 as follows:)
XCOMM
BINDIR/sessreg -d -w WTMP_FILE -u UTMP_FILE \
-x XDMCONFIGDIR/Xservers -l $DISPLAY -h "" $USER
diff --git a/config/Xreset_0 b/config/Xreset_0
new file mode 100644
index 0000000..a4ac108
--- /dev/null
+++ b/config/Xreset_0
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Reassign ownership of the console to root, this should disallow
+# assignment of console output to any random users's xterm
+#
+chmod 622 /dev/console
+chown root /dev/console
diff --git a/config/Xstartup.cpp b/config/Xstartup.cpp
index 1207bd3..7408e8e 100644
--- a/config/Xstartup.cpp
+++ b/config/Xstartup.cpp
@@ -1,4 +1,4 @@
XCOMM!/bin/sh
-XCOMM Register a login (derived from GiveConsole as follows:)
+XCOMM Register a login (derived from Xstartup_0 as follows:)
XCOMM
exec BINDIR/sessreg -a -x XDMCONFIGDIR/Xservers -l $DISPLAY -h "" $USER
diff --git a/config/Xstartup_0.cpp b/config/Xstartup_0.cpp
new file mode 100644
index 0000000..850757e
--- /dev/null
+++ b/config/Xstartup_0.cpp
@@ -0,0 +1,11 @@
+XCOMM!/bin/sh
+XCOMM Assign ownership of the console to the invoking user
+XCOMM
+XCOMM By convention, both xconsole and xterm -C check that the
+XCOMM console is owned by the invoking user and is readable before attaching
+XCOMM the console output. This way a random user can invoke xterm -C without
+XCOMM causing serious grief.
+XCOMM
+chown $USER /dev/console
+exec BINDIR/sessreg -a -x "/etc/X11/xdm/Xservers" \
+ -l $DISPLAY -h "" $USER
diff --git a/config/xdm-config.cpp b/config/xdm-config.cpp
index a685129..9a9e33a 100644
--- a/config/xdm-config.cpp
+++ b/config/xdm-config.cpp
@@ -29,8 +29,8 @@ DisplayManager*reset: XDMSCRIPTDIR/Xreset
DisplayManager*authComplain: true
! The following three resources set up display :0 as the console.
DisplayManager._0.setup: XDMSCRIPTDIR/Xsetup_0
-DisplayManager._0.startup: XDMSCRIPTDIR/GiveConsole
-DisplayManager._0.reset: XDMSCRIPTDIR/TakeConsole
+DisplayManager._0.startup: XDMSCRIPTDIR/Xstartup_0
+DisplayManager._0.reset: XDMSCRIPTDIR/Xreset_0
#ifdef XPM
DisplayManager*loginmoveInterval: 10
#endif /* XPM */
diff --git a/man/xdm.man b/man/xdm.man
index 9590c1a..a1f258a 100644
--- a/man/xdm.man
+++ b/man/xdm.man
@@ -1207,7 +1207,7 @@ Here is a sample \fIXstartup\fP script:
exit 1
fi
sessreg\0\-a\0\-l $DISPLAY\0\-x XDMDIR/Xservers $LOGNAME
- XDMDIR/GiveConsole
+ XDMDIR/Xstartup_0
exit 0
.fi
.SH "SESSION PROGRAM"
@@ -1321,7 +1321,7 @@ A sample \fIXreset\fP script:
\& # This program is run as root after the session ends
\& #
sessreg\0\-d\0\-l $DISPLAY\0\-x XDMDIR/Xservers $LOGNAME
- XDMDIR/TakeConsole
+ XDMDIR/Xreset_0
exit 0
.fi
.SH "CONTROLLING THE SERVER"
--
1.7.6
More information about the xorg-devel
mailing list