Bug 113889 - Wallpaper can be changed when desktop has been locked down
Summary: Wallpaper can be changed when desktop has been locked down
Status: CLOSED UNMAINTAINED
Alias: None
Product: kdesktop
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR grave
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 13:38 UTC by Martin Woolley
Modified: 2009-01-02 20:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Check if associated config entry is immutable (11.36 KB, patch)
2005-11-12 16:18 UTC, Kevin Krammer
Details
Improved patch for bgsettings.h/.cpp (20.90 KB, patch)
2005-11-12 19:51 UTC, Kevin Krammer
Details
Check if setWallpaper is allowed (3.30 KB, patch)
2005-11-13 16:17 UTC, Kevin Krammer
Details
New bgsettings.h/.cpp patch (20.82 KB, patch)
2005-11-15 20:26 UTC, Kevin Krammer
Details
Check if setting wallpaper, cache or common is allowed (6.32 KB, patch)
2005-11-16 00:37 UTC, Kevin Krammer
Details
React on changes to the access restrictions (4.71 KB, patch)
2005-11-16 00:39 UTC, Kevin Krammer
Details
Add canSetWallpaper to DCOP interface (670 bytes, patch)
2005-11-16 00:40 UTC, Kevin Krammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Woolley 2005-10-05 13:38:17 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Fedora RPMs
OS:                Linux

In /usr/share/config/kdesktoprc we set-up :

[Background Common]
CommonDesktop[$i]=true

[Desktop0][$i]
Wallpaper=/usr/share/backgrounds/images/default.png

to make the wallpaper immutable.

Users are still able to change their wallpaper in two ways :
Method one: an image may be dragged and dropped from konqueror file browser and the option "Set as Wallpaper" is active on the popup menu.
Method two: KolourPaint includes options on the file menu to save an image as the wallpaper.

If the users logoff and logon again, their wallpaper has reverted to that set in /usr/share/config/kdesktoprc however we expect users to not be able to change their wallpaper at all if the desktop has been locked down.
Comment 1 Thiago Macieira 2005-10-06 13:31:06 UTC
Kiosk security problem -> raising severity.

Martin: can you open a bug report for KolourPaint as well?
Comment 2 Clarence Dang 2005-11-08 12:31:37 UTC
Bug #113969 is the KolourPaint bug.

Could the kdesktop developers please add an interface (DCOP?) that:

1. tells me whether the user is authorised to change wallpaper
2. signals programs when authorisation to change wallpaper is changed (i.e. user can now change wallpaper but could not before)
Comment 3 Kevin Krammer 2005-11-12 16:18:26 UTC
Created attachment 13400 [details]
Check if associated config entry is immutable

First attempt at fixing the bug.

Denies changing the properties if the respective config entry is set to be
immutable (or the group or whole config)

Tested changing wallpaper by DCOP and D&D, but none of the other properties
Comment 4 Kevin Krammer 2005-11-12 19:51:36 UTC
Created attachment 13406 [details]
Improved patch for bgsettings.h/.cpp

Fixes a bug in the previous patch.

Also moves the immutable check to separate methods so that it can be queried
from outside.
Removes the logging, this can now be done in the applications using the
classes, which means when included in KControl it doesn't log as kdesktop as
the previous patch did.

Setter methods still call the canSetXXX methods themselves to make sure they do
not change immutable settings.
Comment 5 Kevin Krammer 2005-11-13 16:17:03 UTC
Created attachment 13415 [details]
Check if setWallpaper is allowed 

Adds checks to the setWallpaper methods of KDesktop's background manager, e.g
to the methods that are the implementations of the DCOP interface
KBackgroundIface.

Also adds kdDebug output in the case the setting is not allowed.
Might it be better to use kdWarn?

Methods canSetWallpaper() and canSetWallpaper(int desk) could be included in
the DCOP interface, but this would require adding virtual methods to
KBackgroundIface.h and I wasn't sure about the binary compatability policy of
application classes like background manager.

The context menu action for setting the wallpaper seems to come somewhere from
libkonq, maybe someone who knows there way around there could have a look at
this if hiding/disabling the action is required.
Comment 6 Kevin Krammer 2005-11-15 20:26:16 UTC
Created attachment 13477 [details]
New bgsettings.h/.cpp patch

Using KConfigGroup instead of KConfigGroupSaver after someone on kde-core-devel
pointed out that it would be better for KDE4 porting.
Comment 7 Kevin Krammer 2005-11-15 22:42:38 UTC
Hmm, kdesktop uses a KConfigXT generated class for the global values but doesn't check their restrictions.

Reworking patch stay tuned
Comment 8 Kevin Krammer 2005-11-16 00:37:07 UTC
Created attachment 13482 [details]
Check if setting wallpaper, cache or common is allowed

This has the checks for the restrictable properties and also some modifications
to notify the KDesktop class when the configuration changes.

This is used in the desktop patch to adjust the icon view's maySetWallpaper
property
Comment 9 Kevin Krammer 2005-11-16 00:39:11 UTC
Created attachment 13483 [details]
React on changes to the access restrictions

Uses the signals provided by the background manager to adjust action
visibility.
Comment 10 Kevin Krammer 2005-11-16 00:40:36 UTC
Created attachment 13484 [details]
Add canSetWallpaper to DCOP interface

Optional patch that allows querying the setWallpaper restriction status through
DCOP
Comment 11 FiNeX 2008-12-10 02:07:08 UTC
Kdesktop is no more mantained. Fortunatly this bug seems not to be valid for KDE 4. Please reopen if this bug is not a kdesktop one (and it is not solved) or it can be reproduced on KDE 4.
Comment 12 FiNeX 2009-01-02 20:31:34 UTC
Bug closed. Kdesktop is no more mantained.