#include <fstream>
#include <utility>
#include <cerrno>
+#include <sys/stat.h>
#include <termios.h> //termios, TCSANOW, ECHO, ICANON
#include "opensslsigners.hh"
#ifdef HAVE_LIBSODIUM
cerr << "Zone '" << zone << "' not found!" << endl;
return EXIT_FAILURE;
}
+
+ /* ensure that the temporary file will only
+ be accessible by the current user, not even
+ by other users in the same group, and certainly
+ not by other users.
+ */
+ umask(S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
vector<DNSRecord> pre, post;
char tmpnam[]="/tmp/pdnsutil-XXXXXX";
int tmpfd=mkstemp(tmpnam);