diff options
-rw-r--r-- | WHATSNEW.txt | 7 | ||||
-rw-r--r-- | lib/util/util_file.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/WHATSNEW.txt b/WHATSNEW.txt index cc43b29b3d1..376cd2862f1 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -53,6 +53,13 @@ cryptography effectively wraps bad cryptography, but for now that above applies. +"net ads kerberos pac save" and "net eventlog export" +----------------------------------------------------- + +The "net ads kerberos pac save" and "net eventlog export" tools will +no longer silently overwrite an existing file during data export. If +the filename given exits, an error will be shown. + REMOVED FEATURES ================ diff --git a/lib/util/util_file.c b/lib/util/util_file.c index 5260ee9d721..0c890f9b5ea 100644 --- a/lib/util/util_file.c +++ b/lib/util/util_file.c @@ -329,7 +329,7 @@ _PUBLIC_ bool file_save_mode(const char *fname, const void *packet, { ssize_t num_written; int fd; - fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, mode); + fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, mode); if (fd == -1) { return false; } |