[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/kcontrol/kfontinst/dbus
From: Craig Drummond <craig () kde ! org>
Date: 2010-01-19 21:11:09
Message-ID: 1263935469.822918.13831.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1077268 by craig:
Don't allow fonts to be disabled if the disabledfonts.xml file cannot be
written.
M +8 -1 Folder.cpp
M +1 -0 Folder.h
M +5 -0 FontInst.cpp
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/dbus/Folder.cpp #1077267:1077268
@@ -103,6 +103,13 @@
}
}
+bool Folder::allowToggling() const
+{
+ return Misc::fExists(itsDisabledCfg.name)
+ ? Misc::fWritable(itsDisabledCfg.name)
+ : Misc::dWritable(Misc::getDir(itsDisabledCfg.name));
+}
+
void Folder::loadDisabled()
{
if(itsDisabledCfg.dirty)
@@ -184,7 +191,7 @@
void Folder::saveDisabled()
{
- if(itsDisabledCfg.dirty && Misc::fWritable(itsDisabledCfg.name))
+ if(itsDisabledCfg.dirty)
{
KFI_DBUG << itsDisabledCfg.name;
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/dbus/Folder.h #1077267:1077268
@@ -75,6 +75,7 @@
void init(bool system, bool systemBus);
const QString & location() const { return \
itsLocation; } + bool allowToggling() const;
void loadDisabled();
void saveDisabled();
void setDisabledDirty() { \
itsDisabledCfg.dirty=true; }
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/dbus/FontInst.cpp #1077267:1077268
@@ -1007,6 +1007,11 @@
KFI_DBUG << "not authenticated";
emit status(pid, KIO::ERR_COULD_NOT_AUTHENTICATE);
}
+ else if(!theFolders[theSystemService ? FontInst::FOLDER_SYS : \
FontInst::FOLDER_USER].allowToggling()) + {
+ KFI_DBUG << "can not acces disabled file";
+ emit status(pid, KIO::ERR_WRITE_ACCESS_DENIED);
+ }
else
{
KFI_DBUG << "process";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic