forked from mirrors/nixpkgs
slim: Work around broken PAM session handling
Previously logging in via SLiM more than once didn't work because SLiM doesn't clean up its PAM session properly (that is, in a child rather than in the parent). Thus the slim process becomes part of the user session's cgroup, among other things. This patch causes SLiM to exit after the session has finished, after which systemd will restart display-manager.service. Fixes NixOS/nixops#137.
This commit is contained in:
parent
1d634b4388
commit
873662b8ad
|
@ -527,6 +527,11 @@ in
|
|||
'';
|
||||
|
||||
script = "${cfg.displayManager.job.execCmd}";
|
||||
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "200ms";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.displayManager.xserverArgs =
|
||||
|
|
|
@ -13,6 +13,11 @@ stdenv.mkDerivation rec {
|
|||
[ # Allow the paths of the configuration file and theme directory to
|
||||
# be set at runtime.
|
||||
./runtime-paths.patch
|
||||
|
||||
# Exit after the user's session has finished. This works around
|
||||
# slim's broken PAM session handling (see
|
||||
# http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).
|
||||
./run-once.patch
|
||||
];
|
||||
|
||||
preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc --replace /lib $out/lib";
|
||||
|
|
12
pkgs/applications/display-managers/slim/run-once.patch
Normal file
12
pkgs/applications/display-managers/slim/run-once.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -ru -x '*~' slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
|
||||
--- slim-1.3.6-orig/app.cpp 2013-10-15 11:02:55.629263422 +0200
|
||||
+++ slim-1.3.6/app.cpp 2013-10-15 13:00:10.141210784 +0200
|
||||
@@ -816,7 +822,7 @@
|
||||
StopServer();
|
||||
RemoveLock();
|
||||
while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
|
||||
- Run();
|
||||
+ exit(OK_EXIT);
|
||||
}
|
||||
|
||||
void App::KillAllClients(Bool top) {
|
Loading…
Reference in a new issue