~ubuntu-branches/ubuntu/precise/ntp/precise-proposed

« back to all changes in this revision

Viewing changes to ports/winnt/ntpd/nt_clockstuff.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-10-26 10:24:21 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111026102421-flnrs0qobp87twr0
Tags: 1:4.2.6.p3+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes are:
  + debian/ntp.conf, debian/ntpdate.default: Change default server to
    ntp.ubuntu.com.
  + debian/ntpdate.ifup: Stop ntp before running ntpdate when an interface
    comes up, then start again afterwards.
  + debian/ntp.init, debian/rules: Only stop when entering single user mode.
  + Add enforcing AppArmor profile (LP: #382905):
    - debian/control: add Conflicts/Replaces on apparmor-profiles <
      2.3.1+1403-0ubuntu10 (since we are now shipping usr.sbin.ntpd) and
      apparmor < 2.3.1+1403-0ubuntu10 (since we are now shipping tunables/ntpd)
    - debian/control: add Suggests on apparmor
    - debian/ntp.dirs: add apparmor directories
    - debian/ntp.preinst: force complain on certain upgrades
    - debian/ntp.postinst: reload apparmor profile
    - debian/ntp.postrm: remove the force-complain file
    - add debian/apparmor-profile*
    - debian/rules: install apparmor-profile and apparmor-profile.tunable
    - debian/README.Debian: add note on AppArmor
  + debian/{control,rules}: add and enable hardened build for PIE
    (Debian bug 542721).
  + debian/apparmor-profile: adjust location of drift files (LP: #456308)
  + debian/rules, debian/ntp.dirs, debian/source_ntp.py: Add apport hook.
  + debian/ntpdate-debian: Disregard empty ntp.conf files. (LP: #83604)
  + debian/ntp.preinst: Remove empty /etc/ntp.conf on fresh intallation, 
    to work around  the system-tools-backends part of LP #83604.
  + debian/ntpdate.ifup: Fix interaction with openntpd. (LP: #877210)
  + Dropped:
    - ntpdate-accept-same-timestamp-replies.patch: Accepted upstream
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
779
779
 
780
780
        choose_interp_counter();
781
781
 
782
 
        if (os_clock_precision < 4 * 10000 && !getenv("NTPD_USE_INTERP_DANGEROUS")) {
 
782
        if (getenv("NTPD_USE_SYSTEM_CLOCK") ||
 
783
            (os_clock_precision < 4 * 10000 &&
 
784
             !getenv("NTPD_USE_INTERP_DANGEROUS"))) {
783
785
                msyslog(LOG_INFO, "using Windows clock directly");
784
786
        } else {
785
787
                winnt_use_interpolation = TRUE;
1228
1230
                Now.ll -= InterpTimestamp;
1229
1231
                if (Now.ll > 60 * HECTONANOSECONDS || 
1230
1232
                    Now.ll < -60 * (LONGLONG) HECTONANOSECONDS) {
1231
 
                        DPRINTF(1, ("ntp_timestamp_from_counter serial driver system "
1232
 
                                    "time %.6fs from current\n",
 
1233
                        DPRINTF(1, ("ntp_timestamp_from_counter serial driver system time %.6fs from current\n",
1233
1234
                                    Now.ll / (double)LL_HNS));
 
1235
                        msyslog(LOG_ERR,
 
1236
                                "ntp_timestamp_from_counter serial driver system time %.6fs from current\n",
 
1237
                                Now.ll / (double)LL_HNS);
1234
1238
                        exit(-1);
1235
1239
                }
1236
1240
#endif