Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd
@ 2012-07-22  6:53 jackie.huang
  2012-07-22  6:53 ` [PATCH 1/1] " jackie.huang
  0 siblings, 1 reply; 9+ messages in thread
From: jackie.huang @ 2012-07-22  6:53 UTC (permalink / raw)
  To: openembedded-core

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




^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd
@ 2012-07-22 12:01 jackie.huang
  2012-07-22 12:01 ` [PATCH 1/1] " jackie.huang
  0 siblings, 1 reply; 9+ messages in thread
From: jackie.huang @ 2012-07-22 12:01 UTC (permalink / raw)
  To: openembedded-core

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 1eae5b6c87cd4f825dba9d2526b34231d33b1e92:

  python-native: Use append instead of += so the lsb override for EXTRA_OECONF works as expected (2012-07-22 12:07:53 +0100)

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

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

 meta/classes/useradd.bbclass |  200 +++++++++++++++++------------------------
 1 files changed, 83 insertions(+), 117 deletions(-)

-- 
1.7.4




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-07-24  2:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-22  6:53 [PATCH 0/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd jackie.huang
2012-07-22  6:53 ` [PATCH 1/1] " 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
2012-07-22 12:01 ` [PATCH 1/1] " jackie.huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox