kinit: use a setuid wrapper for start_kdeinit

This commit is contained in:
Thomas Tuegel 2016-07-15 12:10:54 -05:00
parent 512212db36
commit d3747a2261
5 changed files with 26 additions and 14 deletions

View File

@ -54,16 +54,12 @@ in
owner = "root";
setuid = true;
}
# ttuegel: Disabled until I can figure out how to propagate the
# necessary environment variables.
/*
{
program = "start_kdeinit_wrapper";
source = "${kde5.kinit.out}/lib/libexec/kf5/start_kdeinit_wrapper";
program = "start_kdeinit";
source = "${kde5.kinit.out}/lib/libexec/kf5/start_kdeinit";
owner = "root";
setuid = true;
}
*/
];
environment.systemPackages =

View File

@ -1,13 +1,15 @@
{ kdeFramework, lib, copyPathsToStore, extra-cmake-modules, kconfig, kcrash
, kdoctools, ki18n, kio, kservice, kwindowsystem, libcap
{
kdeFramework, lib, copyPathsToStore,
extra-cmake-modules, kdoctools,
kconfig, kcrash, ki18n, kio, kservice, kwindowsystem
}:
kdeFramework {
name = "kinit";
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
nativeBuildInputs = [ extra-cmake-modules kdoctools libcap.out ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [
kconfig kcrash ki18n kio kservice kwindowsystem libcap
kconfig kcrash ki18n kio kservice kwindowsystem
];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
}

View File

@ -1,8 +1,8 @@
Index: kinit-5.21.0/src/kdeinit/kinit.cpp
Index: kinit-5.24.0/src/kdeinit/kinit.cpp
===================================================================
--- kinit-5.21.0.orig/src/kdeinit/kinit.cpp
+++ kinit-5.21.0/src/kdeinit/kinit.cpp
@@ -657,19 +657,16 @@ static pid_t launch(int argc, const char
--- kinit-5.24.0.orig/src/kdeinit/kinit.cpp
+++ kinit-5.24.0/src/kdeinit/kinit.cpp
@@ -672,19 +672,16 @@ static pid_t launch(int argc, const char
if (!libpath.isEmpty()) {
if (libpath_relative) {

View File

@ -1 +1,2 @@
kinit-libpath.patch
start_kdeinit-path.patch

View File

@ -0,0 +1,13 @@
Index: kinit-5.24.0/src/start_kdeinit/start_kdeinit_wrapper.c
===================================================================
--- kinit-5.24.0.orig/src/start_kdeinit/start_kdeinit_wrapper.c
+++ kinit-5.24.0/src/start_kdeinit/start_kdeinit_wrapper.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <unistd.h>
-#define EXECUTE CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit"
+#define EXECUTE "/var/setuid-wrappers/start_kdeinit"
#if KDEINIT_OOM_PROTECT