Skip to contentSkip to conversation

polkit: Add --shell /bin/nologin to polkitd user

PATCH New Akash Hadke 1 participant 1 message Jul 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 polkit: Add --shell /bin/nologin to polkitd user

polkitd user has default access to /bin/sh, add --shell /bin/nologin to remove default access to /bin/sh and avoid login through it.

---
 meta-oe/recipes-extended/polkit/polkit_0.119.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/polkit/polkit_0.119.bb +1 -1
index bf160053d9..4ce5f0e045 100644
@@ -71,7 +71,7 @@ FILES:${PN}:append = " \
 FILES:${PN}-examples = "${bindir}/*example*"
 
 USERADD_PACKAGES = "${PN}"
-USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 polkitd"
+USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd"
 
 SYSTEMD_SERVICE:${PN} = "${BPN}.service"
 SYSTEMD_AUTO_ENABLE = "disable"
Signature · 1 line
2.17.1