summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2016-11-11 15:58:36 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2016-11-11 15:58:36 +0000
commit27aba02151d83c222c8d6420f27c451d3db25d4b (patch)
tree7556d37d99d58d564d419d01365c64592c050c1b
parenta1154a08266b4c84b4ce978cd707fb86f5f2bb74 (diff)
Xsession cleanup:
- remove mkstemp conditional it's always there - remove USE_XPM conditional - remove SCO and Unixware bits that survived so far
-rw-r--r--app/xenodm/config/Makefile.am8
-rw-r--r--app/xenodm/config/Xsession.cpp41
-rw-r--r--app/xenodm/configure.ac6
3 files changed, 3 insertions, 52 deletions
diff --git a/app/xenodm/config/Makefile.am b/app/xenodm/config/Makefile.am
index 88f391d00..f714131ab 100644
--- a/app/xenodm/config/Makefile.am
+++ b/app/xenodm/config/Makefile.am
@@ -34,14 +34,8 @@ EXTRA_DIST = Xservers.cpp \
# Defines used when cpp'ing config files to replace settings in the files
-#if USE_XPM
XPMDEFINES = -DXPM -DBITMAPDIR=$(XENODM_PIXMAPDIR) -DXENODM_PIXMAP=$(XENODM_PIXMAP) \
-DXENODM_BWPIXMAP=$(XENODM_BWPIXMAP)
-#endif
-
-#if HAVE_MKTEMP_COMMAND
-MKTEMP_DEFINES = -DMKTEMP_COMMAND=$(MKTEMP_COMMAND)
-#endif
CPP_FILES_FLAGS = -DBINDIR="$(bindir)" -DDEFAULTVT="$(DEFAULTVT)" \
-DUTMP_FILE="$(UTMP_FILE)" -DWTMP_FILE="$(WTMP_FILE)" \
@@ -49,7 +43,7 @@ CPP_FILES_FLAGS = -DBINDIR="$(bindir)" -DDEFAULTVT="$(DEFAULTVT)" \
-DXENODMXAUTHDIR="$(XENODMXAUTHDIR)" \
-DXENODMCONFIGDIR="$(XENODMCONFIGDIR)" \
-DXENODMSCRIPTDIR="$(XENODMSCRIPTDIR)" -DSU="$(SU)" \
- $(XPMDEFINES) -DSHELL_CMD="$(SHELL_CMD)" $(MKTEMP_DEFINES)
+ $(XPMDEFINES) -DSHELL_CMD="$(SHELL_CMD)"
Xservers: $(srcdir)/Xservers.cpp
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.cpp | $(CPP_SED_MAGIC) > $@
diff --git a/app/xenodm/config/Xsession.cpp b/app/xenodm/config/Xsession.cpp
index 5fb9c105e..98ac55da4 100644
--- a/app/xenodm/config/Xsession.cpp
+++ b/app/xenodm/config/Xsession.cpp
@@ -1,6 +1,6 @@
XCOMM!SHELL_CMD
XCOMM
-XCOMM $OpenBSD: Xsession.cpp,v 1.1 2016/10/23 08:30:37 matthieu Exp $
+XCOMM $OpenBSD: Xsession.cpp,v 1.2 2016/11/11 15:58:35 matthieu Exp $
XCOMM redirect errors to a file in user's home directory if we can
@@ -9,34 +9,15 @@ if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null )
then
exec > "$errfile" 2>&1
else
-#ifdef MKTEMP_COMMAND
- mktemp=MKTEMP_COMMAND
for errfile in "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
- if ef="$( umask 077 && $mktemp "$errfile.XXXXXX" 2> /dev/null)"
+ if ef="$( umask 077 && mktemp "$errfile.XXXXXX" 2> /dev/null)"
then
exec > "$ef" 2>&1
mv "$ef" "$errfile" 2> /dev/null
break
fi
done
-#else
-XCOMM Since this system doesn't have a mktemp command to allow secure
-XCOMM creation of files in shared directories, no fallback error log
-XCOMM is being used. See https://bugs.freedesktop.org/show_bug.cgi?id=5898
-XCOMM
-XCOMM for errfile in "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
-XCOMM do
-XCOMM if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null )
-XCOMM then
-XCOMM exec > "$errfile" 2>&1
-XCOMM break
-XCOMM fi
-XCOMM done
-
- exec > /dev/null 2>&1
-
-#endif
fi
XCOMM if we have private ssh key(s), start ssh-agent and add the key(s)
@@ -87,24 +68,6 @@ else
if [ -f "$resources" ]; then
BINDIR/xrdb -load "$resources"
fi
-#if defined(__SCO__) || defined(__UNIXWARE__)
- [ -r /etc/default/xdesktops ] && {
- . /etc/default/xdesktops
- }
-
- [ -r /etc/default/xenodm ] && {
- . /etc/default/xenodm
- }
-
- XCOMM Allow the user to over-ride the system default desktop
- [ -r $HOME/.xenodmdesktop ] && {
- . $HOME/.xenodmdesktop
- }
-
- [ -n "$XDESKTOP" ] && {
- exec `eval $XDESKTOP`
- }
-#endif
BINDIR/xterm &
BINDIR/fvwm
fi
diff --git a/app/xenodm/configure.ac b/app/xenodm/configure.ac
index 40b1938d3..0d791d949 100644
--- a/app/xenodm/configure.ac
+++ b/app/xenodm/configure.ac
@@ -45,12 +45,6 @@ XORG_DEFAULT_OPTIONS
XORG_PROG_RAWCPP
XORG_WITH_LINT
-# Checks for programs.
-# Check for mktemp to prevent security issue noted in Xorg bug #5898
-# See https://bugs.freedesktop.org/show_bug.cgi?id=5898 for details.
-AC_PATH_PROG(MKTEMP_COMMAND, mktemp)
-AM_CONDITIONAL(HAVE_MKTEMP_COMMAND, test x$MKTEMP_COMMAND != x)
-
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIGNAL