From e75369a727da896fa716b755a145f95c61bf2116 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 16 Jan 2007 21:40:14 +0000 Subject: Add O_NOFOLLOW to file write call, which prevents following of symlinks making our temp file writing completely secure git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6358 e03df62e-2008-0410-955e-edbf42e46eb7 --- make/utilities.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'make') diff --git a/make/utilities.pm b/make/utilities.pm index dc755c63f..34d7b8c86 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -153,7 +153,7 @@ sub translate_functions($$) do { $tmpfile = tmpnam(); - } until sysopen(TF, $tmpfile, O_RDWR|O_CREAT|O_EXCL, 0700); + } until sysopen(TF, $tmpfile, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0700); print "(Created and executed \033[1;32m$tmpfile\033[0m)\n"; print TF $1; close TF; -- cgit v1.2.3