diff --git a/u_xdm-sig11-bug-598422.diff b/u_xdm-sig11-bug-598422.diff new file mode 100644 index 0000000..843d26b --- /dev/null +++ b/u_xdm-sig11-bug-598422.diff @@ -0,0 +1,99 @@ +Index: xdm-1.1.10/dm.h +=================================================================== +--- xdm-1.1.10.orig/dm.h ++++ xdm-1.1.10/dm.h +@@ -434,6 +434,7 @@ extern void DeleteXloginResources (struc + extern void LoadXloginResources (struct display *d); + extern void ManageSession (struct display *d); + extern void SecureDisplay (struct display *d, Display *dpy); ++extern void PamCloseSession(void); + extern void SessionExit (struct display *d, int status, int removeAuth); + extern void SessionPingFailed (struct display *d); + extern void SetupDisplay (struct display *d); +Index: xdm-1.1.10/session.c +=================================================================== +--- xdm-1.1.10.orig/session.c ++++ xdm-1.1.10/session.c +@@ -290,6 +290,8 @@ SessionPingFailed (struct display *d) + AbortClient (clientPid); + source (verify.systemEnviron, d->reset); + } ++ ++ PamCloseSession(); + SessionExit (d, RESERVER_DISPLAY, TRUE); + } + +@@ -417,6 +419,7 @@ ManageSession (struct display *d) + */ + Debug ("Source reset program %s\n", d->reset); + source (verify.systemEnviron, d->reset); ++ PamCloseSession(); + SessionExit (d, OBEYSESS_DISPLAY, TRUE); + } + +@@ -480,6 +483,7 @@ SecureDisplay (struct display *d, Displa + if (Setjmp (syncJump)) { + LogError ("WARNING: display %s could not be secured\n", + d->name); ++ PamCloseSession(); + SessionExit (d, RESERVER_DISPLAY, FALSE); + } + (void) alarm ((unsigned) d->grabTimeout); +@@ -491,6 +495,7 @@ SecureDisplay (struct display *d, Displa + (void) Signal (SIGALRM, SIG_DFL); + LogError ("WARNING: keyboard on display %s could not be secured\n", + d->name); ++ PamCloseSession(); + SessionExit (d, RESERVER_DISPLAY, FALSE); + } + Debug ("XGrabKeyboard succeeded %s\n", d->name); +@@ -515,8 +520,7 @@ UnsecureDisplay (struct display *d, Disp + } + + void +-SessionExit (struct display *d, int status, int removeAuth) +-{ ++PamCloseSession(void) { + #ifdef USE_PAM + pam_handle_t *pamh = thepamh(); + +@@ -527,7 +531,11 @@ SessionExit (struct display *d, int stat + pamh = NULL; + } + #endif ++} + ++void ++SessionExit (struct display *d, int status, int removeAuth) ++{ + /* make sure the server gets reset after the session is over */ + if (d->serverPid >= 2 && d->resetSignal) + kill (d->serverPid, d->resetSignal); +Index: xdm-1.1.10/greeter/greet.c +=================================================================== +--- xdm-1.1.10.orig/greeter/greet.c ++++ xdm-1.1.10/greeter/greet.c +@@ -582,6 +582,7 @@ greet_user_rtn GreetUser( + pam_done: + if (code != 0) + { ++ PamCloseSession(); + CloseGreet (d); + SessionExit (d, code, FALSE); + } +@@ -610,6 +611,7 @@ greet_user_rtn GreetUser( + code = Greet (d, greet); + if (code != 0) + { ++ PamCloseSession(); + CloseGreet (d); + SessionExit (d, code, FALSE); + } +@@ -632,6 +634,7 @@ greet_user_rtn GreetUser( + { + Debug ("Startup program %s exited with non-zero status\n", + d->startup); ++ PamCloseSession(); + SessionExit (d, OBEYSESS_DISPLAY, FALSE); + } + /* diff --git a/xdm.changes b/xdm.changes index 39342d7..b919e5a 100644 --- a/xdm.changes +++ b/xdm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 29 09:25:40 UTC 2013 - sndirsch@suse.com + +- u_xdm-sig11-bug-598422.diff + * fix Sig11 in xdm when pressing Ctr-c (bnc#598422, bnc#831870) + ------------------------------------------------------------------- Fri Jun 7 10:25:15 UTC 2013 - werner@suse.de diff --git a/xdm.spec b/xdm.spec index eecfdfd..194c463 100644 --- a/xdm.spec +++ b/xdm.spec @@ -48,6 +48,7 @@ Patch1: xdm-tolerant-hostname-changes.diff Patch2: U_xdm_config-AC_LIBTOOL_DLOPEN-is-required-for-dynamic-lin.patch Patch3: U_xdm_config-use-libtool-export-dynamic-option-for-reverse.patch Patch4: U_xdm_Fix-missing-linking-dependency-on-ldl.patch +Patch5: u_xdm-sig11-bug-598422.diff %if 0%{?suse_version} >= 01140 # Needed to create the man page symlink to init.d BuildRequires: aaa_base-extras @@ -95,6 +96,7 @@ cp %{SOURCE2} . %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # needed for patch0, patch2, patch3, patch4 autoreconf -fi