Set umask explicitly before calling mkstemp().