]> code.ossystems Code Review - openembedded-core.git/commit
libnss-mdns: avoid race condition in postinst
authorPhil Blundell <philb@gnu.org>
Mon, 14 Nov 2011 13:06:51 +0000 (13:06 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 Jan 2012 16:39:03 +0000 (16:39 +0000)
commit2a2741c12196c34c5e6127488a8eeec7118b2952
treeba25233e190f745caa96af3151f7b826abf3daa2
parent4c2a9e410c46fbf52f3d64767baf06c7146d001e
libnss-mdns: avoid race condition in postinst

Writing to "/tmp/nsswitch.conf" leads to a race condition if two
copies of the postinst are running simultaneously.  Fix this by
modifying /etc/nsswitch.conf in place using sed -i.  Also make the
same change to the prerm for consistency although the race will not
occur here in practice.

(From OE-Core rev: 689884653938b98899fb3ba791221fdbe2f40e7f)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb