Commit 700ef569 authored by Michael Banck's avatar Michael Banck

* debian/patches/35_gifsave_honor_umask.dpatch: New patch, honor the umask

    when saving a gif animation by changing the permissions accordingly
    afterwards; Closes: #724547.
parent cd439453
......@@ -4,6 +4,9 @@ qutemol (0.4.1~cvs20081111-3) UNRELEASED; urgency=low
* debian/patches/34_geometry_tab_sliders.dpatch: New patch, fixes the sliders
in the geometry tab; LP: #1178239.
* debian/patches/01_makefile.dpatch: Updated to explicity link with -lpng.
* debian/patches/35_gifsave_honor_umask.dpatch: New patch, honor the umask
when saving a gif animation by changing the permissions accordingly
afterwards; Closes: #724547.
-- Michael Banck <mbanck@debian.org> Tue, 01 Nov 2011 17:59:18 +0100
......
......@@ -32,3 +32,4 @@
32_stdio_includes.dpatch
33_format-security.dpatch
34_geometry_tab_sliders.dpatch
35_gifsave_honor_umask.dpatch
#! /bin/sh /usr/share/dpatch/dpatch-run
## 35_gifsave_honor_umask.dpatch by Michael Banck <mbanck@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Honor umask when saving a gif animation by changing the permissions
## DP: accordingly afterwards.
@DPATCH@
--- ./src/gifSave.cpp.orig 2013-10-06 18:15:49.335167635 +0200
+++ ./src/gifSave.cpp 2013-10-06 18:19:18.124244413 +0200
@@ -9,6 +9,8 @@
#include <gif_lib.h>
#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include <vector>
@@ -181,6 +183,10 @@
if (EGifCloseFile(GifFile) == GIF_ERROR) return false;
+ mode_t mask = umask(0);
+ umask(mask);
+ chmod(filename, mask ^ 0666);
+
return true;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment