pmi tries to access '/dev/mem' when run as not root.

Bug #36573 reported by Paul Sladen
8
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Medium
Paul Sladen

Bug Description

pmi is used as the interface between programs that want the machine to be put to sleep and the complicated automagic that allows this to happen.

When pmi is queried by a non-root user, it succeeds but also shows severeal attempts at accessing '/dev/mem':

  $ pmi capabilities
  /dev/mem: Permission denied
  /dev/mem: Permission denied
  /dev/mem: Permission denied
  hibernate suspend

The permissions should be checked at the access avoided, especially if it is not actually required.

Revision history for this message
Paul Sladen (sladen) wrote :

  /usr/sbin/pmi

unconditionally pulls in:

  /usr/share/acpi-support/device-funcs

which does:

      manufacturer=`dmidecode --string system-manufacturer|sed -e 's/ *$//'`
    model=`dmidecode --string system-product-name|sed -e 's/ *$//'`
    version=`dmidecode --string system-version|sed -e 's/ *$//'`

so it means that most of the time 'pmi capabilities' or 'pmi query' is actually lying as the contents of:

  /etc/default/acpi-support

are used instead of the machine-specific overrides in:

  /usr/share/acpi-support/$manufacturer.config

Changed in powermanagement-interface:
status: Unconfirmed → Confirmed
Revision history for this message
Paul Sladen (sladen) wrote :

As the dmi contents stay pretty static, one option would be to cache the result of 'dmidecode -s *' on boot.

Paul Sladen (sladen)
Changed in powermanagement-interface:
assignee: nobody → sladen
status: Confirmed → Fix Committed
Revision history for this message
Paul Sladen (sladen) wrote :

 acpi-support (0.66) dapper; urgency=low
 .
   * Cache result of 'dmidecode -s *' so that they can be access without
     privileges when checking 'pmi capabilities'. [Malone: #36573]

Changed in acpi-support:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.