Creating a RProperty with custom Category
| Thu, 2007-12-20 18:20 | |
|
|
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 ? Eric Bustarret |






Forum posts: 32
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
Forum posts: 1913
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
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant