X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=lib%2Ffile%2Ffile.c;h=b575d343150ebbb246d8c0ccf5961a68fd434708;hb=17d9d54a46beab44db751b9bcf7f289b9bf101cf;hp=57a251901a5afd1dbc1234313af2b1827d65f685;hpb=abf92c05c31955333719f1a83cffb0d0d194c770;p=petitboot diff --git a/lib/file/file.c b/lib/file/file.c index 57a2519..b575d34 100644 --- a/lib/file/file.c +++ b/lib/file/file.c @@ -44,7 +44,6 @@ int copy_file_secure_dest(void *ctx, const char *source_file, unsigned char *buffer; ssize_t r; size_t l1; - mode_t oldmask; source_handle = fopen(source_file, "r"); if (!source_handle) { @@ -53,9 +52,7 @@ int copy_file_secure_dest(void *ctx, const char *source_file, return -1; } - oldmask = umask(0644); destination_fd = mkstemp(template); - umask(oldmask); if (destination_fd < 0) { pb_log("%s: unable to create temp file, %m\n", __func__); fclose(source_handle);