_user_set_real_time_clock() can now return an error. It currently even
will do this if this function is called by anyone other than the root user. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9804 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4ce0cb439a
commit
d2170152b1
@ -117,9 +117,13 @@ real_time_clock_usecs(void)
|
|||||||
// public userland API
|
// public userland API
|
||||||
|
|
||||||
|
|
||||||
void
|
status_t
|
||||||
_user_set_real_time_clock(uint32 time)
|
_user_set_real_time_clock(uint32 time)
|
||||||
{
|
{
|
||||||
|
if (geteuid() != 0)
|
||||||
|
return B_NOT_ALLOWED;
|
||||||
|
|
||||||
set_real_time_clock(time);
|
set_real_time_clock(time);
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user