diff options
| author | Markus Volk <f_l_k@t-online.de> | 2024-08-14 10:29:25 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-01 12:28:10 +0100 |
| commit | ef9a927a3af1dd817fe298bbe45470b738d9ce2f (patch) | |
| tree | ac392d1e5ebcb60c964d423001c9e8ce4a642f58 | |
| parent | 8621dbc2afb4d32e371a2215d2ee384af759d633 (diff) | |
| download | poky-ef9a927a3af1dd817fe298bbe45470b738d9ce2f.tar.gz | |
systemd: dont set polkit permissions manually
According to this commit polkit rules should go to ${datadir} instead of ${sysconfdir}:
https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=d5e90541f8e35916abc930b2da6de037b23d51a1
Theres no need to adjust the permissions for ${datadir} anymore:
https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=6da0fd21c900e32a0693a6b27d38182f19c8c76c
Dont set polkit permissions manually. This allows to drop the manually
set polkit permissions for all files in meta-openembedded and also for
libvirt in meta-virtualization.
In addition, manually setting the permissions would not be needed for
new recipes anymore.
(From OE-Core rev: d27961962d2c8456d9a90148943d4282494146c2)
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/systemd/systemd_256.5.bb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/meta/recipes-core/systemd/systemd_256.5.bb b/meta/recipes-core/systemd/systemd_256.5.bb index 1485614c71..1d45670780 100644 --- a/meta/recipes-core/systemd/systemd_256.5.bb +++ b/meta/recipes-core/systemd/systemd_256.5.bb | |||
| @@ -368,14 +368,6 @@ do_install() { | |||
| 368 | rm -r ${D}${sysconfdir}/X11 | 368 | rm -r ${D}${sysconfdir}/X11 |
| 369 | fi | 369 | fi |
| 370 | 370 | ||
| 371 | # If polkit is setup fixup permissions and ownership | ||
| 372 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
| 373 | if [ -d ${D}${datadir}/polkit-1/rules.d ]; then | ||
| 374 | chmod 700 ${D}${datadir}/polkit-1/rules.d | ||
| 375 | chown polkitd:root ${D}${datadir}/polkit-1/rules.d | ||
| 376 | fi | ||
| 377 | fi | ||
| 378 | |||
| 379 | # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to | 371 | # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to |
| 380 | # request hostname changes via DBUS without elevating its privileges | 372 | # request hostname changes via DBUS without elevating its privileges |
| 381 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then | 373 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then |
| @@ -471,7 +463,7 @@ GROUPADD_PARAM:udev = "-r render" | |||
| 471 | GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" | 463 | GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" |
| 472 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" | 464 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" |
| 473 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" | 465 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" |
| 474 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" | 466 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 polkitd;', '', d)}" |
| 475 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" | 467 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" |
| 476 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" | 468 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" |
| 477 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'oomd', '--system -d / -M --shell /sbin/nologin systemd-oom;', '', d)}" | 469 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'oomd', '--system -d / -M --shell /sbin/nologin systemd-oom;', '', d)}" |
