]> 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>
Tue, 15 Nov 2011 12:20:56 +0000 (12:20 +0000)
commit689884653938b98899fb3ba791221fdbe2f40e7f
tree79ed59eae44e8a31ebbf8fa2fb1e8f0bcbed8831
parente7090743df6b38e9ce73743b5bbdd8ab6e9cada4
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.

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