5241 Commits

Author SHA1 Message Date
Hsieh-Tseng Shen
edbca85967 interfaces/builtin/block_devices: allow blkid to print block device attributes
To allow blkid to visit block_devices attributes via low level probing, so that
we can get information like partition table type or PART_ENTRY_UUID
which could be useful for script based snap without parsing
/run/udev/data/b{major}:{minor}.

Signed-off-by: Hsieh-Tseng Shen <woodrow.shen@canonical.com>
2021-11-15 21:07:14 +01:00
Ondrej
460790f327 interfaces/builtin/time-control: allow pps access
* interfaces/builtin/time-control: allow pps access

Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>

* interfaces/builtin/time-control: fix go formatting

Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>

* interfaces/builtin/time-control: fix failing tests after adding pps support

Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
2021-11-15 15:56:20 +01:00
Olivier
a570217061 interfaces/u2f-devices: add Trezor and Trezor v2 keys
* interfaces/u2f-devices: add Trezor and Trezor v2 keys (https://launchpad.net/bugs/1947746)

* Add another product ID to the valid patterns.

Co-authored-by: Michael Vogt <mvo@ubuntu.com>
2021-11-15 14:02:37 +01:00
Oliver Grawert
1a30861c58 interfaces: timezone-control, add permission for ListTimezones DBus call
Amend mail address to fix cla-check issues
2021-11-15 11:53:42 +01:00
Ian Johnson
e1d8326c81 interfaces/apparmor/template.go: allow udevadm from merged usr systems
Such as the core20 and newer base snaps for example.

Thanks to @xnox for finding this issue.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-11-12 10:38:33 +01:00
Alfonso Sánchez-Beato
35b76d9055 interface/modem-manager: allow connecting to the mbim/qmi proxy
Add permissions to the connected slot so MM can actually talk to
incoming connections to mbim/qmi proxies. Remove "accept" from the
permanent slot, as it is not actually the right place for it.
2021-11-09 15:18:19 +01:00
Alex Murray
397efc83ff interfaces/network-manager-observe: Update for libnm client library
The official libnm client library uses the
ObjectManager.GetManagedObjects() DBus interface method to query properties
from NetworkManager, as well as using the InterfacesAdded /
InterfacesRemoved signals, so update this interface to provide access to
that, plus ensure they can also receive the PropertiesChanged signal from
NetworkManager objects as well as this is also required.

This change should also allow Dart applications which use the nm.dart library to
get interface addresses etc without requiring to use the more privileged
network-manager interface, as this library is similar to libnm:

https://forum.snapcraft.io/t/request-auto-connect-network-manager-for-cybear-jinni-app-again/26520
2021-11-08 20:00:36 +01:00
Ian Johnson
7280bdc64a interfaces/dsp: add more ambarella things
* interfaces/dsp: add more ambarella things

As per customer ticket 00321783.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>

* interfaces/builtin/dsp_test.go: adjust tests too

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-11-02 18:02:22 +01:00
Robin Krahl
db063d53c4 interfaces/u2f-devices: add Nitrokey 3 2021-10-21 07:28:46 -05:00
Tao Wang
9a229e4052 Add '/com/canonical/dbusmenu' path access to 'unit7' interface
Allow the path in unity7 inteface will fix systray issue in some applications.

Signed-off-by: Tao Wang <twang2218@gmail.com>
2021-10-18 12:56:41 -05:00
Ian Johnson
cea4609c8c interfaces/builtin/hardware-observer: add /proc/bus/input/devices too
This is needed for a customer request, see ticket 00320804 for full details.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-10-18 12:55:26 -05:00
Samuele Pedroni
9adc29b323 interface/modem-manager: add accept for MBIM/QMI proxy clients
Merge pull request #10931 from alfonsosanchezbeato/add-accept-mm

We need accept too for clients to connect.
2021-10-18 12:46:43 -05:00
Michael Vogt
169c60d6f9 Merge pull request #10777 from alfonsosanchezbeato/mm-add-pcie
interfaces/modem-manager: add access to PCIe modems
2021-10-04 17:48:40 +02:00
Michael Vogt
a79e60b1cb Merge pull request #9773 from bboozzoo/bboozzoo/apparmor-no-profile-update-when-no-profile-for-sc
interfaces/apparmor: do not fail during initialization when there is no AppArmor profile for snap-confine
2021-09-28 15:56:54 +02:00
Michael Vogt
c9424519b8 Merge pull request #10571 from jhenstridge/themes-api-access-check
daemon: implement access checkers for themes API
2021-09-28 15:54:39 +02:00
Michael Vogt
d59c6ce1eb Merge pull request #10845 from bboozzoo/bboozzoo/allow-clone3-default-seccomp
interfaces/seccomp: add clone3 to default template
2021-09-28 08:52:05 +02:00
Olivier Tilloy
aa360302c5 interfaces/u2f-devices: add GoTrust Idem Key (https://launchpad.net/bugs/1945182) 2021-09-27 18:33:40 +02:00
Maciej Borzecki
999c2e61f0 interfaces/seccomp: add clone3 to default template
Recent combinations of Go 1.17, glibc 2.34 and Linux 5.14 ended up triggering
pthread_create() code paths that try to use clone3() syscall when executing
snap-exec. Since snap-exec runs under the seccomp profile of the application,
make sure that clone3 is allowed in the default template. Also, applications may
trigger this code path themselves anyway.

The strace output when this fails looks like this:

mprotect(0x7f4ad3ea2000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], ~[KILL STOP RTMIN RT_1], 8) = 0
syscall_435(0x7ffc466b4c60, 0x58, 0x58b300, 0x8, 0x7f4ad46a1640, 0x7ffc466b4d4f) = -1 (errno 1)
rt_sigprocmask(SIG_SETMASK, ~[KILL STOP RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "runtime/cgo: ", 13runtime/cgo: )           = 13
write(2, "pthread_create failed: Operation not permitted", 46pthread_create
failed: Operation not permitted) = 46

Where syscall 435 is also known as clone3:

$ scmp_sys_resolver 435
clone3

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-27 12:00:53 +02:00
Michael Vogt
d27bd613f4 Merge pull request #10841 from anonymouse64/bugfix/dsp-ambarella-moar
interfaces/dsp: add a usb rule to the ambarella flavor
2021-09-27 09:18:48 +02:00
Ian Johnson
8356a8cb69 interfaces/apparmor/template.go: allow inspection of dbus mediation level
This does not leak any information since an app could always try to send dbus
messages and see what fails to perform the same inspection, but this helps
eliminate some messages when using i.e. dbus-run-session legitimately for some
applications.

See also the thread on https://forum.snapcraft.io/t/how-to-use-dbus-run-session-on-ubuntu-core/7077/3

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-24 09:08:32 -05:00
Ian Johnson
3524f9484c interfaces/dsp: add a usb rule to the ambarella flavor
This is needed as per a recent customer ticket, see SF ticket #00319598 for
more details.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-24 09:00:39 -05:00
James Henstridge
97c5d9cd6f Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-24 12:59:56 +08:00
Michael Vogt
9e0a1807b3 Merge pull request #10803 from bboozzoo/bboozzoo/cgroupv2-test-and-systems
tests, interfaces/builtin: introduce 21.10 cgroupv2 variant, tweak tests for cgroupv2, update builtin interfaces
2021-09-22 16:46:22 +02:00
Ian Johnson
9e9bdee1b5 interfaces/builtin/opengl.go: add libOpenGL.so* too
This was added a long time ago to the NVIDIA mount support in snap-confine, so
we mount it there, but we never added it to the policy allowing it.

See https://forum.snapcraft.io/t/kdenlive-cannot-render-any-projects-stuck-in-waiting/26689/3

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-21 11:16:37 -05:00
Maciej Borzecki
2f3b5e5ad9 interfaces/builtin/docker-support: tighten the profile for dockerd operating on a cgroup v2 system
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-21 10:45:40 +02:00