summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2013-06-18 10:57:37 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-06-20 12:28:00 +0200
commit2ae8dbddf8385850a1526289b256c545736d4d8b (patch)
treea1eeef15e88b0fbafcd06c7d1d23b349e4b3f8c4 /meta-oe/recipes-extended
parent79b7cbaaee97d15b5573f472aea99a45d449d5fe (diff)
downloadmeta-openembedded-2ae8dbddf8385850a1526289b256c545736d4d8b.tar.gz
polkit-group-rule-network: initial add
add user-group 'network' allowing memebers to change networkmanager 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.NetworkManager.rules8
-rw-r--r--meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb14
2 files changed, 22 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/polkit/files/50-org.freedesktop.NetworkManager.rules b/meta-oe/recipes-extended/polkit/files/50-org.freedesktop.NetworkManager.rules
new file mode 100644
index 000000000..4b50cf881
--- /dev/null
+++ b/meta-oe/recipes-extended/polkit/files/50-org.freedesktop.NetworkManager.rules
@@ -0,0 +1,8 @@
1/* give group 'network' rights to change settings */
2/* taken from https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions */
3
4polkit.addRule(function(action, subject) {
5 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {
6 return polkit.Result.YES;
7 }
8});
diff --git a/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb b/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb
new file mode 100644
index 000000000..bba113699
--- /dev/null
+++ b/meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb
@@ -0,0 +1,14 @@
1DESCRIPTION = "Create usergroup network. All members off this group are allowed to modify networkmanager settings"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
4
5require polkit-group-rule.inc
6
7SRC_URI = "file://50-org.freedesktop.NetworkManager.rules"
8
9do_install() {
10 install -m 0755 ${WORKDIR}/50-org.freedesktop.NetworkManager.rules ${D}${sysconfdir}/polkit-1/rules.d
11}
12
13USERADD_PACKAGES = "${PN}"
14GROUPADD_PARAM_${PN} = "--system network"