[rocksndiamonds] 04/13: Imported Debian patch 3.3.0.1+dfsg1-2.2

Stephen Kitt skitt at moszumanska.debian.org
Sun Sep 20 20:49:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch master
in repository rocksndiamonds.

commit 3d9bbf11507eaabdcd4b8def79550b56088bb36e
Author: Igor Pashev <pashev.igor at gmail.com>
Date:   Sun May 13 19:44:35 2012 +0400

    Imported Debian patch 3.3.0.1+dfsg1-2.2
---
 debian/changelog                                |  7 ++++
 debian/patches/651620-world-writable-dirs.patch | 43 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 3 files changed, 51 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f886a6d..7f1858d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+rocksndiamonds (3.3.0.1+dfsg1-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixed permissions when creating directories (Closes: #651620)
+
+ -- Igor Pashev <pashev.igor at gmail.com>  Sun, 13 May 2012 19:44:35 +0400
+
 rocksndiamonds (3.3.0.1+dfsg1-2.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/patches/651620-world-writable-dirs.patch b/debian/patches/651620-world-writable-dirs.patch
new file mode 100644
index 0000000..22cc0a5
--- /dev/null
+++ b/debian/patches/651620-world-writable-dirs.patch
@@ -0,0 +1,43 @@
+Description: Don't play with directory permissions
+ The ~/.rocksndiamonds directory and its subdirectories
+ were created as writable to anybody
+ .
+ rocksndiamonds (3.3.0.1+dfsg1-2.2) unstable; urgency=low
+ .
+   * Non-maintainer upload.
+   * Fixed permissions when creating directories (Closes: #651620)
+Author: Igor Pashev <pashev.igor at gmail.com>
+Bug-Debian: http://bugs.debian.org/651620
+Origin: vendor
+Forwarded: no
+Last-Update: 2012-05-13
+
+--- rocksndiamonds-3.3.0.1+dfsg1.orig/src/libgame/setup.c
++++ rocksndiamonds-3.3.0.1+dfsg1/src/libgame/setup.c
+@@ -1438,26 +1438,10 @@ void createDirectory(char *dir, char *te
+      of USERDATA_DIR_MODE are not masked */
+   mode_t dir_mode = (permission_class == PERMS_PRIVATE ?
+ 		     DIR_PERMS_PRIVATE : DIR_PERMS_PUBLIC);
+-  mode_t last_umask = posix_umask(0);
+-  mode_t group_umask = ~(dir_mode & S_IRWXG);
+-  int running_setgid = posix_process_running_setgid();
+-
+-  /* if we're setgid, protect files against "other" */
+-  /* else keep umask(0) to make the dir world-writable */
+-
+-  if (running_setgid)
+-    posix_umask(last_umask & group_umask);
+-  else
+-    dir_mode |= MODE_W_ALL;
+ 
+   if (!fileExists(dir))
+     if (posix_mkdir(dir, dir_mode) != 0)
+       Error(ERR_WARN, "cannot create %s directory '%s'", text, dir);
+-
+-  if (permission_class == PERMS_PUBLIC && !running_setgid)
+-    chmod(dir, dir_mode);
+-
+-  posix_umask(last_umask);		/* restore previous umask */
+ }
+ 
+ void InitUserDataDirectory()
diff --git a/debian/patches/series b/debian/patches/series
index 98f8a6f..0613b9b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 fix-manpage-errors
 fix-shlibdeps-warning
+651620-world-writable-dirs.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/rocksndiamonds.git



More information about the Pkg-games-commits mailing list