Fix broken umask (we had the bits inverted).
[cubemap] / util.cpp
index 1b76962..25a8da4 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -13,7 +13,7 @@ using namespace std;
 int make_tempfile(const std::string &contents)
 {
        char filename[] = "/tmp/cubemap.XXXXXX";
-       mode_t old_umask = umask(0600);
+       mode_t old_umask = umask(077);
        int fd = mkstemp(filename);
        umask(old_umask);
        if (fd == -1) {