|
@@ -652,6 +652,8 @@ int do_adjtimex(struct timex *txc)
|
|
struct timespec delta;
|
|
struct timespec delta;
|
|
delta.tv_sec = txc->time.tv_sec;
|
|
delta.tv_sec = txc->time.tv_sec;
|
|
delta.tv_nsec = txc->time.tv_usec;
|
|
delta.tv_nsec = txc->time.tv_usec;
|
|
|
|
+ if (!capable(CAP_SYS_TIME))
|
|
|
|
+ return -EPERM;
|
|
if (!(txc->modes & ADJ_NANO))
|
|
if (!(txc->modes & ADJ_NANO))
|
|
delta.tv_nsec *= 1000;
|
|
delta.tv_nsec *= 1000;
|
|
result = timekeeping_inject_offset(&delta);
|
|
result = timekeeping_inject_offset(&delta);
|