diff options
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r-- | meta-oe/recipes-extended/polkit/files/50-org.freedesktop.timedate1.rules | 8 | ||||
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/polkit/files/50-org.freedesktop.timedate1.rules b/meta-oe/recipes-extended/polkit/files/50-org.freedesktop.timedate1.rules new file mode 100644 index 000000000..95b0e0f69 --- /dev/null +++ b/meta-oe/recipes-extended/polkit/files/50-org.freedesktop.timedate1.rules | |||
@@ -0,0 +1,8 @@ | |||
1 | /* give group 'datetime' rights to change settings */ | ||
2 | /* based upon http://lists.freedesktop.org/archives/systemd-devel/2013-March/009576.html */ | ||
3 | |||
4 | polkit.addRule(function(action, subject) { | ||
5 | if (action.id.indexOf("org.freedesktop.timedate1.") == 0 && subject.isInGroup("datetime")) { | ||
6 | return polkit.Result.YES; | ||
7 | } | ||
8 | }); | ||
diff --git a/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb b/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb new file mode 100644 index 000000000..373e4f0b0 --- /dev/null +++ b/meta-oe/recipes-extended/polkit/polkit-group-rule-datetime.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | DESCRIPTION = "Create usergroup datetime. All members off this group are allowed set date/time/timezone via system dbus" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
4 | |||
5 | require polkit-group-rule.inc | ||
6 | |||
7 | SRC_URI = "file://50-org.freedesktop.timedate1.rules" | ||
8 | |||
9 | do_install() { | ||
10 | install -m 0755 ${WORKDIR}/50-org.freedesktop.timedate1.rules ${D}${sysconfdir}/polkit-1/rules.d | ||
11 | } | ||
12 | |||
13 | USERADD_PACKAGES = "${PN}" | ||
14 | GROUPADD_PARAM_${PN} = "--system datetime" | ||