Skip to content

useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd

[email protected] openembedded-core 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupaddmeta/classes/useradd.bbclass+83 -1170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] useradd.bbclass: use locking of bb.utils to avoid lock race issue of useradd/groupadd

From: Jackie Huang <[email protected]>

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]

---
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(-)
Signature · 1 line
1.7.4