From a6bed755715737d544dba2480925ab4633ae0996 Mon Sep 17 00:00:00 2001 From: Michael Demeter Date: Fri, 11 Oct 2013 15:37:57 -0700 Subject: [PATCH] tizen-smack: Handling of /dev Smack enabled systems need /dev special devices correctly labeled - Add AC_DEFINE for HAVE_SMACK to configure.ac - Add Check for smack in Makefile.am to include smack default rules - Add smack default rules to label /dev/xxx correctly for access Change-Id: Iebe2e349cbedb3013abdf32edb55e9310f1d17f5 --- Makefile.am | 5 +++++ rules/55-udev-smack-default.rules | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 rules/55-udev-smack-default.rules diff --git a/Makefile.am b/Makefile.am index 0c27f81..d24a189 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3676,6 +3676,11 @@ dist_udevrules_DATA += \ nodist_udevrules_DATA += \ rules/99-systemd.rules +if HAVE_SMACK +dist_udevrules_DATA += \ + rules/55-udev-smack-default.rules +endif + udevconfdir = $(sysconfdir)/udev dist_udevconf_DATA = \ src/udev/udev.conf diff --git a/rules/55-udev-smack-default.rules b/rules/55-udev-smack-default.rules new file mode 100644 index 0000000..3829019 --- /dev/null +++ b/rules/55-udev-smack-default.rules @@ -0,0 +1,23 @@ +# do not edit this file, it will be overwritten on update + +KERNEL=="null", SECLABEL{smack}="*" +KERNEL=="zero", SECLABEL{smack}="*" +KERNEL=="console", SECLABEL{smack}="*" +KERNEL=="kmsg", SECLABEL{smack}="*" +KERNEL=="video*", SECLABEL{smack}="*" +KERNEL=="card*", SECLABEL{smack}="*" +KERNEL=="ptmx", SECLABEL{smack}="*" +KERNEL=="tty", SECLABEL{smack}="*" + +SUBSYSTEM=="graphics", GROUP="video", SECLABEL{smack}="*" +SUBSYSTEM=="drm", GROUP="video", SECLABEL{smack}="*" +SUBSYSTEM=="dvb", GROUP="video", SECLABEL{smack}="*" + +SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666", SECLABEL{smack}="*" +SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666", SECLABEL{smack}="*" +SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", SECLABEL{smack}="*" +SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty", SECLABEL{smack}="*" +KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout", SECLABEL{smack}="*" + +SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0640", SECLABEL{smack}="*" +SUBSYSTEM=="input", KERNEL=="ts[0-9]*|uinput", MODE="0640", SECLABEL{smack}="*" -- 2.7.4