diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2010-03-28 03:25:25 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2010-03-28 03:25:25 +0000 |
commit | 110a814f521f844c7fc013737d4124472927fc7a (patch) | |
tree | 4384fb87de232832b0da0454bd1921858bfa7706 /x11-misc/slim/files | |
parent | Version bump, small bug fixes and fix for bug 309685 (diff) | |
download | historical-110a814f521f844c7fc013737d4124472927fc7a.tar.gz historical-110a814f521f844c7fc013737d4124472927fc7a.tar.bz2 historical-110a814f521f844c7fc013737d4124472927fc7a.zip |
New trunk snapshot as prepared by Doktor Notor in bug 306961. Fixes/closes bugs 261713, 270345, 297655 including security bug
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'x11-misc/slim/files')
3 files changed, 261 insertions, 0 deletions
diff --git a/x11-misc/slim/files/14509-fix-keyboard-in-tty-from-which-slim-is-lauched.patch b/x11-misc/slim/files/14509-fix-keyboard-in-tty-from-which-slim-is-lauched.patch new file mode 100644 index 000000000000..c9d8d0a5aed1 --- /dev/null +++ b/x11-misc/slim/files/14509-fix-keyboard-in-tty-from-which-slim-is-lauched.patch @@ -0,0 +1,29 @@ +--- app.cpp.orig 2009-01-13 11:30:36.000000000 +0900 ++++ app.cpp 2009-01-13 11:32:27.000000000 +0900 +@@ -270,21 +270,22 @@ + signal(SIGALRM, AlarmSignal); + + #ifndef XNEST_DEBUG +- OpenLog(); +- + if (!force_nodaemon && cfg->getOption("daemon") == "yes") { + daemonmode = true; + } + + // Daemonize + if (daemonmode) { +- if (daemon(0, 1) == -1) { ++ if (daemon(0, 0) == -1) { + cerr << APPNAME << ": " << strerror(errno) << endl; + exit(ERR_EXIT); + } +- UpdatePid(); + } + ++ OpenLog(); ++ ++ if (daemonmode) UpdatePid(); ++ + CreateServerAuth(); + StartServer(); + alarm(2); diff --git a/x11-misc/slim/files/15287-fix-pam-authentication-with-pam_unix2.patch b/x11-misc/slim/files/15287-fix-pam-authentication-with-pam_unix2.patch new file mode 100644 index 000000000000..2163d20a5e32 --- /dev/null +++ b/x11-misc/slim/files/15287-fix-pam-authentication-with-pam_unix2.patch @@ -0,0 +1,89 @@ +diff -rc slim-1.3.1-orig/app.cpp slim-1.3.1/app.cpp +*** slim-1.3.1-orig/app.cpp 2008-09-26 02:54:15.000000000 +0200 +--- slim-1.3.1/app.cpp 2009-02-17 19:50:06.000000000 +0100 +*************** +*** 41,48 **** + Panel* panel = *static_cast<Panel**>(appdata_ptr); + int result = PAM_SUCCESS; + for (int i=0; i<num_msg; i++){ +! resp[i]->resp=0; +! resp[i]->resp_retcode=0; + switch(msg[i]->msg_style){ + case PAM_PROMPT_ECHO_ON: + // We assume PAM is asking for the username +--- 41,48 ---- + Panel* panel = *static_cast<Panel**>(appdata_ptr); + int result = PAM_SUCCESS; + for (int i=0; i<num_msg; i++){ +! (*resp)[i].resp=0; +! (*resp)[i].resp_retcode=0; + switch(msg[i]->msg_style){ + case PAM_PROMPT_ECHO_ON: + // We assume PAM is asking for the username +*************** +*** 51,63 **** + case Panel::Suspend: + case Panel::Halt: + case Panel::Reboot: +! resp[i]->resp=strdup("root"); + break; + + case Panel::Console: + case Panel::Exit: + case Panel::Login: +! resp[i]->resp=strdup(panel->GetName().c_str()); + break; + } + break; +--- 51,63 ---- + case Panel::Suspend: + case Panel::Halt: + case Panel::Reboot: +! (*resp)[i].resp=strdup("root"); + break; + + case Panel::Console: + case Panel::Exit: + case Panel::Login: +! (*resp)[i].resp=strdup(panel->GetName().c_str()); + break; + } + break; +*************** +*** 73,79 **** + + default: + panel->EventHandler(Panel::Get_Passwd); +! resp[i]->resp=strdup(panel->GetPasswd().c_str()); + break; + } + break; +--- 73,79 ---- + + default: + panel->EventHandler(Panel::Get_Passwd); +! (*resp)[i].resp=strdup(panel->GetPasswd().c_str()); + break; + } + break; +*************** +*** 89,97 **** + } + if (result!=PAM_SUCCESS){ + for (int i=0; i<num_msg; i++){ +! if (resp[i]->resp==0) continue; +! free(resp[i]->resp); +! resp[i]->resp=0; + }; + free(*resp); + *resp=0; +--- 89,97 ---- + } + if (result!=PAM_SUCCESS){ + for (int i=0; i<num_msg; i++){ +! if ((*resp)[i].resp==0) continue; +! free((*resp)[i].resp); +! (*resp)[i].resp=0; + }; + free(*resp); + *resp=0; diff --git a/x11-misc/slim/files/261713-restart-xserver-if-killed.patch b/x11-misc/slim/files/261713-restart-xserver-if-killed.patch new file mode 100644 index 000000000000..2ea774b81eac --- /dev/null +++ b/x11-misc/slim/files/261713-restart-xserver-if-killed.patch @@ -0,0 +1,143 @@ +Index: trunk/app.h +=================================================================== +--- trunk/app.h (revision 151) ++++ trunk/app.h (working copy) +@@ -34,6 +34,7 @@ + ~App(); + void Run(); + int GetServerPID(); ++ void RestartServer(); + void StopServer(); + + // Lock functions +@@ -48,7 +49,6 @@ + void Console(); + void Exit(); + void KillAllClients(Bool top); +- void RestartServer(); + void ReadConfig(); + void OpenLog(); + void CloseLog(); +Index: trunk/app.cpp +=================================================================== +--- trunk/app.cpp (revision 151) ++++ trunk/app.cpp (working copy) +@@ -100,6 +100,11 @@ + + extern App* LoginApp; + ++int xioerror(Display *disp) { ++ LoginApp->RestartServer(); ++ return 0; ++} ++ + void CatchSignal(int sig) { + cerr << APPNAME << ": unexpected signal " << sig << endl; + LoginApp->StopServer(); +@@ -107,19 +112,6 @@ + exit(ERR_EXIT); + } + +- +-void AlarmSignal(int sig) { +- int pid = LoginApp->GetServerPID(); +- if(waitpid(pid, NULL, WNOHANG) == pid) { +- LoginApp->StopServer(); +- LoginApp->RemoveLock(); +- exit(OK_EXIT); +- } +- signal(sig, AlarmSignal); +- alarm(2); +-} +- +- + void User1Signal(int sig) { + signal(sig, User1Signal); + } +@@ -257,7 +249,6 @@ + signal(SIGHUP, CatchSignal); + signal(SIGPIPE, CatchSignal); + signal(SIGUSR1, User1Signal); +- signal(SIGALRM, AlarmSignal); + + #ifndef XNEST_DEBUG + OpenLog(); +@@ -277,7 +268,6 @@ + + CreateServerAuth(); + StartServer(); +- alarm(2); + #endif + + } +@@ -575,6 +565,8 @@ + int status; + while (wpid != pid) { + wpid = wait(&status); ++ if (wpid == ServerPID) ++ xioerror(Dpy); // Server died, simulate IO error + } + if (WIFEXITED(status) && WEXITSTATUS(status)) { + LoginPanel->Message("Failed to execute login command"); +@@ -620,9 +612,6 @@ + + + void App::Reboot() { +- // Stop alarm clock +- alarm(0); +- + #ifdef USE_PAM + try{ + pam.end(); +@@ -645,9 +634,6 @@ + + + void App::Halt() { +- // Stop alarm clock +- alarm(0); +- + #ifdef USE_PAM + try{ + pam.end(); +@@ -733,6 +719,7 @@ + + StopServer(); + RemoveLock(); ++ while (waitpid(-1, NULL, WNOHANG) > 0); // Collects all dead childrens + Run(); + } + +@@ -803,6 +790,7 @@ + + for(cycles = 0; cycles < ncycles; cycles++) { + if((Dpy = XOpenDisplay(DisplayName))) { ++ XSetIOErrorHandler(xioerror); + return 1; + } else { + if(!ServerTimeout(1, "X server to begin accepting connections")) +@@ -885,9 +873,6 @@ + ServerPID = -1; + break; + } +- alarm(15); +- pause(); +- alarm(0); + + // Wait for server to start up + if(WaitForServer() == 0) { +@@ -920,15 +905,12 @@ + + + void App::StopServer() { +- // Stop alars clock and ignore signals +- alarm(0); + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); + signal(SIGHUP, SIG_IGN); + signal(SIGPIPE, SIG_IGN); + signal(SIGTERM, SIG_DFL); + signal(SIGKILL, SIG_DFL); +- signal(SIGALRM, SIG_DFL); + + // Catch X error + XSetIOErrorHandler(IgnoreXIO); |