Creating a RProperty with custom Category

Login to reply to this topic.
Thu, 2007-12-20 18:20
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1913

Hello everybody,

I am currently struggling against PlatSec and the Publish&Subscribe API. I am trying to define a property which has to be accessed by two different processes. Thus, I have registered a UID value and try to define it with the following code:

const TUid KMobileServerProperty= {0x2000yyyy};
enum {
	EPropertyMyProperty,
};
...
TInt err = RProperty::Define(KMobileServerProperty,EPropertyMyProperty, RProperty::EInt);

My process has WriteDeviceData capability so I assume I can create such property. However, I always get a KErrPermissionDenied error and the debug log shows the following error:

*PlatSec* WARNING - Secure Id Check would have failed - Process MobileServer[2000xxxx]0001 attempted an operation requiring the secure id: 2000yyyy. Additional diagnostic message: Checked whilst trying to Define a Publish and Subscribe Property

Do that mean that I cannot define a Category which is different from my SID ?
Thanks for any help.


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant


Fri, 2007-12-21 07:24
Joined: 2003-09-29
Forum posts: 32
Re: Creating a RProperty with custom Category

Your assumption about SID is correct. Publish and Subscribe framework prevents definition of a category with any other UID than your process SID.

Background for this is that in theory you could define a P&S category before the application that actually owns the category. If you then would define the category to be accessible with fewer capabilities than the owning application, some sensible information could leak to processes that should not be able to read it.


Jari

Fri, 2007-12-21 10:56
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1913
Re: Creating a RProperty with custom Category

Great, thanks for your explanation !
So it was a bad idea to put such code into a DLL shared by several process.... A bit of redesign for me then Sad


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

  • Login to reply to this topic.