summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/tqt3/tqt3-3.4.0-umask.patch
blob: 9c24f99036877c4b9939e4f9be43c677c4521a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- tqt3/src/tools/qsettings.cpp.umask	2012-02-13 19:10:01.000000000 +0100
+++ tqt3/src/tools/qsettings.cpp	2012-02-13 19:28:00.802555882 +0100
@@ -997,7 +997,10 @@
 #endif
 
 	TQFile file( filename + ".tmp" );
-	if (! file.open(IO_WriteOnly)) {
+	mode_t old_umask = umask(0022);
+	bool f = file.open(IO_WriteOnly);
+	umask(old_umask);
+	if (! f) {
 
 #ifdef QT_CHECK_STATE
 	    qWarning("TQSettings::sync: failed to open '%s' for writing",