Hi
I have a server which is having more capabilities than the client which is going to use it. So according to Symbian Security architecture the client can not create the server. So I am making it auto run on boot up. Now I need a handle of the server back to the client which can be a gui app or a simply a non gui exe ,as the server is always running . Any pointers which methods need to be implemented at Client and server side to do this ?
Br
Girish
1. write the client interface utility, exposing few methods which are required to use. and provide the least min capability too. and then use this client handle in your applicaion.
2. Provide the complete capability set to the client as well. (just a work around to your problem)
You're wrong in assuming that client capabilites have anything to do with server's in terms of whether it can create it or not. What a client is essentially doing when kicking off a server is calling RProcess::Create, which does NOT perform any security check. If you had had a look at SDK documentation with regards to this method, you would have seen that there was nothing mentioned about capabilities.
What might confuse you, though, is DLL loading rules: you know a DLL is loaded into the context of the calling process. And there must be serious security checks when doing that, which is typically done by the system Loader. But it's a completely different issue, since the server is NOT going to be loaded into your process, but will run in parallel. Or the other fact that might confuse you, too that a typical place for custom security checks is on client-server boundaries.
Hi
I checked the documentation again , I was wrong in making assumption that the server loads like the DLL (thanks for the clarification ) . Yes I have made the client server thing funny thing was it was behaving right on the emulator but not on the phone as my server is having TCB capabilities. The Server was not being created when my client was calling RProcess::Create(KServerName,KNullDesc) and this method doesnt requires any capability. So far one thing is clear that to create/load a server we don't need any capability , can I safely say so? If this is correct I have some trouble in my server start up code I think.
Regards
Girish
Yes Girish, you do need any capability to start any of your applications. The problem arises when you have specified few capabilities in the mmp file and run the application on the phone.
Have you signed your application? If you wish your application (server/client) to have the TCB capability, you will need to get the application signed from Symbian Signed. The emulator does not pose a problem as it does not emulate all features of the hardware (phone).
Hi
I had this TCB capability (only TCB ) for my server and the problem was that in the server I was having some libs charconv.lib and avkon.lib. So the server was never able to load as these libs needed more capabilities , and then I removed them from Server part and it worked on the phone.
Regards
Girish
Forum posts: 120
HI Girish,
There could be two options to do it.
1. write the client interface utility, exposing few methods which are required to use. and provide the least min capability too. and then use this client handle in your applicaion.
2. Provide the complete capability set to the client as well.
(just a work around to your problem)
Jupitar
Forum posts: 723
Hi,
You're wrong in assuming that client capabilites have anything to do with server's in terms of whether it can create it or not. What a client is essentially doing when kicking off a server is calling RProcess::Create, which does NOT perform any security check. If you had had a look at SDK documentation with regards to this method, you would have seen that there was nothing mentioned about capabilities.
What might confuse you, though, is DLL loading rules: you know a DLL is loaded into the context of the calling process. And there must be serious security checks when doing that, which is typically done by the system Loader. But it's a completely different issue, since the server is NOT going to be loaded into your process, but will run in parallel. Or the other fact that might confuse you, too that a typical place for custom security checks is on client-server boundaries.
Did you try this client-server thing, btw?
Tote
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 78
Hi
I checked the documentation again , I was wrong in making assumption that the server loads like the DLL (thanks for the clarification ) . Yes I have made the client server thing funny thing was it was behaving right on the emulator but not on the phone as my server is having TCB capabilities. The Server was not being created when my client was calling RProcess::Create(KServerName,KNullDesc) and this method doesnt requires any capability. So far one thing is clear that to create/load a server we don't need any capability , can I safely say so? If this is correct I have some trouble in my server start up code I think.
Regards
Girish
Forum posts: 25
Yes Girish, you do need any capability to start any of your applications. The problem arises when you have specified few capabilities in the mmp file and run the application on the phone.
Have you signed your application? If you wish your application (server/client) to have the TCB capability, you will need to get the application signed from Symbian Signed. The emulator does not pose a problem as it does not emulate all features of the hardware (phone).
Forum posts: 78
Hi
I had this TCB capability (only TCB ) for my server and the problem was that in the server I was having some libs charconv.lib and avkon.lib. So the server was never able to load as these libs needed more capabilities , and then I removed them from Server part and it worked on the phone.
Regards
Girish