Fix CVE-2011-4029: File permission change vulnerability.
authorMatthieu Herrb <matthieu.herrb@laas.fr>
Mon, 17 Oct 2011 20:27:35 +0000 (22:27 +0200)
committerRami Ylimäki <rami.ylimaki@vincit.fi>
Fri, 17 Feb 2012 13:21:42 +0000 (15:21 +0200)
commitc3e36106c8f5b0f18169b57ccba2b7cc63b7c73e
treeb9655f3b6d9b53902cbdc498fbbb182a467a53b4
parent2afc568ec77105dbe2bcaa60906149f46b55faef
Fix CVE-2011-4029: File permission change vulnerability.

Use fchmod() to change permissions of the lock file instead
of chmod(), thus avoid the race that can be exploited to set
a symbolic link to any file or directory in the system.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
os/utils.c