~ubuntu-branches/ubuntu/oneiric/libinfinity/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/0002-infinoted-set-umask-when-using-libdaemon.patch

  • Committer: Bazaar Package Importer
  • Author(s): Philipp Kern
  • Date: 2011-04-03 15:50:33 UTC
  • mfrom: (1.2.4 upstream) (1.4.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110403155033-eqntz262lxzt0d8s
Tags: 0.5.0-2
* Fix infinoted postinst and prerm.  (Closes: #620687)
* Updated debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From a3e11e465faf2087098465ca4c1f90e3afb9463d Mon Sep 17 00:00:00 2001
2
 
From: Benjamin Herr <ben@0x539.de>
3
 
Date: Fri, 5 Mar 2010 11:40:19 +0100
4
 
Subject: [PATCH 2/4] infinoted: set umask when using libdaemon
5
 
 
6
 
2010-03-05  Benjamin Herr  <ben@0x539.de>
7
 
 
8
 
        * infinoted/infinoted-main.c: Call umask(077) explicitly after
9
 
        forking since libdaemon < 0.14 sets the mask to 0777.
10
 
---
11
 
 ChangeLog                  |    5 +++++
12
 
 infinoted/infinoted-main.c |    6 ++++++
13
 
 2 files changed, 11 insertions(+), 0 deletions(-)
14
 
 
15
 
diff --git a/infinoted/infinoted-main.c b/infinoted/infinoted-main.c
16
 
index 92c533f..829242b 100644
17
 
--- a/infinoted/infinoted-main.c
18
 
+++ b/infinoted/infinoted-main.c
19
 
@@ -123,6 +123,12 @@ infinoted_main_run(InfinotedStartup* startup,
20
 
 
21
 
       daemon_retval_send(0);
22
 
     }
23
 
+
24
 
+    /* libdaemon < 0.14 sets our umask to 0777, preventing the file storage
25
 
+     * backend from working correctly. 0.14 uses 0077, but the documentation
26
 
+     * still says 0777, and, anyway, 0.14 does not seem widespread enough
27
 
+     * right now. */
28
 
+    umask(0077);
29
 
   }
30
 
 #endif
31
 
 
32
 
1.7.1
33