ntpd seems to ignore "disable kernel" directive in ntp.conf

Bug #1811079 reported by Viktor Trojanovic
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The directive "disable kernel" in /etc/ntp.conf should, per my understanding, stop ntpd from adjusting the system clock using ntp_adjtime calls.

On Ubuntu Bionic LTS with ntpd v4.2.8p10, these directives seem to be ignored as the debug output of ntpd -d shows:

# ntpd -d
 8 Jan 21:30:51 ntpd[10906]: ntpd 4.2.8p10@1.3728-o (1): Starting
 8 Jan 21:30:51 ntpd[10906]: Command line: ntpd -d
 8 Jan 21:30:51 ntpd[10906]: Cannot set RLIMIT_MEMLOCK: Operation not permitted
 8 Jan 21:30:51 ntpd[10906]: proto: precision = 0.115 usec (-23)
Finished Parsing!!
[...]
newpeer: 127.0.0.1->127.127.1.0 mode 3 vers 4 poll 3 3 flags 0x29 0x1 ttl 0 key 00000000
 8 Jan 21:30:51 ntpd[10906]: start_kern_loop: ntp_loopfilter.c line 1119: ntp_adjtime: Operation not permitted
event at 0 0.0.0.0 c01d 0d kern kernel time sync enabled
 8 Jan 21:30:51 ntpd[10906]: set_freq: ntp_loopfilter.c line 1082: ntp_adjtime: Operation not permitted
event at 0 0.0.0.0 c012 02 freq_set ntpd 0.000 PPM

The output shows that ntp_adjtime is called in spite of the "disable kernel" directive in /etc/ntp.conf. Is this expected behavior?

Background: I'm running ntpd in a container. While it should serve time to other machines, it should not manipulate the system clock as the clock is managed by the container host.

Revision history for this message
networm (p3t3r09) wrote :

Hi , Is there any suggestion in this BUG ? I am also facing the same issue .
Any help would be appreciated

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ntp (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.