×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    31

    Aegis and changing system time problem

    Hi all!

    I'm trying to set system time using MeeGo::QmTime::setTime(), but it required a timed::TimeControl resource token. Unfortunately aegis doesn't allow it at installation time:
    Package myapp: denied 'timed::TimeControl' -- origin '' does not allow it
    Package myapp: denied 'timed::TimeControl' for '/opt/myapp/bin/myapp' -- origin '' does not allow it
    As a result setTime() doesn't work without that token, it always return zero (false).

    SDK's help documentation and aegis configuration on the real device are different.

    So is there any way to set system time from my own code?

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Aegis and changing system time problem

    Hi,
    What about opening the clock setting panel?

    All the classes/functions which need the stricken out tokens listed at [1] will most probably be removed from documentation.

    [1] http://www.developer.nokia.com/Commu...ecurity_Tokens

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    31

    Re: Aegis and changing system time problem

    Quote Originally Posted by gnuton View Post
    What about opening the clock setting panel?
    As I said above I'm trying to change system time from my code. Programmatically.

    Quote Originally Posted by gnuton View Post
    All the classes/functions which need the stricken out tokens listed at [1] will most probably be removed from documentation.
    timed::TimeControl resource token is in that list. Does that means that there is no way to set system time from my own code, programmatically?
    What is the point to include in SDK the API which can not be actually used?

    Maybe there is another API which able to change system date/time on MeeGo, and which will really work?

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Aegis and changing system time problem

    You should be able to set the time using http://linux.die.net/man/7/time

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    31

    Re: Aegis and changing system time problem

    I'll try it, thanks.

  6. #6
    Registered User
    Join Date
    Sep 2007
    Posts
    15

    Re: Aegis and changing system time problem

    Hi s60dev, did you figure out how to set the time on MeeGo. I got into same situation and hoping if you could provide some inputs.

  7. #7
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Aegis and changing system time problem

    If you want to change the time, you can use http://linux.die.net/man/2/settimeofday or showing the clock page

  8. #8
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Aegis and changing system time problem

    So is there any properly working way to set system time with normal "user" rights (not under user named "developer")?

    Unfortunately an official documentation doesn't provide correct information regarding this issue.
    Last edited by A.A.M.; 2012-07-12 at 10:37.

  9. #9
    Registered User
    Join Date
    Oct 2009
    Posts
    39

    Re: Aegis and changing system time problem

    Have a look at the script output by this, it uses devel-su, but checks for the appropriate permission (IIRC). It then uses 'date', as I haven't had chance to switch to the proper API yet:

    http://www.maemopeople.org/index.php...tinuous_clock_

  10. #10
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Aegis and changing system time problem

    I assume it's not proper way, because devtools isn't installed out of the box. Or I misunderstood an idea?

  11. #11
    Registered User
    Join Date
    Oct 2009
    Posts
    39

    Re: Aegis and changing system time problem

    It's the presence and checking of CAP::sys_time from the output of accli -I which I think might be relevant.

  12. #12
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Aegis and changing system time problem

    Hi

    I think you need proper capability set declaration in aegis:
    Code:
    <aegis>
         <request>
           <credential name="CAP::sys_time" />
           <for path="/usr/bin/foobar" />
         </request>
       </aegis>
    The CAP_SYS_TIME capability allows a process to modify the system time. For Harmattan security guide please check this

    Then i think setTime() should work

  13. #13
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Aegis and changing system time problem

    Checked, credential "CAP::sys_time" declared but unfortunately setting time function(s) doesn't work with normal user rights (under "developer" it works).

  14. #14
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Aegis and changing system time problem

    ok ,

    Even if you request a credential for the application that is available in the system, the credential is not necessarily granted. The reason for this is software source origin. Software source origin is a security policy term that defines available capability set. for "CAP::sys_time" you need OVI source origin. please check that for details.
    another point is the file shall be installed into the target Harmattan device by package manager. So i conclude if you publish your app on Store it should work with normal user rights. That can be checked. At least you will get more information on strong capability use from Store QA team.

  15. #15
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Aegis and changing system time problem

    Interesting. Thanks for clarification.

Similar Threads

  1. Replies: 3
    Last Post: 2011-11-06, 09:49
  2. Replies: 9
    Last Post: 2011-03-14, 07:15
  3. How to get System time and system date
    By neel.soft in forum Symbian
    Replies: 5
    Last Post: 2009-03-03, 10:04
  4. Changing Bluetooth name - bug in system?
    By rihoe in forum Symbian
    Replies: 7
    Last Post: 2008-05-09, 08:20
  5. Changing time
    By schattenangst in forum Mobile Java General
    Replies: 1
    Last Post: 2002-12-09, 06:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×