Skip to contentSkip to conversation

polkit-group-rule: Add polkitd user and group

PATCH In review Ash Charles 2 participants 2 messages Jan 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 polkit-group-rule: Add polkitd user and group

Recipes including polkit-group-rule.inc correctly install a directory with the user and group set as 'polkitd'. To avoid warnings like these when assemblying the rootfs,

WARNING: log_check: warning: user polkitd does not exist - using root
...
WARNING: log_check: warning: group polkitd does not exist - using root

create this user and group.

Note: although the polkit recipe itself, on which this depends, is
creating this same user and group, it seems that the useradd class needs this to be specified independently.

---
 meta-oe/recipes-extended/polkit/polkit-group-rule.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/polkit/polkit-group-rule.inc +1 -0
index 8d1a89a..3435e93 100644
@@ -7,3 +7,4 @@ do_install_prepend() {
     install -m 700 -d ${D}${sysconfdir}/polkit-1/rules.d
     chown polkitd:polkitd ${D}${sysconfdir}/polkit-1/rules.d
 }
+USERADD_PARAM_${PN}_prepend = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;"
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw
Quoted 29 lines · Ash Charles

Recipes including polkit-group-rule.inc correctly install a directory with the user and group set as 'polkitd'. To avoid warnings like these when assemblying the rootfs,

WARNING: log_check: warning: user polkitd does not exist - using root
...
WARNING: log_check: warning: group polkitd does not exist - using root

create this user and group.

Note: although the polkit recipe itself, on which this depends, is
creating this same user and group, it seems that the useradd class needs this to be specified independently.

---
 meta-oe/recipes-extended/polkit/polkit-group-rule.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/polkit/polkit-group-rule.inc +1 -1
index 8d1a89a..3435e93 100644
@@ -7,3 +7,4 @@ do_install_prepend() {
     install -m 700 -d ${D}${sysconfdir}/polkit-1/rules.d
     chown polkitd:polkitd ${D}${sysconfdir}/polkit-1/rules.d
 }
+USERADD_PARAM_${PN}_prepend = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;"
--
Quoted 2 lines

2.1.0