diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2013-06-18 10:57:37 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-06-20 12:28:00 +0200 |
commit | 2ae8dbddf8385850a1526289b256c545736d4d8b (patch) | |
tree | a1eeef15e88b0fbafcd06c7d1d23b349e4b3f8c4 /meta-oe/recipes-extended | |
parent | 79b7cbaaee97d15b5573f472aea99a45d449d5fe (diff) | |
download | meta-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.rules | 8 | ||||
-rw-r--r-- | meta-oe/recipes-extended/polkit/polkit-group-rule-network.bb | 14 |
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 | |||
4 | polkit.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 @@ | |||
1 | DESCRIPTION = "Create usergroup network. All members off this group are allowed to modify networkmanager settings" | ||
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.NetworkManager.rules" | ||
8 | |||
9 | do_install() { | ||
10 | install -m 0755 ${WORKDIR}/50-org.freedesktop.NetworkManager.rules ${D}${sysconfdir}/polkit-1/rules.d | ||
11 | } | ||
12 | |||
13 | USERADD_PACKAGES = "${PN}" | ||
14 | GROUPADD_PARAM_${PN} = "--system network" | ||