[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#355529: klaptopdaemon: Please use dpkg-statoverride on Debian instead of chmod to change rights on helper programs



Package: klaptopdaemon
Version: 4:3.5.1-2
Severity: normal
Tags: patch

The klaptopdaemon configuration interface uses simple chmod and chown
commands to change the rights on the APM and ACPI helper programs.
On Debian, those rights are reinitialized on every update of the
package. Please use dpkg-statoverride instead, to keep these changes
accross package updates.

The attached patch does this.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)

Versions of packages klaptopdaemon depends on:
ii  kdelibs4c2a               4:3.5.1-3      core libraries for all KDE applica
ii  libc6                     2.3.6-3        GNU C Library: Shared libraries an
ii  libgcc1                   1:4.0.2-9      GCC support library
ii  libqt3-mt                 3:3.3.5-4      Qt GUI Library (Threaded runtime v
ii  libstdc++6                4.0.2-9        The GNU Standard C++ Library v3
ii  libxtst6                  6.9.0.dfsg.1-4 X Window System event recording an

klaptopdaemon recommends no packages.

-- no debconf information
--- kdeutils-3.5.1/klaptopdaemon/acpi.cpp	2006-01-20 01:49:18.000000000 +0900
+++ kdeutils-3.5.1-patched/klaptopdaemon/acpi.cpp	2006-03-06 18:08:31.788108032 +0900
@@ -186,7 +186,7 @@
 			proc << kdesu;
 			proc << "-u";
 			proc << "root";
-			proc <<  "chown root "+helper+"; chmod +s "+helper;
+			proc <<  "dpkg-statoverride --update --add root root 6755 "+helper;
 			proc.start(KProcess::Block);	// run it sync so has_acpi below sees the results
 		}
 	} else {
--- kdeutils-3.5.1/klaptopdaemon/apm.cpp	2006-01-20 01:49:18.000000000 +0900
+++ kdeutils-3.5.1-patched/klaptopdaemon/apm.cpp	2006-03-06 18:11:12.953607152 +0900
@@ -166,7 +166,7 @@
 			proc << kdesu;
 			proc << "-u";
 			proc << "root";
-			proc <<  QString("chown root ")+apm_name+"; chmod +s "+apm_name;
+			proc <<  QString("dpkg-statoverride --update --add root root 6755 ")+apm_name;
 			proc.start(KProcess::Block);	// run it sync so has_apm below sees the results
 		}
 	} else {
@@ -208,7 +208,7 @@
 			proc << kdesu;
 			proc << "-u";
 			proc << "root";
-			proc <<  "chown root "+helper+"; chmod +s "+helper;
+			proc <<  "dpkg-statoverride --update --add root root 6755 "+helper;
 			proc.start(KProcess::Block);	// run it sync so has_acpi below sees the results
 		}
 	} else {

Reply to: