Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
interfaces/apparmor: expand @{APP_PKGNAME} to just snap name #840
Conversation
|
|
|
@mvo5 old-security is not a real interface and I suspect that we did change the old code at the time |
|
Pinging @jdstrand for review |
|
LGTM |
zyga
merged commit aa28532
into
snapcore:master
Apr 8, 2016
jdstrand
reviewed
Apr 8, 2016
| @@ -280,7 +280,7 @@ const commonPrefix = ` | ||
| @{APP_APPNAME}="smbd" | ||
| @{APP_ID_DBUS}="samba_2eacme_5fsmbd_5f1" |
jdstrand
reviewed
Apr 8, 2016
| @@ -280,7 +280,7 @@ const commonPrefix = ` | ||
| @{APP_APPNAME}="smbd" | ||
| @{APP_ID_DBUS}="samba_2eacme_5fsmbd_5f1" | ||
| @{APP_PKGNAME_DBUS}="samba_2eacme" |
jdstrand
reviewed
Apr 8, 2016
| @@ -54,7 +54,7 @@ func legacyVariables(appInfo *snap.AppInfo) []byte { | ||
| fmt.Fprintf(&buf, "@{APP_PKGNAME_DBUS}=\"%s\"\n", |
|
I see that snap/info.go has a modified SecurityTag() that does: As such, PROFILEATTACH is going to be snap.%s.%s. That means that any apparmor rules that use the profile attach label (ie, signal, ptrace, unix, dbus) are now broken between that change and this change. Ie, in template.go:
These need to be changed to:
Note I both prepended 'snap.' and changed the '_' to '.' The current builtins are all ok, but future policy like bluez will need to use similar rules. |
|
@jdstrand thanks for pointing out the subtle tweak in apparmor rules. I'll keep an eye out for this in bluez reviews. I'll iterate with updates to variables but I'd like to actually drop existing variables and replace them with just |
|
With modern variables use:
|
|
In fact, with that change you can remove legacyVariables altogether. |
|
Oh wait, I spoke too soon. Don't remove legacyVariables yet-- the file rules still need to be updated for modern variables. |
zyga commentedApr 8, 2016
This patch drops the .developer suffix from APP_PKGNAME since this is
the current filesystem layout.
NOTE: this was tested with actual device. :-)
Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com