Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 5/5] useradd-staticids.bbclass: Read passwd/group files before parsing
Date: Tue, 3 Nov 2015 18:32:43 -0600	[thread overview]
Message-ID: <5639522B.5050604@windriver.com> (raw)
In-Reply-To: <d2e824d17dae9f9583a11ee2165096e7cff533b0.1446595453.git.pkj@axis.com>

On 11/3/15 6:06 PM, Peter Kjellerstedt wrote:
> Read and merge the passwd/group files before parsing the user and
> group definitions. This means they will only be read once per
> recipe. This solves a problem where if a user was definied in multiple
> files, it could generate group definitions for groups that should not
> be created. E.g., if the first passwd file read defines a user as:
> 
> foobar::1234::::
> 
> and the second passwd file defines it as:
> 
> foobar:::nogroup:The foobar user:/:/bin/sh
> 
> then a foobar group would be created even if the user will use the
> nogroup as its primary group.

One minor thing

> @@ -251,7 +269,7 @@ def update_useradd_static_config(d):
>  
>              newparams.append(newparam)
>  
> -        return " ;".join(newparams).strip()
> +        return ";".join(newparams).strip()
>  
>      # Load and process the users and groups, rewriting the adduser/addgroup params
>      useradd_packages = d.getVar('USERADD_PACKAGES', True)
> 

The space was required because you could generate a user/group add line that
ended with a string.  Without the space, you could end up merging two sets of
arguments causing a failure condition.

So I think that it should be retained unless there is a specific reason you
believe it should be removed.


  reply	other threads:[~2015-11-04  4:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  0:06 [PATCH 0/5] Improvements for useradd-staticids.bbclass Peter Kjellerstedt
2015-11-04  0:06 ` [PATCH 1/5] useradd-staticids.bbclass: Treat mutually exclusive options as such Peter Kjellerstedt
2015-11-04  0:06 ` [PATCH 2/5] useradd-staticids.bbclass: Make --no-user-group have effect Peter Kjellerstedt
2015-11-04  0:06 ` [PATCH 3/5] useradd-staticids.bbclass: Simplify some logic Peter Kjellerstedt
2015-11-04  0:06 ` [PATCH 4/5] useradd-staticids.bbclass: Simplify the logic for when to add groups Peter Kjellerstedt
2015-11-04  0:06 ` [PATCH 5/5] useradd-staticids.bbclass: Read passwd/group files before parsing Peter Kjellerstedt
2015-11-04  0:32   ` Mark Hatle [this message]
2015-11-06 20:09     ` Peter Kjellerstedt
2015-11-06 20:14       ` Mark Hatle
2015-11-10 15:54         ` Peter Kjellerstedt
2015-11-10 16:07           ` Mark Hatle
2015-11-13 12:51             ` Peter Kjellerstedt
2015-11-24  9:36               ` Peter Kjellerstedt
2015-11-04  0:33 ` [PATCH 0/5] Improvements for useradd-staticids.bbclass Mark Hatle

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=5639522B.5050604@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    /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