~ubuntu-branches/ubuntu/wily/maradns/wily-proposed

« back to all changes in this revision

Viewing changes to deadwood-3.2.05/update/3.2.03/deadwood-3.2.02-missing_chdir_message.patch

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski, Tomasz Buchert, Dariusz Dwornikowski
  • Date: 2015-03-27 18:34:08 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20150327183408-wnfachdkdjt96yu6
Tags: 2.0.11-1
[ Tomasz Buchert ]
* Imported Upstream version 2.0.11

[ Dariusz Dwornikowski ]
* d/patches: 
  - refreshed all patches for new deadwood version
  - removed generating of random prime on build (Closes: #785536) 
* d/rules: date taken from changelog (Closes: #785535)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- deadwood-3.2.03/src/DwSys.c.orig    2012-09-22 11:00:56.118909325 -0500
2
 
+++ deadwood-3.2.03/src/DwSys.c 2012-09-22 11:04:32.292701151 -0500
3
 
@@ -631,7 +631,8 @@
4
 
 
5
 
 /* Drop privileges and become unprivileged user */
6
 
 void sandbox() {
7
 
-#if ! (defined MINGW || defined __CYGWIN__)
8
 
+#ifndef MINGW 
9
 
+#ifndef __CYGWIN__
10
 
         unsigned char *c = 0;
11
 
         gid_t g = DW_UID;
12
 
         if(key_s[DWM_S_chroot_dir] == 0) {
13
 
@@ -642,13 +643,14 @@
14
 
                 dw_fatal("Converting chroot_dir to string failed");
15
 
         }
16
 
         if(chdir((char *)c) != 0) {
17
 
+                printf("There is no directory %s\n",(char *)c);
18
 
                 dw_fatal("chdir() failed");
19
 
         }
20
 
 #ifndef QNX
21
 
         if(chroot((char *)c) == -1) {
22
 
                 dw_fatal("chroot() failed");
23
 
         }
24
 
-#endif
25
 
+#endif /* QNX */
26
 
         if(setgroups(1,&g) == -1) {
27
 
                 dw_fatal("setgroups() failed");
28
 
         }
29
 
@@ -667,6 +669,7 @@
30
 
                 c = 0;
31
 
         }
32
 
         return;
33
 
+#endif /* __CYGWIN__ */
34
 
 #endif /* MINGW */
35
 
 }
36