]> granicus.if.org Git - mutt/commitdiff
Use O_NOFOLLOW when it's there, and needed.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 2 Feb 2000 07:56:18 +0000 (07:56 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 2 Feb 2000 07:56:18 +0000 (07:56 +0000)
lib.c

diff --git a/lib.c b/lib.c
index fb80d5f387b74ca49b37375a6e7983e0c9dd7bab..1d56365e960abf5347bc6cfa73a6c30e9c44bfe3 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -354,6 +354,10 @@ FILE *safe_fopen (const char *path, const char *mode)
     int fd;
     int flags = O_CREAT | O_EXCL;
 
+#ifdef O_NOFOLLOW
+    flags |= O_NOFOLLOW;
+#endif
+
     if (mode[1] == '+')
       flags |= O_RDWR;
     else