New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interfaces: miscellaneous updates for hardware-observe, kernel-module-control, unity7 and default #2768
Conversation
… #1660865) Support lspci: - allow reading /etc/modprobe.d/{,*} - allow capability sys_admin - allow read on @{PROC}/bus/pci/{,**} (lspci -A linux-proc) - allow iopl syscall (lspci -A intel-conf*) - allow read on @{PROC}/interrupts Support lshw: - allow read on @{PROC}/devices - allow read on @{PROC}/ide/{,**} - allow read on @{PROC}/scsi/{,**} - allow read on @{PROC}/device-tree/{,**} - allow read on /sys/kernel/debug/usb/devices - allow read on @{PROC}/sys/abi/{,*}
Per man 2 syslog, when /proc/sys/kernel/dmesg_restrict is set, SYSLOG_ACTION_READ_ALL and SYSLOG_ACTION_SIZE_BUFFER require CAP_SYSLOG. Since consumers of this interface have legitimate reasons to check the log when this restriction is set, allow the capability.
/etc/mailname doesn't exist in core, but it may exist on classic distributions. We already allow /etc/hostname, so this isn't giving away anything more.
@@ -29,9 +29,13 @@ const kernelModuleControlConnectedPlugAppArmor = ` | |||
capability sys_module, | |||
@{PROC}/modules r, | |||
|
|||
# NOTE: needed by lscpu. In the future this may be moved to system-trace or | |||
# system-observe. | |||
# FIXME: moved to physical-memory-observe (remove this in series 18) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as an observation. When we do series 18 we will allow people to co-install 16 and 18 base snaps and apps can use either of those. It just struck me that we should probably teach the interface layer the base snap the rule is for. The kernel-module-control
interface will have to keep supplying access to /dev/mem
even when 18 is around if the interface is connected to a snap using base-ubuntu-16
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
… #1662306) /proc/sys/kernel/random/boot_id is a uuid that the kernel randomly generates on each boot. Since it is different for every boot, allowing read access is ok because it can't be used as an id to track the device
The merge of snapcore#2768 made this rule obsolete therefore removed.
Support lspci:
Support lshw: