diff --git a/wrapper.c b/wrapper.c index 43a63a2..bdf565b 100644 --- a/wrapper.c +++ b/wrapper.c @@ -4,6 +4,7 @@ #include #include +#include #include #ifdef MINGW32 @@ -20,11 +21,14 @@ static void die( const char *err) { /* Function copyright: git */ void xmkstemp( char *template) { int fd ; + mode_t o_mask ; + o_mask = umask( 0177) ; fd = mkstemp( template) ; if( fd < 0) die( "Unable to create temporary file") ; + umask( o_mask) ; close( fd) ; }