diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2013-06-18 11:01:36 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-06-20 12:28:00 +0200 |
commit | 010f75a8d052251fee1bb2d42f926693fade962c (patch) | |
tree | 08b45dae7e2ab9b69ba277e378e078d5f5df330f /meta-oe/recipes-extended | |
parent | 2ae8dbddf8385850a1526289b256c545736d4d8b (diff) | |
download | meta-openembedded-010f75a8d052251fee1bb2d42f926693fade962c.tar.gz |
polkit-group-rule-datetime: initial add
add user-group 'datetime' allowing members to change date/time/timezone settings
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
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" | ||