Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support/mkusers: Preserve group members
Date: Mon, 10 Sep 2018 17:24:31 +0200	[thread overview]
Message-ID: <20180910152431.GC2674@scaer> (raw)
In-Reply-To: <20180903131116.5404-1-johan.oudinet@gmail.com>

Johan, All,

On 2018-09-03 15:11 +0200, Johan Oudinet spake thusly:
> When the function add_one_group is called on an existing group,
> make sure the members of this group are not removed in the process of
> deleting then re-adding the group.
> 
> Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
[--SNIP--]
> +    members=$(get_members "$group")
>      # Remove any previous instance of this group, and re-add the new one
>      sed -i --follow-symlinks -e '/^'"${group}"':.*/d;' "${GROUP}"
> -    printf "%s:x:%d:\n" "${group}" "${gid}" >>"${GROUP}"
> +    printf "%s:x:%d:%s\n" "${group}" "${gid}" "$members" >>"${GROUP}"

The variables should all be derefernced with accolades: $(members)

With that fixed when applying, my previous reviewed-by stands.

Regards,
Yann E. MORIN.

>  
>      # Ditto for /etc/gshadow if it exists
>      if [ -f "${GSHADOW}" ]; then
> -- 
> 2.17.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2018-09-10 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 13:11 [Buildroot] [PATCH] support/mkusers: Preserve group members Johan Oudinet
2018-09-10 15:22 ` Yann E. MORIN
2018-09-10 15:24 ` Yann E. MORIN [this message]
2018-09-12 19:33 ` Thomas Petazzoni
2018-10-01 19:21 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180910152431.GC2674@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox