diff options
Diffstat (limited to 'x11-apps/xdm')
-rw-r--r-- | x11-apps/xdm/Manifest | 10 | ||||
-rw-r--r-- | x11-apps/xdm/files/Xsession | 73 | ||||
-rw-r--r-- | x11-apps/xdm/files/xdm-1.1.11-arc4random-include.patch | 18 | ||||
-rw-r--r-- | x11-apps/xdm/files/xdm-1.1.11-cve-2013-2179.patch | 41 | ||||
-rw-r--r-- | x11-apps/xdm/files/xdm-1.1.11-setproctitle-include.patch | 37 | ||||
-rw-r--r-- | x11-apps/xdm/files/xdm-consolekit.patch | 230 | ||||
-rw-r--r-- | x11-apps/xdm/metadata.xml | 12 | ||||
-rw-r--r-- | x11-apps/xdm/xdm-1.1.11-r3.ebuild | 78 |
8 files changed, 499 insertions, 0 deletions
diff --git a/x11-apps/xdm/Manifest b/x11-apps/xdm/Manifest new file mode 100644 index 000000000000..07752820b529 --- /dev/null +++ b/x11-apps/xdm/Manifest @@ -0,0 +1,10 @@ +AUX Xsession 1521 SHA256 8a09cd1cef9ebce190e13009e8b21a8504eac1cec3fc31a10d3740b6c7aa49b6 SHA512 6cb72d93ab8004e42e9f5002f7f8bb6eb7d9833fd7d3fb0acf7b7b481ead5fb55cb1b836a1e6010fe859e9e04e14064c442e23fdde5991ffb8556ed5aa5af555 WHIRLPOOL 079887cd7f29fe11e3306da145d4279e99d93c131850a03d49c35befd6d001d8c69a53b9b528a7808ff5913f8787adc90d6fb0f041234462d8f6204a9be0d127 +AUX xdm-1.1.11-arc4random-include.patch 360 SHA256 01a1d04642b04e75ffc6d2433200a3dbe3970b853ab1fbea19add6fa59f3adae SHA512 2da1c4972c7edcd6c3fc42f29c15ce875888cc582a18e1932a60c3d0881a5a96991129bf5bb8c6649f0731e2102c0a163928c089d7ff9fe19ef82d470f86882f WHIRLPOOL d6b41c6f64ba1a7de3725c4737331d419a3eddeeb325c9e13f540443f5c178f08eed73f685b0714e64914ba416a3d3b44a864d207cf3d991500ee6e757b55980 +AUX xdm-1.1.11-cve-2013-2179.patch 1519 SHA256 92307af6fe30116f520798425a7356c8690e837430a5d1b4674243ac16cad6cd SHA512 5890051b134f1ed8f68846ee47d38375fbd0b4c639b9ae834b27d5b1749456aba4e1000a16a16d387072845887685375b1d87c4ce3870cc2acda58c4f17d45ae WHIRLPOOL fdc7a9e75afe5690f3b37e94385afe780185363e7923a5b5fba66a9f272146bc82a690a0b853d10ec614168791a69dded862518d879546ebc9582a7a14efd1be +AUX xdm-1.1.11-setproctitle-include.patch 849 SHA256 d00a803b87bdc4e84a17d2f9a3e4f147355cc0eb9bc71a860f2396fd1c642b34 SHA512 496ad42ee35ce6d25f87b349330394f65cc8979b388759d7e03636f96bc2272068a999a9f7ac3b2e0486099b7678ef1c0e30505c3e0a08cc3041121936f1abb0 WHIRLPOOL d206fc35eb18458f17aaad9938994a157adfd92f5357ef74e00003bdef9edcd7aa135fa1bd5b7b36dfeb9d0b56ea4b169ec5280c37c180538a01568840f57835 +AUX xdm-consolekit.patch 5712 SHA256 902bf08f10244325897bc410e7fb81178e47dcae9d96c115992ece860c1b211d SHA512 d87ec56e4b7d067709679f222d3bd9009f1496d66c3c4335458b54e2a468200e3c7ac99843330c23bad7049995c93e8f3c74f3161529c6fb488e94e9fcd4752a WHIRLPOOL 89d80047bf95de606a0fd87cb6ce26b6aad755c8ea1e83db7adf0d3751e655be271ae4db5dd2097226e79359a3d85e7b485d4bedcf5bf800c2add4552429ec23 +DIST xdm-1.1.11.tar.bz2 446612 SHA256 d4da426ddea0124279a3f2e00a26db61944690628ee818a64df9d27352081c47 SHA512 fe6f2b7817c0f7f07a1f5f497edcdfa15b93986fd87f314daa472dac8625327ef46ebbf40d27fe8d4a8a2f8d5af8a01c4438a29356740e0eb350f2bd0c7ec0d5 WHIRLPOOL e505cfc5615d93ce8911f30b10b99698b38fa71dd468770616b95d34a0da2212f080f12a1457c715fc58beea56f4d9adc2f41dd63e3bf431b8d85182f0c250d8 +EBUILD xdm-1.1.11-r3.ebuild 1829 SHA256 39e7b8a0ad8ed0c9ef5ca5996028277ff4187f98a298338d5e159c54815d7557 SHA512 c8b901047ff6c1c999281ea565790ea81086b6681c46fbfdf1e4dc2e1f84faf3b4649f4e6054e31b6fb644eb0ac746914103868085ad15c587b3fdc0c4b44f09 WHIRLPOOL cf4532fe5d1c211775fdf55e5da3e49a9d68b4615bc40debb1c1f77d823a28c5978d23bfd0a37dcab3879cb268b1ee46de8e76effdceb36a41b63c5d36572bc7 +MISC ChangeLog 3248 SHA256 0c495c0c049d86198b8923be7f18f6089d4dd7ba7c758767ed0380779fdfc779 SHA512 de707cde9aeb847b4e819cf95bef188ce9eae74c5999044f9a518913f4533017cfa912115568e851624df6f915f72c8418523bd40b33dd0b5ea7d097b15666ce WHIRLPOOL 2903430140282f3d47becbf465900bfc0217696327ebfc2443e123dd83a80db768435ac08bb8ea53eaed286573014e7af7be93e4601d1c928fa1f68d9dd7329c +MISC ChangeLog-2015 22628 SHA256 1b8c497a067c8a7e4b04a43de9bf72dceac11c9762401357ab98b2bda82c10ce SHA512 7eccd0322620b071d28e2c8d40fc69f4ceebeaf2e4f9d20243dcd8174e73ab1351e9866de08c8c5d7ed94ced40d4fd730a37e2bb84cb1f446946af51557c2f6f WHIRLPOOL 5a93e11de5afdb594e2bf88c9a20de5fe6673e7bc285edbf621bfa93442471673c89f73a4a9a61f7e00d75ae8dfcbac1cb0d09041e9fbf391f307c2381c49a61 +MISC metadata.xml 414 SHA256 9a7f96b96e6c7e681b90986933fbe2de6ca02d20ab701d72aa6b779b57d78389 SHA512 f3acd7a9e8f8e1d93ca5c657409efbaeb5695dc81528926d9ecdc517cff8a7c2f597b9ac8b856cb81246ff39c2ceaac5bd72587db68a5d260c3117599e24c38c WHIRLPOOL ac17b35b0fe3b09840c934ddbe69945ab953ca648d89978c3811f0ceb599c007bd46644538801c44ad7c04cae67dbd3b43b2735938f5d69933e9fca5fd521caf diff --git a/x11-apps/xdm/files/Xsession b/x11-apps/xdm/files/Xsession new file mode 100644 index 000000000000..ffeef4c87420 --- /dev/null +++ b/x11-apps/xdm/files/Xsession @@ -0,0 +1,73 @@ +#!/bin/bash --login +# +# $Xorg: Xsession,v 1.4 2000/08/17 19:54:17 cpqbld Exp $ +# +# +# +# +# $XFree86: xc/programs/xdm/config/Xsession,v 1.3 2001/01/17 23:45:24 dawes Exp $ + +# 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 + if ( cp /dev/null "$errfile" 2> /dev/null ) + then + chmod 600 "$errfile" + exec > "$errfile" 2>&1 + break + fi +done + +# handle KDM +if [ -n "$1" ]; then + export XSESSION="$1" +fi + +xinitdir=/usr/X11R6/lib/X11/xinit +startup=$HOME/.xsession +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=$xinitdir/.Xresources +sysmodmap=$xinitdir/.Xmodmap + +# First run the system default. Because KDE uses this +# to switch sessions, we MUST first check the system +# default, and then ~/.xsession. If the user Do not +# want this, he should override XSESSION, or at least +# clear it. +if [ -n "`/etc/X11/chooser.sh`" ]; then + exec "`/etc/X11/chooser.sh`" +# If not defined, try the user's ~/.xsession +elif [ -s "$startup" ]; then + + # merge in defaults and keymaps + + if [ -f $sysresources ]; then + xrdb -merge $sysresources + fi + + if [ -f $sysmodmap ]; then + xmodmap $sysmodmap + fi + + if [ -f $userresources ]; then + xrdb -merge $userresources + fi + + if [ -f $usermodmap ]; then + xmodmap $usermodmap + fi + + if [ -x "$startup" ]; then + exec "$startup" + else + exec /bin/sh "$startup" + fi +# Lastly, xsm as failsafe +else + if [ -r "$userresources" ]; then + xrdb -load "$userresources" + fi + exec xsm +fi + diff --git a/x11-apps/xdm/files/xdm-1.1.11-arc4random-include.patch b/x11-apps/xdm/files/xdm-1.1.11-arc4random-include.patch new file mode 100644 index 000000000000..db948094b755 --- /dev/null +++ b/x11-apps/xdm/files/xdm-1.1.11-arc4random-include.patch @@ -0,0 +1,18 @@ +diff -ur a/xdm/genauth.c b/xdm/genauth.c +--- a/xdm/genauth.c 2011-09-25 09:35:47.000000000 +0200 ++++ b/xdm/genauth.c 2014-01-06 16:28:09.664060603 +0100 +@@ -40,6 +40,14 @@ + + #include <errno.h> + ++#ifdef HAVE_ARC4RANDOM ++# ifdef __linux__ ++# include <bsd/stdlib.h> ++# else ++# include <stdlib.h> ++# endif ++#endif ++ + #include <time.h> + #define Time_t time_t + diff --git a/x11-apps/xdm/files/xdm-1.1.11-cve-2013-2179.patch b/x11-apps/xdm/files/xdm-1.1.11-cve-2013-2179.patch new file mode 100644 index 000000000000..34ae7ceb3cd6 --- /dev/null +++ b/x11-apps/xdm/files/xdm-1.1.11-cve-2013-2179.patch @@ -0,0 +1,41 @@ +From 8d1eb5c74413e4c9a21f689fc106949b121c0117 Mon Sep 17 00:00:00 2001 +From: mancha <mancha1@hush.com> +Date: Wed, 22 May 2013 14:20:26 +0000 +Subject: Handle NULL returns from glibc 2.17+ crypt(). + +Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL +(w/ NULL return) if the salt violates specifications. Additionally, +on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords +passed to crypt() fail with EPERM (w/ NULL return). + +If using glibc's crypt(), check return value to avoid a possible +NULL pointer dereference. + +Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> +Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> +--- +diff --git a/greeter/verify.c b/greeter/verify.c +index db3cb7d..b009e2b 100644 +--- a/greeter/verify.c ++++ b/greeter/verify.c +@@ -329,6 +329,7 @@ Verify (struct display *d, struct greet_info *greet, struct verify_info *verify) + struct spwd *sp; + # endif + char *user_pass = NULL; ++ char *crypted_pass = NULL; + # endif + # ifdef __OpenBSD__ + char *s; +@@ -464,7 +465,9 @@ Verify (struct display *d, struct greet_info *greet, struct verify_info *verify) + # if defined(ultrix) || defined(__ultrix__) + if (authenticate_user(p, greet->password, NULL) < 0) + # else +- if (strcmp (crypt (greet->password, user_pass), user_pass)) ++ crypted_pass = crypt (greet->password, user_pass); ++ if ((crypted_pass == NULL) ++ || (strcmp (crypted_pass, user_pass))) + # endif + { + if(!greet->allow_null_passwd || strlen(p->pw_passwd) > 0) { +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-apps/xdm/files/xdm-1.1.11-setproctitle-include.patch b/x11-apps/xdm/files/xdm-1.1.11-setproctitle-include.patch new file mode 100644 index 000000000000..0a3f32bbea02 --- /dev/null +++ b/x11-apps/xdm/files/xdm-1.1.11-setproctitle-include.patch @@ -0,0 +1,37 @@ +diff -ur a/xdm/choose.c b/xdm/choose.c +--- a/xdm/choose.c 2011-09-25 09:35:47.000000000 +0200 ++++ b/xdm/choose.c 2014-01-06 16:33:09.628065364 +0100 +@@ -54,6 +54,14 @@ + # include <tiuser.h> + # endif + ++# ifdef HAVE_SETPROCTITLE ++# ifdef __linux__ ++# include <bsd/unistd.h> ++# else ++# include <unistd.h> ++# endif ++# endif ++ + # include <time.h> + # define Time_t time_t + +diff -ur a/xdm/session.c b/xdm/session.c +--- a/xdm/session.c 2011-09-25 09:35:47.000000000 +0200 ++++ b/xdm/session.c 2014-01-06 16:40:57.508072789 +0100 +@@ -54,6 +54,15 @@ + # include <usersec.h> + #endif + ++# ifdef HAVE_SETPROCTITLE ++# include <sys/types.h> ++# ifdef __linux__ ++# include <bsd/unistd.h> ++# else ++# include <unistd.h> ++# endif ++# endif ++ + #ifndef USE_PAM /* PAM modules should handle these */ + # ifdef SECURE_RPC + # include <rpc/rpc.h> diff --git a/x11-apps/xdm/files/xdm-consolekit.patch b/x11-apps/xdm/files/xdm-consolekit.patch new file mode 100644 index 000000000000..fbacd36fc073 --- /dev/null +++ b/x11-apps/xdm/files/xdm-consolekit.patch @@ -0,0 +1,230 @@ +http://bugs.gentoo.org/360987 +http://projects.archlinux.org/svntogit/packages.git/plain/trunk/xdm-consolekit.patch?h=packages/xorg-xdm +http://lists.x.org/archives/xorg-devel/2011-February/019615.html +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615020 + +--- a/configure.ac ++++ b/configure.ac +@@ -362,6 +362,20 @@ + + AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes) + ++# ConsoleKit support ++AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]), ++ [USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes]) ++if test x"$USE_CONSOLEKIT" != xno; then ++ PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector, ++ [USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no]) ++ if test x"$USE_CONSOLEKIT" = xyes; then ++ AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit]) ++ XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS -DUSE_CONSOLEKIT" ++ XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS" ++ fi ++fi ++dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes) ++ + # + # XDM + # +--- a/xdm/session.c ++++ b/xdm/session.c +@@ -66,6 +66,11 @@ + #endif + #endif /* USE_PAM */ + ++#ifdef USE_CONSOLEKIT ++#include <ck-connector.h> ++#include <dbus/dbus.h> ++#endif ++ + #ifdef __SCO__ + #include <prot.h> + #endif +@@ -472,6 +477,97 @@ + } + } + ++#ifdef USE_CONSOLEKIT ++ ++static CkConnector *connector; ++ ++static int openCKSession(struct verify_info *verify, struct display *d) ++{ ++ int ret; ++ DBusError error; ++ char *remote_host_name = ""; ++ dbus_bool_t is_local; ++ char *display_name = ""; ++ char *display_device = ""; ++ char devtmp[16]; ++ ++ if (!use_consolekit) ++ return 1; ++ ++ is_local = d->displayType.location == Local; ++ if (d->peerlen > 0 && d->peer) ++ remote_host_name = d->peer; ++ if (d->name) ++ display_name = d->name; ++ /* how can we get the corresponding tty at best...? */ ++ if (d->windowPath) { ++ display_device = strchr(d->windowPath, ':'); ++ if (display_device && display_device[1]) ++ display_device++; ++ else ++ display_device = d->windowPath; ++ snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device); ++ display_device = devtmp; ++ } ++ ++ connector = ck_connector_new(); ++ if (!connector) { ++ LogOutOfMem("ck_connector"); ++ return 0; ++ } ++ ++ dbus_error_init(&error); ++ ret = ck_connector_open_session_with_parameters( ++ connector, &error, ++ "unix-user", &verify->uid, ++ "x11-display", &display_name, ++ "x11-display-device", &display_device, ++ "remote-host-name", &remote_host_name, ++ "is-local", &is_local, ++ NULL); ++ if (!ret) { ++ if (dbus_error_is_set(&error)) { ++ LogError("Dbus error: %s\n", error.message); ++ dbus_error_free(&error); ++ } else { ++ LogError("ConsoleKit error\n"); ++ } ++ LogError("console-kit-daemon not running?\n"); ++ ck_connector_unref(connector); ++ connector = NULL; ++ return 0; ++ } ++ ++ verify->userEnviron = setEnv(verify->userEnviron, ++ "XDG_SESSION_COOKIE", ck_connector_get_cookie(connector)); ++ return 1; ++} ++ ++static void closeCKSession(void) ++{ ++ DBusError error; ++ ++ if (!connector) ++ return; ++ ++ dbus_error_init(&error); ++ if (!ck_connector_close_session(connector, &error)) { ++ if (dbus_error_is_set(&error)) { ++ LogError("Dbus error: %s\n", error.message); ++ dbus_error_free(&error); ++ } else { ++ LogError("ConsoleKit close error\n"); ++ } ++ LogError("console-kit-daemon not running?\n"); ++ } ++ ck_connector_unref(connector); ++ connector = NULL; ++} ++#else ++#define openCKSession(v,d) 1 ++#define closeCKSession() ++#endif ++ + void + SessionExit (struct display *d, int status, int removeAuth) + { +@@ -486,6 +580,8 @@ + } + #endif + ++ closeCKSession(); ++ + /* make sure the server gets reset after the session is over */ + if (d->serverPid >= 2 && d->resetSignal) + kill (d->serverPid, d->resetSignal); +@@ -568,6 +664,10 @@ + #ifdef USE_PAM + if (pamh) pam_open_session(pamh, 0); + #endif ++ ++ if (!openCKSession(verify, d)) ++ return 0; ++ + switch (pid = fork ()) { + case 0: + CleanUpChild (); +--- a/include/dm.h ++++ b/include/dm.h +@@ -325,6 +325,9 @@ + extern char *prngdSocket; + extern int prngdPort; + # endif ++#ifdef USE_CONSOLEKIT ++extern int use_consolekit; ++#endif + + extern char *greeterLib; + extern char *willing; +--- a/xdm/resource.c ++++ b/xdm/resource.c +@@ -68,6 +68,9 @@ + char *prngdSocket; + int prngdPort; + #endif ++#ifdef USE_CONSOLEKIT ++int use_consolekit; ++#endif + + char *greeterLib; + char *willing; +@@ -258,6 +261,10 @@ + "false"} , + { "willing", "Willing", DM_STRING, &willing, + ""} , ++#ifdef USE_CONSOLEKIT ++{ "consoleKit", "ConsoleKit", DM_BOOL, (char **) &use_consolekit, ++ "true"} , ++#endif + }; + + # define NUM_DM_RESOURCES (sizeof DmResources / sizeof DmResources[0]) +@@ -440,7 +447,11 @@ + {"-debug", "*debugLevel", XrmoptionSepArg, (caddr_t) NULL }, + {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL }, + {"-daemon", ".daemonMode", XrmoptionNoArg, "true" }, +-{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" } ++{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" }, ++#ifdef USE_CONSOLEKIT ++{"-consolekit", ".consoleKit", XrmoptionNoArg, "true" }, ++{"-noconsolekit", ".consoleKit", XrmoptionNoArg, "false" } ++#endif + }; + + static int originalArgc; +--- a/man/xdm.man ++++ b/man/xdm.man +@@ -51,6 +51,8 @@ + ] [ + .B \-session + .I session_program ++] [ ++.B \-noconsolekit + ] + .SH DESCRIPTION + .I Xdm +@@ -218,6 +220,10 @@ + .IP "\fB\-xrm\fP \fIresource_specification\fP" + Allows an arbitrary resource to be specified, as in most + X Toolkit applications. ++.IP "\fB\-noconsolekit\fP" ++Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP ++resource. ++This suppresses the session management using ConsoleKit. + .SH RESOURCES + At many stages the actions of + .I xdm diff --git a/x11-apps/xdm/metadata.xml b/x11-apps/xdm/metadata.xml new file mode 100644 index 000000000000..27b78ed8a148 --- /dev/null +++ b/x11-apps/xdm/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>x11@gentoo.org</email> + <name>X11</name> + </maintainer> + <use> + <flag name="consolekit">Enable native <pkg>sys-auth/consolekit</pkg> support</flag> + <flag name="xdm-auth">Enable XDM-AUTHENTICATION-1 support</flag> + </use> +</pkgmetadata> diff --git a/x11-apps/xdm/xdm-1.1.11-r3.ebuild b/x11-apps/xdm/xdm-1.1.11-r3.ebuild new file mode 100644 index 000000000000..4233aea63111 --- /dev/null +++ b/x11-apps/xdm/xdm-1.1.11-r3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_EAUTORECONF=yes + +inherit multilib xorg-2 pam systemd + +DEFAULTVT=vt7 + +DESCRIPTION="X.Org xdm application" + +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd" +IUSE="consolekit ipv6 pam xdm-auth" + +RDEPEND="x11-apps/xrdb + x11-libs/libXdmcp + x11-libs/libXaw + >=x11-apps/xinit-1.0.2-r3 + x11-libs/libXinerama + x11-libs/libXmu + x11-libs/libX11 + x11-libs/libXt + x11-apps/sessreg + x11-apps/xconsole + consolekit? ( sys-auth/consolekit ) + pam? ( virtual/pam ) + !<sys-apps/systemd-187" +DEPEND="${RDEPEND} + consolekit? ( !=sys-auth/pambase-20101024-r1 ) + x11-proto/xineramaproto + x11-proto/xproto" + +pkg_setup() { + PATCHES=( + "${FILESDIR}"/${PN}-consolekit.patch + "${FILESDIR}"/${P}-cve-2013-2179.patch + "${FILESDIR}"/${PN}-1.1.11-arc4random-include.patch + "${FILESDIR}"/${PN}-1.1.11-setproctitle-include.patch + ) + + XORG_CONFIGURE_OPTIONS=( + $(use_enable ipv6) + $(use_with pam) + "$(systemd_with_unitdir)" + --with-default-vt=${DEFAULTVT} + --with-xdmconfigdir=/etc/X11/xdm + $(use_with consolekit) + ) +} + +src_prepare() { + # fedora invented that in -187... + sed -i -e 's:^Alias=.*$:Alias=display-manager.service:' \ + xdm.service.in || die + + # disable XDM-AUTHENTICATION-1 wrt bug #445662. + # it causes issue with libreoffice and SDL games (bug #306223). + if use !xdm-auth; then + sed -i -e '/authorize/a\ +DisplayManager*authName: MIT-MAGIC-COOKIE-1' \ + config/xdm-config.cpp || die + fi + xorg-2_src_prepare +} + +src_install() { + xorg-2_src_install + + exeinto /usr/$(get_libdir)/X11/xdm + doexe "${FILESDIR}"/Xsession + + use pam && pamd_mimic system-local-login xdm auth account session + + # Keep /var/lib/xdm. This is where authfiles are stored. See #286350. + keepdir /var/lib/xdm +} |