Index: xdm-1.1.10/configure.ac
===================================================================
---- xdm-1.1.10.orig/configure.ac
-+++ xdm-1.1.10/configure.ac
-@@ -434,6 +434,20 @@ fi
-
- AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes)
+diff -urNp -x '*.orig' xdm-1.1.12.org/configure.ac xdm-1.1.12/configure.ac
+--- xdm-1.1.12.org/configure.ac 2019-03-02 22:06:13.000000000 +0000
++++ xdm-1.1.12/configure.ac 2022-04-06 18:25:09.812244306 +0000
+@@ -429,6 +429,20 @@ AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdma
+ AC_SUBST(XDM_CFLAGS)
+ AC_SUBST(XDM_LIBS)
+# ConsoleKit support
+AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]),
+dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes)
+
#
- # XDM
+ # xdmshell
#
-Index: xdm-1.1.10/session.c
-===================================================================
---- xdm-1.1.10.orig/session.c
-+++ xdm-1.1.10/session.c
-@@ -67,6 +67,11 @@ extern int key_setnet(struct key_netstar
+diff -urNp -x '*.orig' xdm-1.1.12.org/include/dm.h xdm-1.1.12/include/dm.h
+--- xdm-1.1.12.org/include/dm.h 2019-03-02 22:06:13.000000000 +0000
++++ xdm-1.1.12/include/dm.h 2022-04-06 18:25:09.813244308 +0000
+@@ -327,6 +327,9 @@ extern char *randomFile;
+ extern char *prngdSocket;
+ extern int prngdPort;
+ # endif
++#ifdef USE_CONSOLEKIT
++extern int use_consolekit;
++#endif
+
+ extern char *greeterLib;
+ extern char *willing;
+diff -urNp -x '*.orig' xdm-1.1.12.org/man/xdm.man xdm-1.1.12/man/xdm.man
+--- xdm-1.1.12.org/man/xdm.man 2019-03-02 22:06:13.000000000 +0000
++++ xdm-1.1.12/man/xdm.man 2022-04-06 18:25:09.813244308 +0000
+@@ -48,6 +48,8 @@ xdm \- X Display Manager with support fo
+ ] [
+ .B \-session
+ .I session_program
++] [
++.B \-noconsolekit
+ ]
+ .SH DESCRIPTION
+ .I Xdm
+@@ -215,6 +217,10 @@ indicates the program to run as the sess
+ .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 -urNp -x '*.orig' xdm-1.1.12.org/xdm/resource.c xdm-1.1.12/xdm/resource.c
+--- xdm-1.1.12.org/xdm/resource.c 2019-03-02 22:06:13.000000000 +0000
++++ xdm-1.1.12/xdm/resource.c 2022-04-06 18:25:09.813244308 +0000
+@@ -65,6 +65,9 @@ char *randomDevice;
+ char *prngdSocket;
+ int prngdPort;
+ #endif
++#ifdef USE_CONSOLEKIT
++int use_consolekit;
++#endif
+
+ char *greeterLib;
+ char *willing;
+@@ -192,6 +195,10 @@ struct dmResources {
+ "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])
+@@ -377,7 +384,11 @@ XrmOptionDescRec optionTable [] = {
+ {"-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;
+diff -urNp -x '*.orig' xdm-1.1.12.org/xdm/session.c xdm-1.1.12/xdm/session.c
+--- xdm-1.1.12.org/xdm/session.c 2019-03-02 22:06:13.000000000 +0000
++++ xdm-1.1.12/xdm/session.c 2022-04-06 18:25:09.812244306 +0000
+@@ -73,6 +73,11 @@ extern int key_setnet(struct key_netstar
# endif
#endif /* USE_PAM */
+#include <dbus/dbus.h>
+#endif
+
- #ifdef __SCO__
- # include <prot.h>
- #endif
-@@ -514,6 +519,97 @@ UnsecureDisplay (struct display *d, Disp
+ #ifdef USE_SELINUX
+ #include <selinux/selinux.h>
+ #include <selinux/get_context_list.h>
+@@ -523,6 +528,97 @@ UnsecureDisplay (struct display *d, Disp
}
}
void
SessionExit (struct display *d, int status, int removeAuth)
{
-@@ -528,6 +624,8 @@ SessionExit (struct display *d, int stat
+@@ -537,6 +633,8 @@ SessionExit (struct display *d, int stat
}
#endif
/* make sure the server gets reset after the session is over */
if (d->serverPid >= 2 && d->resetSignal)
kill (d->serverPid, d->resetSignal);
-@@ -610,6 +708,10 @@ StartClient (
+@@ -614,6 +712,10 @@ StartClient (
#ifdef USE_PAM
if (pamh) pam_open_session(pamh, 0);
#endif
switch (pid = fork ()) {
case 0:
CleanUpChild ();
-Index: xdm-1.1.10/dm.h
-===================================================================
---- xdm-1.1.10.orig/dm.h
-+++ xdm-1.1.10/dm.h
-@@ -323,6 +323,9 @@ extern char *randomFile;
- extern char *prngdSocket;
- extern int prngdPort;
- # endif
-+#ifdef USE_CONSOLEKIT
-+extern int use_consolekit;
-+#endif
-
- extern char *greeterLib;
- extern char *willing;
-Index: xdm-1.1.10/resource.c
-===================================================================
---- xdm-1.1.10.orig/resource.c
-+++ xdm-1.1.10/resource.c
-@@ -65,6 +65,9 @@ char *randomDevice;
- char *prngdSocket;
- int prngdPort;
- #endif
-+#ifdef USE_CONSOLEKIT
-+int use_consolekit;
-+#endif
-
- char *greeterLib;
- char *willing;
-@@ -196,6 +199,10 @@ struct dmResources {
- "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])
-@@ -378,7 +385,11 @@ XrmOptionDescRec optionTable [] = {
- {"-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;
-Index: xdm-1.1.10/xdm.man.cpp
-===================================================================
---- xdm-1.1.10.orig/xdm.man.cpp
-+++ xdm-1.1.10/xdm.man.cpp
-@@ -48,6 +48,8 @@ xdm \- X Display Manager with support fo
- ] [
- .B \-session
- .I session_program
-+] [
-+.B \-noconsolekit
- ]
- .SH DESCRIPTION
- .I Xdm
-@@ -215,6 +217,10 @@ indicates the program to run as the sess
- .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