The gencert.sh script, when installing OpenLDAP before 2.1.30-r10, 2.2.x before 2.2.28-r7, and 2.3.x before 2.3.30-r2 as an ebuild in Gentoo Linux, does not create temporary directories in /tmp securely during emerge, which allows local users to overwrite arbitrary files via a symlink attack.
http://www.vupen.com/english/advisories/2007/0305
http://www.securityfocus.com/bid/22195
http://security.gentoo.org/glsa/glsa-200701-19.xml