Skip to content

Commit

Permalink
interfaces: move base decl for x11 to interface itself
Browse files Browse the repository at this point in the history
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
  • Loading branch information
zyga committed Jun 20, 2017
1 parent cffcca1 commit 4e3a855
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions interfaces/builtin/x11.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ package builtin

const x11Summary = `allows interacting with the X11 server`

const x11BaseDeclarationSlots = `
x11:
allow-installation:
slot-snap-type:
- core
`

// http://bazaar.launchpad.net/~ubuntu-security/ubuntu-core-security/trunk/view/head:/data/apparmor/policygroups/ubuntu-core/16.04/x
const x11ConnectedPlugAppArmor = `
# Description: Can access the X server. Restricted because X does not prevent
Expand Down Expand Up @@ -51,6 +58,7 @@ func init() {
name: "x11",
summary: x11Summary,
implicitOnClassic: true,
baseDeclarationSlots: x11BaseDeclarationSlots,
connectedPlugAppArmor: x11ConnectedPlugAppArmor,
connectedPlugSecComp: x11ConnectedPlugSecComp,
reservedForOS: true,
Expand Down
4 changes: 0 additions & 4 deletions interfaces/policy/basedeclaration.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ plugs:

const baseDeclarationSlots = `
slots:
x11:
allow-installation:
slot-snap-type:
- core
`

func trimTrailingNewline(s string) string {
Expand Down

0 comments on commit 4e3a855

Please sign in to comment.