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

Bug#355527: klaptopdeamon: Please use dpkg-statoverride instead of chmod to change rights on helper programs



Package: klaptopdeamon
Version: klaptopdaemon
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)
--- 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: