All of lore.kernel.org
 help / color / mirror / Atom feed
From: <jackie.huang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 0/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd
Date: Sun, 22 Jul 2012 14:53:02 +0800	[thread overview]
Message-ID: <cover.1342939738.git.jackie.huang@windriver.com> (raw)

From: Jackie Huang <jackie.huang@windriver.com>

A race condition can occur when adding users and groups to the
passwd and group files, in [YOCTO #1794], 10 times retry added
but it is not fixed completely.

This fix re-writes the useradd_preinst and useradd_sysroot with
python and use locking of bb.utils to lock the passwd and group
files before executing useradd/groupadd commands to avoid the
lock race themselves.

[YOCTO #2779]

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
The following changes since commit 4bce3417917a3e88ba6529db394525fba82e0699:

  EFI: Make installer EFI aware (2012-07-19 17:48:53 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib jhuang0/yocto_2779_groupadd_0722
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/yocto_2779_groupadd_0722

Jackie Huang (1):
  useradd.bbclass: use locking of bb.utils to avoid lock race issue of
    useradd/groupadd

 meta/classes/useradd.bbclass |  284 ++++++++++++++++++------------------------
 1 files changed, 124 insertions(+), 160 deletions(-)

-- 
1.7.4




             reply	other threads:[~2012-07-22  7:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-22  6:53 jackie.huang [this message]
2012-07-22  6:53 ` [PATCH 1/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd jackie.huang
2012-07-22  8:36   ` Richard Purdie
2012-07-22 12:10     ` Huang, Jie (Jackie)
2012-07-23  1:56       ` Randy MacLeod
2012-07-23  3:24         ` Randy MacLeod
2012-07-23 10:09   ` Richard Purdie
2012-07-24  1:59     ` jhuang0
  -- strict thread matches above, loose matches on Subject: below --
2012-07-22 12:01 [PATCH 0/1] " jackie.huang

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=cover.1342939738.git.jackie.huang@windriver.com \
    --to=jackie.huang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.