summaryrefslogtreecommitdiff
blob: 3560839ab6a71436d6b4bf3809dfdc34ab15bf2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Index: dcop/dcopserver.cpp
===================================================================
RCS file: /home/kde/kdelibs/dcop/dcopserver.cpp,v
retrieving revision 1.170.2.1
diff -u -p -r1.170.2.1 dcopserver.cpp
--- dcop/dcopserver.cpp	6 Aug 2004 11:18:23 -0000	1.170.2.1
+++ dcop/dcopserver.cpp	2 Mar 2005 13:09:38 -0000
@@ -952,7 +952,7 @@ DCOPServer::DCOPServer(bool _suicide)
 	}
 
     char errormsg[256];
-    int orig_umask = umask(0); /*old libICE's don't reset the umask() they set */
+    int orig_umask = umask(077); /*old libICE's don't reset the umask() they set */
     if (!IceListenForConnections (&numTransports, &listenObjs,
 				  256, errormsg))
 	{
Index: dcop/KDE-ICE/Xtranssock.c
===================================================================
RCS file: /home/kde/kdelibs/dcop/KDE-ICE/Xtranssock.c,v
retrieving revision 1.10
diff -u -p -r1.10 Xtranssock.c
--- dcop/KDE-ICE/Xtranssock.c	2 Jun 2004 20:28:25 -0000	1.10
+++ dcop/KDE-ICE/Xtranssock.c	2 Mar 2005 13:09:38 -0000
@@ -940,6 +940,7 @@ TRANS(SocketUNIXCreateListener) (XtransC
 #endif
 
     unlink (sockname.sun_path);
+    (void) umask (oldUmask);
 
     if ((status = TRANS(SocketCreateListener) (ciptr,
 	(struct sockaddr *) &sockname, namelen)) < 0)
@@ -947,7 +948,6 @@ TRANS(SocketUNIXCreateListener) (XtransC
 	PRMSG (1,
     "SocketUNIXCreateListener: ...SocketCreateListener() failed\n",
 	    0, 0, 0);
-	(void) umask (oldUmask);
 	return status;
     }
 
@@ -965,7 +965,6 @@ TRANS(SocketUNIXCreateListener) (XtransC
         PRMSG (1,
         "SocketUNIXCreateListener: Can't allocate space for the addr\n",
 	    0, 0, 0);
-	(void) umask (oldUmask);
         return TRANS_CREATE_LISTENER_FAILED;
     }
 
@@ -973,8 +972,6 @@ TRANS(SocketUNIXCreateListener) (XtransC
     ciptr->addrlen = namelen;
     memcpy (ciptr->addr, &sockname, ciptr->addrlen);
 
-    (void) umask (oldUmask);
-
     return 0;
 }