Allow apps access to /sys/class/timed_output/vibrator/enable

Bug #1241735 reported by Cris Dywan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apparmor-easyprof-ubuntu (Ubuntu)
Fix Released
High
Jamie Strandboge
qtubuntu-sensors (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

With https://code.launchpad.net/~kalikiana/qtubuntu-sensors/feedback/+merge/183456 (not yet released) and https://code.launchpad.net/~kalikiana/ubuntu-ui-toolkit/feedback/+merge/183467 (already released) in place QtFeedback can be used by apps directly or implicitly via standard components.

However, apps need permission to write a numeric value to /sys/class/timed_output/vibrator/enable for this to work.

This in principle is needed for arbitrary apps as anyone may want to use vibrations to make tapping give feedback to the user, or even vibrations for other means.

Tags: patch

Related branches

Changed in apparmor-easyprof-ubuntu (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Jamie Strandboge (jdstrand)
tags: added: application-confinement
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I'll upload this fix after trusty opens. In the meantime, attached is a debdiff that should address this issue. Please report back if it doesn't.

tags: added: patch
Revision history for this message
Cris Dywan (kalikiana) wrote :

I edited the template by hand based on the diff and rebooted. "echo 150 | /sys/class/timed_output/vibrator/enable" still doesn't work without sudo and I see no change in the apps. How can I verify that it works?

Revision history for this message
Cris Dywan (kalikiana) wrote :

Very stupid mistake on my side "echo 150 > /sys/class/timed_output/vibrator/enable" works. Still apps don't, still investigating on which end the problem lies.

Revision history for this message
Cris Dywan (kalikiana) wrote :

I marked a fix for the plugin as related - there's a race condition preventing the command from being fully executed. This will be needed in addition to the apparmor template update.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

If you update by hand then you need to perform:
$ sudo aa-clickhook -f

to regenerate the profiles.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apparmor-easyprof-ubuntu - 1.0.41

---------------
apparmor-easyprof-ubuntu (1.0.41) trusty; urgency=low

  * ubuntu-* templates:
    - allow rw access to /sys/class/timed_output/vibrator/enable
      (LP: #1241735)
    - comment on how NameHasOwner and GetNameOwner may leak information
  * networking: explicitly deny receive messages and signals from network
    manager and ofono in addition to send to silence denials for apps and
    libraries with too broad AddMatch calls
  * hardware/video.d: add hardware specific accesses for mako and maguro
    (LP: #1243198)
  * hardware/audio.d: add hardware specific accesses for mako
  * video:
    - include hardware/video.d
    - add /dev/ashmem
  * audio: add /dev/ashmem
 -- Jamie Strandboge <email address hidden> Tue, 22 Oct 2013 07:37:43 -0500

Changed in apparmor-easyprof-ubuntu (Ubuntu):
status: In Progress → Fix Released
tags: removed: application-confinement
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu-sensors - 0.6+14.04.20140108.2-0ubuntu1

---------------
qtubuntu-sensors (0.6+14.04.20140108.2-0ubuntu1) trusty; urgency=low

  [ thomas-voss ]
  * Remove obsolete symbols file. Add a TODO in
    core::SharedAccelerometer for switching to an object-pool for
    allocation of sensor readings. Refactor core-based sensor backend
    implementation. Fix numerous bugs for the orientation and
    acceleration sensor. Make sure that signal-slot connections are
    queued as sensor callbacks can happen on any thread. Add a
    configuration file (place in /etc/xdg/QtProject) to select the
    ubuntu sensors by default.

  [ Christian Dywan ]
  * Keep vibrator around to prevent it from being recycled too fast.
    (LP: #1241735)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 42
 -- Ubuntu daily release <email address hidden> Wed, 08 Jan 2014 17:17:24 +0000

Changed in qtubuntu-sensors (Ubuntu):
status: New → 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.