#1137430 ntpsec: ntpwait always fails when "-n 1" is specified

Package:
ntpsec
Source:
ntpsec
Description:
Network Time Protocol daemon and utility programs
Submitter:
Aaron Bugher
Date:
2026-08-24 16:15:04 UTC
Severity:
normal
#1137430#5
Date:
2026-05-23 18:44:54 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

`man ntpwait` says "-n" means "Number of times to check ntpd."  I read that to mean that specifying "-n 1" should check one time and either immediately succeed or give up.  Instead, ntpwait returns 1, indicating, "The operation failed or the command syntax was not valid."

Example:


ansible@neuron-mail:~$ # This succeeds immediately:
ansible@neuron-mail:~$ ntpwait
ansible@neuron-mail:~$ echo $?
0
ansible@neuron-mail:~$ # This fails:
ansible@neuron-mail:~$ ntpwait -n 1
ansible@neuron-mail:~$ echo $?
1
ansible@neuron-mail:~$ # Verbose gives inaccurate explanation:
ansible@neuron-mail:~$ ntpwait -n 1 -v
Waiting for ntpd to synchronize... No!
ntpd did not synchronize.
ansible@neuron-mail:~$ echo $?
1
ansible@neuron-mail:~$ # Other numbers seem OK:
ansible@neuron-mail:~$ ntpwait -n 2 -v
Waiting for ntpd to synchronize... OK! (0.0 seconds)
ansible@neuron-mail:~$ echo $?
0
ansible@neuron-mail:~$

#1137430#10
Date:
2026-08-24 16:12:46 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ntpsec, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1137430@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Richard Laager <rlaager@debian.org> (supplier of updated ntpsec package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 23 Aug 2026 16:14:57 -0500
Source: ntpsec
Architecture: source
Version: 1.2.5+dfsg-1
Distribution: unstable
Urgency: high
Maintainer: Richard Laager <rlaager@debian.org>
Changed-By: Richard Laager <rlaager@debian.org>
Closes: 1137430
Changes:
 ntpsec (1.2.5+dfsg-1) unstable; urgency=high
 .
   [ Richard Laager ]
   * New upstream version
     - The server counting logic for `maxclock` (`tos maxclock`) has been
       corrected to skip dynamic `POOL` slots as well as any remote servers
       configured with the `noselect` flag.
     - `sys_var_list` is no longer marked as a default variable, so it is
       excluded from `ntpq`'s default `rv` (readvar) output.
     - Fixed `ntpd` silently ignoring mode 1 (symmetric active) requests, e.g.
       from Windows clients; they are now answered like ordinary client
       requests.
     - A new `ntskelog` statistic file has been added to the stats file
       collection. NTS-KE transactions are now routed here to reduce clutter in
       the main system log.
     - The `pool` configuration command now natively supports the `nts` security
       flag (`pool <server> nts`).
     - The HPGPS reference clock driver received a major update, featuring a new
       configuration option for listen mode, a fix for the Z3801A GPS Week
       Number Rollover (WNRO) glitch, the removal of the raw `scpi >` string
       from `clockstats`, and the addition of several new internal tracking
       variables to `clockstats`.
     - Link-Time Optimization (LTO) is now enabled
     - Fixed a buffer overflow in the Zyfer reference clock driver that could
       occur when processing continuation chunks (CVE-2026-18321).
     - Fix #843 "ntpwait -n 1 always exits with failure." (Closes: 1137430)
     - Many more bug fixes.
 .
   [ Luca Boccassi ]
   * Stop deleting system user on remove/purge
   * Install and use sysusers.d config file
Checksums-Sha1:
 d745256f81c95f2c7c7b0174e8216e0abc012dd3 2471 ntpsec_1.2.5+dfsg-1.dsc
 f7e4e47d641bb7f1ae6ab5eef498aefb6ded64e8 2346872 ntpsec_1.2.5+dfsg.orig.tar.xz
 aea292daae416de51794d5c6c192450d206c8519 61884 ntpsec_1.2.5+dfsg-1.debian.tar.xz
 88e795f29b2a0bd14b55d5a89b98aea411a71fd7 8926 ntpsec_1.2.5+dfsg-1_source.buildinfo
Checksums-Sha256:
 42ba0f366698a072dec49f2e66030eabb9c77618bac6f629dbddf8389ea963c7 2471 ntpsec_1.2.5+dfsg-1.dsc
 5320231b93bf1fc05c476c6de0ba1c4a80d8868f7ee65f27f1b3b5b2082d826c 2346872 ntpsec_1.2.5+dfsg.orig.tar.xz
 65b68501e62e260299afbd5789230d319cfc9a44f6dd6a0692cbf819284e3818 61884 ntpsec_1.2.5+dfsg-1.debian.tar.xz
 173d8fa484f028ee305f5592f812969075e931f11abecefaa9257484bbc521bd 8926 ntpsec_1.2.5+dfsg-1_source.buildinfo
Files:
 a87361b8da357999d16e6240a48796b0 2471 net optional ntpsec_1.2.5+dfsg-1.dsc
 8fed2a94c82e6870f6c01cc37c34ebea 2346872 net optional ntpsec_1.2.5+dfsg.orig.tar.xz
 ae0032509ac849ed27af62ea6eb07f87 61884 net optional ntpsec_1.2.5+dfsg-1.debian.tar.xz
 4b34bd9ff34bfc2d2d426353b0ad88e7 8926 net optional ntpsec_1.2.5+dfsg-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE1Ot9lOeOTujs4H+U+HlhmcBFhs4FAmqMY3cACgkQ+HlhmcBF
hs4uOxAArOk+8BnAN76u3OsdDzsVvXzbWSsRAJKGL42cZPexrQr/3Uo7ZfkNzImK
GzGxi6aGP1n94YJ+W/PGpEu4HUg35T1iIikiTyZGf9HdHN36YlJP7y5AQbI2dePu
0pyKyR3X+TQ2swYGHMfeSQDzkmX4eLyOOJOfTXRRX3gRn08H2+fg2omNO9wOwZaD
VbIo1m1iIcy9DQ201ATxJigpZiRebIix0mPZ8XCy8Gxiyv1CAEGrKwA6jdvqgkrp
ppaOppbzPjKNgsldepIpIFZjqtL37ia8PaMFq2LTWzMFY3QYj/tTUXUx4mxVeOap
U78MLzLE5rZ1FiY45/cn2zfwrYrpmHdwJaAOv+FScWZf9kob2WAcbmIZYwfl9NHI
9b86RHfqlLphLAe5AqKZy9BlqmkPG/i52hQet4ecaxSB3yo4nItg1NhbhMjtCz33
uInNnaJTPlHO+7hMTi233sgaMc9i1xCgQHaWv7hkjC/O7JCuYGcv/2BTIrdHTzv3
vafLfYlfxqA7pAqzvUvHmmM82CjHEH296Sx4BJjlTSxx+zur6AEuunjw3NTzP/z9
C+nMdx0NDXRb388259kgVHLoG2sZZAasE/pNvfhQJG0juvPi1PQU5+2w42N85bGs
f//YFQaN3+cA9oNyABHCo9Kio4fiY72HzDS9A+j61DtjGOPALHM=
=4RKp
-----END PGP SIGNATURE-----