github.com/bugraaydogar/snapd@v0.0.0-20210315170335-8c70bb858939/interfaces/builtin/screencast_legacy.go (about) 1 // -*- Mode: Go; indent-tabs-mode: t -*- 2 3 /* 4 * Copyright (C) 2018 Canonical Ltd 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 3 as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 */ 19 20 package builtin 21 22 const screencastLegacySummary = `allows screen recording and audio recording, and also writing to arbitrary filesystem paths` 23 24 const screencastLegacyBaseDeclarationSlots = ` 25 screencast-legacy: 26 allow-installation: 27 slot-snap-type: 28 - core 29 deny-auto-connection: true 30 ` 31 32 const screencastLegacyConnectedPlugAppArmor = ` 33 # Description: Can access common desktop screenshot, screencast and recording 34 # methods thus giving privileged access to screen output and microphone via the 35 # desktop session manager. 36 37 #include <abstractions/dbus-session-strict> 38 39 # gnome-shell screenshot and screencast. Note these APIs permit specifying 40 # absolute file names as arguments to DBus methods which tells gnome-shell to 41 # save to arbitrary locations permitted by the unconfined user. 42 dbus (send) 43 bus=session 44 path=/org/gnome/Shell/Screen{cast,shot} 45 interface=org.freedesktop.DBus.Properties 46 member=Get{,All} 47 peer=(label=unconfined), 48 dbus (send) 49 bus=session 50 path=/org/gnome/Shell/Screen{cast,shot} 51 interface=org.gnome.Shell.Screen{cast,shot} 52 peer=(label=unconfined), 53 ` 54 55 func init() { 56 registerIface(&commonInterface{ 57 name: "screencast-legacy", 58 summary: screencastLegacySummary, 59 implicitOnClassic: true, 60 baseDeclarationSlots: screencastLegacyBaseDeclarationSlots, 61 connectedPlugAppArmor: screencastLegacyConnectedPlugAppArmor, 62 }) 63 }