Hooks are not included in slot/plug label expressions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
High
|
Paweł Stołowski |
Bug Description
Expected behavior:
If my snap's snapcraft.yaml plugs a scoped interface for a given hook, the hook should be able to access resources provided by this interface.
Actual behavior:
The hook fails with AppArmor denials.
## Context
Hooks do not get access to interfaces if snapd's AppArmor rules for this interface are scoped with security tags. Root cause is that `builtin.
Relevant parts of rule generation (exemplary for NM Introspectable):
https:/
## Reproducing
My snap requires access to the network-manager interface during its post-refresh hook. My snapcraft.yaml has the following entries (Full source at https:/
```
hooks:
install:
plugs: [network, network-bind]
post-refresh:
plugs: [network, network-manager]
connect-
plugs: [network-manager]
```
Full debugging log: https:/
Changed in snapd: | |
status: | New → Confirmed |
Changed in snapd: | |
assignee: | nobody → glancr team (glancr) |
Changed in snapd: | |
assignee: | glancr team (glancr) → Paweł Stołowski (stolowski) |
Changed in snapd: | |
status: | Confirmed → In Progress |
importance: | Undecided → High |
This will be fixed in the 2.43 release.