Date: Wed, 18 Dec 1996 00:28:16 -0700 (MST) From: Marc Slemko <marcs@znep.com> To: hackers@freebsd.org Subject: any race conditions in this code? Message-ID: <Pine.BSF.3.95.961218002330.17637C-100000@alive.ampr.ab.ca>
next in thread | raw e-mail | index | archive | help
Off the top of my head: char *foo; foo = mktemp(strdup("/tmp/foo.XXXXXX")); if (mkdir(foo, DEFFILEMODE) != 0) { /* die a horrible death */ exit(1); } /* do something with the directory */ I don't see any race conditions in there that could cause a security problem; the mkdir could be made to fail, but then it simply exits. It isn't as if it were creating a file and writing to it. Anyone care to disagree?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961218002330.17637C-100000>