[OE-core] [PATCH] core: fix /sbin/nologin path

Christopher Larson kergoth at gmail.com
Thu May 31 18:26:30 UTC 2018


On Thu, May 31, 2018 at 10:25 AM Nicola Lunghi <nick83ola at gmail.com> wrote:

> In some yocto recipes the /sbin/nologin path is incorrectly set to
> /bin/nologin. set it to the correct path ${base_sbindir}/nologin
>
> Signed-off-by: Nicola Lunghi <nick83ola at gmail.com>
> ---
>  meta-selftest/files/static-passwd        | 20 ++++++++++----------
>  meta/classes/rootfs-postcommands.bbclass |  6 +++---
>  meta/recipes-core/systemd/systemd_237.bb | 19 +++++++++++--------
>  3 files changed, 24 insertions(+), 21 deletions(-)
>
> diff --git a/meta-selftest/files/static-passwd
> b/meta-selftest/files/static-passwd
> index 412f85d469..fe1f3247d4 100644
> --- a/meta-selftest/files/static-passwd
> +++ b/meta-selftest/files/static-passwd
> @@ -1,11 +1,11 @@
>  messagebus:x:500:500::/var/lib/dbus:/bin/false
> -systemd-bus-proxy:x:501:501::/:/bin/nologin
> -systemd-network:x:502:502::/:/bin/nologin
> -systemd-resolve:x:503:503::/:/bin/nologin
> -systemd-timesync:x:504:504::/:/bin/nologin
> -polkitd:x:505:505::/:/bin/nologin
> -avahi:x:509:509::/:/bin/nologin
> -avahi-autoipd:x:510:510::/:/bin/nologin
> -rpc:x:511:511::/:/bin/nologin
> -distcc:x:512:nogroup::/:/bin/nologin
> -rpcuser:x:513:513::/var/lib/nfs:/bin/nologin
> +systemd-bus-proxy:x:501:501::/:/sbin/nologin
> +systemd-network:x:502:502::/:/sbin/nologin
> +systemd-resolve:x:503:503::/:/sbin/nologin
> +systemd-timesync:x:504:504::/:/sbin/nologin
> +polkitd:x:505:505::/:/sbin/nologin
> +avahi:x:509:509::/:/sbin/nologin
> +avahi-autoipd:x:510:510::/:/sbin/nologin
> +rpc:x:511:511::/:/sbin/nologin
> +distcc:x:512:nogroup::/:/sbin/nologin
> +rpcuser:x:513:513::/var/lib/nfs:/sbin/nologin
> diff --git a/meta/classes/rootfs-postcommands.bbclass
> b/meta/classes/rootfs-postcommands.bbclass
> index a4e627fef8..0ee7391957 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -62,8 +62,8 @@ systemd_create_users () {
>         for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf
> ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
>                 [ -e $conffile ] || continue
>                 grep -v "^#" $conffile | sed -e '/^$/d' | while read type
> name id comment; do
> -               if [ "$type" = "u" ]; then
> -                       useradd_params="--shell /sbin/nologin"
> +               if [ "$type" = "u" ]; then:w
>

This won't run as is. ";then:w"
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180531/782eee23/attachment-0002.html>


More information about the Openembedded-core mailing list