Blame SOURCES/qt-x11-free-3.3.7-umask.patch

106311
--- qt-x11-free-3.3.7/src/tools/qsettings.cpp.tn	2006-11-09 20:53:25.000000000 +0100
106311
+++ qt-x11-free-3.3.7/src/tools/qsettings.cpp	2006-11-09 20:59:53.000000000 +0100
106311
@@ -994,7 +994,10 @@
106311
 #endif
106311
 
106311
 	QFile file( filename + ".tmp" );
106311
-	if (! file.open(IO_WriteOnly)) {
106311
+	mode_t old_umask = umask(0022);
106311
+	bool f = file.open(IO_WriteOnly);
106311
+	umask(old_umask);
106311
+	if (! f) {
106311
 
106311
 #ifdef QT_CHECK_STATE
106311
 	    qWarning("QSettings::sync: failed to open '%s' for writing",