! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-battery-plugin fails to notice battery on grsecurity hardened system
Status:
RESOLVED: INVALID
Product:
Xfce4-battery-plugin
Component:
General

Comments

Description Amadeusz Sławiński 2013-04-30 16:44:54 CEST
Hello, I have gentoo hardened system with /sys restrictions and xfce4-battery-plugin fails to find battery.
Problem is caused by following lines from xfce4-battery-plugin/tree/panel-plugin/libacpi.c (lines 289 - 297)

  if (!(acpi = fopen ("/proc/acpi/info", "r"))
      && !(acpi = fopen ("/sys/module/acpi/parameters/acpica_version", "r")))
  {
#ifdef DEBUG
	  printf("DBG:no acpi: /proc/acpi/info or "
             "/sys/module/acpi/parameters/acpica_version not found!\n");
#endif
    return 1;
  }

I have no /proc/acpi/info file (quick googling suggests it was deprecated) and /sys access is restricted due to grsecurity kernel patchset. However after removing them plugin seems to work without problems (getting it's info from /proc/acpi/battery/BAT1/info).

Now my question is: is this check really necessary or can it be removed upstream?
Comment 1 Landry Breuil editbugs 2014-11-23 21:42:53 CET
Mass-reassign all bugs from florian@ to goodies-dev@, thanks for the maintenance work! (and sorry for the bugmail spam..)

Bug #10050

Reported by:
Amadeusz Sławiński
Reported on: 2013-04-30
Last modified on: 2020-05-21

People

Assignee:
Xfce-Goodies Maintainers
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information