From e2b9e6a531074d39884bbfb9fceea5452477e6e1 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Tue, 15 Nov 2011 20:53:46 +0000 Subject: Update to xdm 1.1.11 plus a few patches from git master. patched to restore static greeter. Tested by shadchin@, jasper@ --- app/xdm/config/Makefile.am | 2 +- app/xdm/config/Makefile.in | 76 +++++++++++++++++++++++-------------------- app/xdm/config/Xaccess | 4 +-- app/xdm/config/Xresources.cpp | 3 +- app/xdm/config/Xsession.cpp | 55 +++++++++++++++++++++---------- app/xdm/config/Xstartup.cpp | 4 +-- app/xdm/config/xdm-config.cpp | 4 +-- 7 files changed, 88 insertions(+), 60 deletions(-) (limited to 'app/xdm/config') diff --git a/app/xdm/config/Makefile.am b/app/xdm/config/Makefile.am index d13645fb6..30e22ea54 100644 --- a/app/xdm/config/Makefile.am +++ b/app/xdm/config/Makefile.am @@ -59,4 +59,4 @@ CPP_FILES_FLAGS = -DBINDIR="$(bindir)" -DDEFAULTVT="$(DEFAULTVT)" \ -DSHELL_CMD="$(SHELL_CMD)" $(MKTEMP_DEFINES) Xservers.ws: $(srcdir)/Xservers.ws.cpp - $(cpp_verbose)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.ws.cpp | $(CPP_SED_MAGIC) > $@ + $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.ws.cpp | $(CPP_SED_MAGIC) > $@ diff --git a/app/xdm/config/Makefile.in b/app/xdm/config/Makefile.in index 40c327d75..b8e894017 100644 --- a/app/xdm/config/Makefile.in +++ b/app/xdm/config/Makefile.in @@ -30,9 +30,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -48,8 +48,10 @@ DIST_COMMON = README $(dist_pixmap_DATA) $(dist_xdmconfig_DATA) \ $(srcdir)/Makefile.in $(top_srcdir)/cpprules.in subdir = config ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(install_sh) -d @@ -80,12 +82,12 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPDEFS_CFLAGS = @APPDEFS_CFLAGS@ APPDEFS_LIBS = @APPDEFS_LIBS@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ -AS = @AS@ AUTH_CFLAGS = @AUTH_CFLAGS@ AUTH_LIBS = @AUTH_LIBS@ AUTOCONF = @AUTOCONF@ @@ -101,10 +103,6 @@ CHOOSER_LIBS = @CHOOSER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULTVT = @DEFAULTVT@ DEFS = @DEFS@ @@ -119,41 +117,46 @@ DEF_SYSTEM_SHELL = @DEF_SYSTEM_SHELL@ DEF_USER_PATH = @DEF_USER_PATH@ DEF_XDM_CONFIG = @DEF_XDM_CONFIG@ DEPDIR = @DEPDIR@ +DEV_RANDOM = @DEV_RANDOM@ DLLTOOL = @DLLTOOL@ DMCP_CFLAGS = @DMCP_CFLAGS@ DMCP_LIBS = @DMCP_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ DYNAMIC_GREETER_FALSE = @DYNAMIC_GREETER_FALSE@ DYNAMIC_GREETER_TRUE = @DYNAMIC_GREETER_TRUE@ -ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -HAS_ARC4_RANDOM_FALSE = @HAS_ARC4_RANDOM_FALSE@ -HAS_ARC4_RANDOM_TRUE = @HAS_ARC4_RANDOM_TRUE@ HAS_KERBEROS_FIVE_FALSE = @HAS_KERBEROS_FIVE_FALSE@ HAS_KERBEROS_FIVE_TRUE = @HAS_KERBEROS_FIVE_TRUE@ HAS_SECURE_RPC_FALSE = @HAS_SECURE_RPC_FALSE@ HAS_SECURE_RPC_TRUE = @HAS_SECURE_RPC_TRUE@ HAS_XDM_AUTH_FALSE = @HAS_XDM_AUTH_FALSE@ HAS_XDM_AUTH_TRUE = @HAS_XDM_AUTH_TRUE@ -HAVE_AM_SILENT_RULES_FALSE = @HAVE_AM_SILENT_RULES_FALSE@ -HAVE_AM_SILENT_RULES_TRUE = @HAVE_AM_SILENT_RULES_TRUE@ +HAVE_ARC4RANDOM = @HAVE_ARC4RANDOM@ +HAVE_ARC4RANDOM_FALSE = @HAVE_ARC4RANDOM_FALSE@ +HAVE_ARC4RANDOM_TRUE = @HAVE_ARC4RANDOM_TRUE@ HAVE_MKTEMP_COMMAND_FALSE = @HAVE_MKTEMP_COMMAND_FALSE@ HAVE_MKTEMP_COMMAND_TRUE = @HAVE_MKTEMP_COMMAND_TRUE@ +HAVE_SYSTEMD_FALSE = @HAVE_SYSTEMD_FALSE@ +HAVE_SYSTEMD_TRUE = @HAVE_SYSTEMD_TRUE@ +INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTALL_XDMSHELL_FALSE = @INSTALL_XDMSHELL_FALSE@ +INSTALL_XDMSHELL_TRUE = @INSTALL_XDMSHELL_TRUE@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -164,18 +167,24 @@ LINT = @LINT@ LINT_FALSE = @LINT_FALSE@ LINT_FLAGS = @LINT_FLAGS@ LINT_TRUE = @LINT_TRUE@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKTEMP_COMMAND = @MKTEMP_COMMAND@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -184,7 +193,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -RANDOMMANDEFS = @RANDOMMANDEFS@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -193,8 +201,13 @@ SERVERSTYPE = @SERVERSTYPE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_CMD = @SHELL_CMD@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ SU = @SU@ +SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ +SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ +USE_SYSTEMD_DAEMON_FALSE = @USE_SYSTEMD_DAEMON_FALSE@ +USE_SYSTEMD_DAEMON_TRUE = @USE_SYSTEMD_DAEMON_TRUE@ USE_XPM_FALSE = @USE_XPM_FALSE@ USE_XPM_TRUE = @USE_XPM_TRUE@ UTMP_FILE = @UTMP_FILE@ @@ -212,30 +225,28 @@ XDMSHELL_LIBS = @XDMSHELL_LIBS@ XDMXAUTHDIR = @XDMXAUTHDIR@ XDM_BWPIXMAP = @XDM_BWPIXMAP@ XDM_CFLAGS = @XDM_CFLAGS@ -XDM_LDFLAGS = @XDM_LDFLAGS@ XDM_LIBS = @XDM_LIBS@ XDM_PIXMAP = @XDM_PIXMAP@ XDM_PIXMAPDIR = @XDM_PIXMAPDIR@ -XDM_PRINT_CFLAGS = @XDM_PRINT_CFLAGS@ -XDM_PRINT_LIBS = @XDM_PRINT_LIBS@ +XDM_TOOLKIT_CFLAGS = @XDM_TOOLKIT_CFLAGS@ +XDM_TOOLKIT_LIBS = @XDM_TOOLKIT_LIBS@ XFT_CFLAGS = @XFT_CFLAGS@ XFT_LIBS = @XFT_LIBS@ XINERAMA_CFLAGS = @XINERAMA_CFLAGS@ XINERAMA_LIBS = @XINERAMA_LIBS@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ XPM_CFLAGS = @XPM_CFLAGS@ XPM_LIBS = @XPM_LIBS@ XRDB_PROGRAM = @XRDB_PROGRAM@ XT_CFLAGS = @XT_CFLAGS@ XT_LIBS = @XT_LIBS@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -250,7 +261,6 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ -distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -277,6 +287,7 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ SUFFIXES = .cpp WCHAR32_FLAGS = -DWCHAR32=@WCHAR32@ @@ -294,11 +305,6 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/^[ ]*XHASH/s/XHASH/\#/' \ -e '/\@\@$$/s/\@\@$$/\\/' - -# Support for automake 1.11 AM_SILENT_RULES -@HAVE_AM_SILENT_RULES_TRUE@cpp_verbose = $(cpp_verbose_$(V)) -@HAVE_AM_SILENT_RULES_TRUE@cpp_verbose_ = $(cpp_verbose_$(AM_DEFAULT_VERBOSITY)) -@HAVE_AM_SILENT_RULES_TRUE@cpp_verbose_0 = @echo " CPP " $@; xdmscriptdir = $(XDMSCRIPTDIR) xdmconfigdir = $(XDMCONFIGDIR) dist_xdmconfig_DATA = \ @@ -362,9 +368,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu config/Makefile + $(AUTOMAKE) --foreign config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -618,13 +624,13 @@ uninstall-am: uninstall-dist_pixmapDATA uninstall-dist_xdmconfigDATA \ .cpp: - $(cpp_verbose)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ Xservers: Xservers.$(SERVERSTYPE) ln -s Xservers.$(SERVERSTYPE) Xservers Xservers.ws: $(srcdir)/Xservers.ws.cpp - $(cpp_verbose)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.ws.cpp | $(CPP_SED_MAGIC) > $@ + $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.ws.cpp | $(CPP_SED_MAGIC) > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/app/xdm/config/Xaccess b/app/xdm/config/Xaccess index 998e906ce..c843888f1 100644 --- a/app/xdm/config/Xaccess +++ b/app/xdm/config/Xaccess @@ -34,7 +34,7 @@ # The fourth form is similar to the third, except instead of using the # broadcast address, it sends DirectQuerys to each of the hosts in the list # The fifth form tells xdm which addresses to listen for incoming connections -# on. If present, xdm will only listen for connections on the specified +# on. If present, xdm will only listen for connections on the specified # interfaces and/or multicast groups. # # In all cases, xdm uses the first entry which matches the terminal; @@ -84,7 +84,7 @@ # all unicast interfaces, but not for multicast packets. If any LISTEN lines # are specified, then only the listed interfaces will be listened on. # -# IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned +# IANA has assigned FF0X:0:0:0:0:0:0:12B as the permanently assigned # multicast addresses for XDMCP, where X in the prefix may be replaced # by any valid scope identifier, such as 1 for Node-Local, 2 for Link-Local, # 5 for Site-Local, and so on. The default is equivalent to the example shown diff --git a/app/xdm/config/Xresources.cpp b/app/xdm/config/Xresources.cpp index 3e1a1504e..aa3dac2b3 100644 --- a/app/xdm/config/Xresources.cpp +++ b/app/xdm/config/Xresources.cpp @@ -5,6 +5,7 @@ ! ! + #define BS \ /* cpp can be trickier than m4 */ #define NLBS \n\ /* don't remove these comments */ xlogin*login.translations: #override BS @@ -21,7 +22,7 @@ xlogin*login.translations: #override BS xlogin*greeting: Welcome to CLIENTHOST xlogin*namePrompt: \040\040\040\040\040\040\040Login: -xlogin*fail: Login incorrect +xlogin*fail: Login incorrect or forbidden by policy XHASHif WIDTH > 800 xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1 diff --git a/app/xdm/config/Xsession.cpp b/app/xdm/config/Xsession.cpp index b100a23be..5aae411ab 100644 --- a/app/xdm/config/Xsession.cpp +++ b/app/xdm/config/Xsession.cpp @@ -1,28 +1,49 @@ XCOMM!SHELL_CMD XCOMM -XCOMM $OpenBSD: Xsession.cpp,v 1.7 2011/03/19 15:40:02 matthieu Exp $ +XCOMM $OpenBSD: Xsession.cpp,v 1.8 2011/11/15 20:53:45 matthieu Exp $ XCOMM redirect errors to a file in user's home directory if we can -for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER" -do - case "$errfile" in - "/tmp/*" | "/var/tmp/*") - errfile=`mktemp ${errfile}.XXXXXXXXXX` || break; - ;; - esac - if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null ) - then - exec > "$errfile" 2>&1 - break - fi -done + +errfile="$HOME/.xsession-errors" +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)" + 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) id1=$HOME/.ssh/identity id2=$HOME/.ssh/id_dsa id3=$HOME/.ssh/id_rsa -id4=$HOME/.ssh/id_ecdsa -if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 -o -f $id4 ]; +if [ -x /usr/bin/ssh-agent ] && [ -f $id1 -o -f $id2 -o -f $id3 ]; then eval `ssh-agent -s` ssh-add < /dev/null @@ -46,7 +67,7 @@ case $# in esac esac -XCOMM The startup script is not intended to have arguments. +XCOMM The startup script is not intended to have arguments. startup=$HOME/.xsession resources=$HOME/.Xresources diff --git a/app/xdm/config/Xstartup.cpp b/app/xdm/config/Xstartup.cpp index 576e96b6b..1bc8dcc21 100644 --- a/app/xdm/config/Xstartup.cpp +++ b/app/xdm/config/Xstartup.cpp @@ -1,10 +1,10 @@ XCOMM!/bin/sh XCOMM -XCOMM $OpenBSD: Xstartup.cpp,v 1.4 2011/01/01 20:39:44 matthieu Exp $ +XCOMM $OpenBSD: Xstartup.cpp,v 1.5 2011/11/15 20:53:45 matthieu Exp $ XCOMM if [ -f /etc/nologin ]; then /usr/X11R6/bin/xmessage -file /etc/nologin -timeout 30 -center exit 1 fi -BINDIR/sessreg -a -w WTMP_FILE -u UTMP_FILE \ +exec BINDIR/sessreg -a -w WTMP_FILE -u UTMP_FILE \ -x XDMCONFIGDIR/Xservers -l $DISPLAY -h "" $USER diff --git a/app/xdm/config/xdm-config.cpp b/app/xdm/config/xdm-config.cpp index c8b1df7b7..26534e06a 100644 --- a/app/xdm/config/xdm-config.cpp +++ b/app/xdm/config/xdm-config.cpp @@ -1,4 +1,4 @@ -! $Xorg: xdm-conf.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $ +! $OpenBSD: xdm-config.cpp,v 1.4 2011/11/15 20:53:45 matthieu Exp $ ! ! ! @@ -17,7 +17,7 @@ DisplayManager.keyFile: XDMCONFIGDIR/xdm-keys DisplayManager.servers: XDMCONFIGDIR/Xservers DisplayManager.accessFile: XDMCONFIGDIR/Xaccess DisplayManager*resources: XDMCONFIGDIR/Xresources -DisplayManager.willing: SU nobody -c XDMSCRIPTDIR/Xwilling +DisplayManager.willing: SU nobody -s /bin/sh XDMSCRIPTDIR/Xwilling ! All displays should use authorization, but we cannot be sure ! X terminals may not be configured that way, so they will require ! individual resource settings. -- cgit v1.2.3