diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix index 7ce261fec29..0cd866a2c95 100644 --- a/pkgs/applications/display-managers/slim/default.nix +++ b/pkgs/applications/display-managers/slim/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation rec { # pam_response structures, not a pointer to an array of pointers to # pam_response structures. Of course C can't tell the difference... ./pam.patch + + # Don't set PAM_RHOST to "localhost", it confuses ConsoleKit + # (which assumes that a non-empty string means a remote session). + ./pam2.patch ]; buildInputs = [x11 libjpeg libpng libXmu freetype pam]; diff --git a/pkgs/applications/display-managers/slim/pam2.patch b/pkgs/applications/display-managers/slim/pam2.patch new file mode 100644 index 00000000000..48cf661864b --- /dev/null +++ b/pkgs/applications/display-managers/slim/pam2.patch @@ -0,0 +1,20 @@ +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-08-17 02:59:37.000000000 +0200 +*************** +*** 226,232 **** + pam.start("slim"); + pam.set_item(PAM::Authenticator::TTY, DisplayName); + pam.set_item(PAM::Authenticator::Requestor, "root"); +! pam.set_item(PAM::Authenticator::Host, "localhost"); + + } + catch(PAM::Exception& e){ +--- 226,232 ---- + pam.start("slim"); + pam.set_item(PAM::Authenticator::TTY, DisplayName); + pam.set_item(PAM::Authenticator::Requestor, "root"); +! pam.set_item(PAM::Authenticator::Host, ""); + + } + catch(PAM::Exception& e){