Coder Social home page Coder Social logo

fwupd-snapcraft's People

Contributors

ethanhsieh avatar julianliu avatar timchen119 avatar woodrow-shen avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fwupd-snapcraft's Issues

Permissions for fwupdmgr

I think this is the best place to post this, after seeing this comment on the fwupd repository.

I am not sure if my approach here is correct (not sure if there is another way to use to the uefi-fw-tools from my snap).

Description

I have a snap that needs permission to the fwupd service to update the firmware on a device running Ubuntu Core 16. My snap is connected to the uefi-fw-tools:fwupd slot and ships the uefi-fw-tools snap in order to use the fwupdmgr command. When running of the following commands:

fwupdmgr get-devices
''       get-updates
''       verify

AppArmor is complaining I do not have the required permissions:

$ uefi-fw-tools.fwupdmgr get-updates
mkdir: cannot create directory '/var/snap/uefi-fw-tools/50/run/user/1000': Permission denied
Rejected send message, 7 matched rules; type="method_call", sender=":1.2206" (uid=1000 pid=952928 comm="/snap/uefi-fw-tools/50/bin/fwupdmgr get-updates " label="snap.uefi-fw-tools.fwupdmgr (enforce)") interface="org.freedesktop.fwupd" member="GetUpdates" error name="(unset)" requested_reply="0" destination=":1.64" (uid=0 pid=1550 comm="/snap/uefi-fw-tools/50/libexec/fwupd/fwupd " label="snap.uefi-fw-tools.fwupd (enforce)")

Steps to reproduce

  1. Create a snap (say updater-snap) that uses the fwupd service through the fwupd plug with strict confinement.
  2. Manually connect the fwupd plug to the uefi-fw-tools:fwupd slot
  3. Run the snap with
snap run --shell updater-snap.cli
  1. Try any of the above commands e.g. fwupdmgr get-devices
  2. AppArmor prevents the command from running

Expected behaviour

Commands run successfully

Info

Application Version
uefi-fw-tools latest/beta
Ubuntu Core 16
Snapcraft 4.8

Additional info:

  • Running the updater-snap as root and following the above steps does allow for the command to run. However, as this is a snap that is running on a remote device this is not an option.

I hope I included all the info :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.