I need to change the time in ordinary account.
In " root " account,I can use clock_settime() to set system time.
But in normal user,the function clock_settime() can’t be use.And it
seems that only root can change the time.
At the same time ,the date utility can’t
be use in normal user but in root account.
But in User’s configuration “Time & Date”,I can change the
time in ordinary user,how does the system finish it.
How to set time in ordinary user in program C?
I need to change the time in ordinary account.
In " root " account,I can use clock_settime() to set system time.
But in normal user,the function clock_settime() can’t be use.And it
seems that only root can change the time.
At the same time ,the date utility can’t
be use in normal user but in root account.
But in User’s configuration “Time & Date”,I can change the
time in ordinary user,how does the system finish it.
How to set time in ordinary user in program C?
The program has to have the stick bit set (so it has root permission)
I need to change the time in ordinary account.
In " root " account,I can use clock_settime() to set system time.
But in normal user,the function clock_settime() can’t be use.And it
seems that only root can change the time.
At the same time ,the date utility can’t
be use in normal user but in root account.
But in User’s configuration “Time & Date”,I can change the
time in ordinary user,how does the system finish it.
How to set time in ordinary user in program C?
This is a bad idea. If you give everyone the ability to set
the time, then the reality is that they will, which can cause
some real issues if you are relying on timestamps in any log
files, or syncronizing with a network.
The date/time is setable by root for a reason. The reason is
simply that only one person should be able to (and responsible
for) setting the time. That user is root.
I need to change the time in ordinary account.
In " root " account,I can use clock_settime() to set system time.
But in normal user,the function clock_settime() can’t be use.And it
seems that only root can change the time.
At the same time ,the date utility can’t
be use in normal user but in root account.
But in User’s configuration “Time & Date”,I can change the
time in ordinary user,how does the system finish it.
How to set time in ordinary user in program C?
The program has to have the stick bit set (so it has root permission)
\
–
============ lat=52.35°N - lon=10.25°E ================================
Dr. Jörg Kampmann - IBK-Consult for Real-Time and Embedded Systems
D-31228 Peine - Tel.:+49-177-276-3140 - Fax: +49-5171-13385 http://www.ibk-consult.de
===== QNX is the better Choice for Real-Time: http://www.qnx.com ====