[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Add support for NTP authentication
From: Brandon Enochs <enochs.brandon () gmail ! com>
Date: 2018-11-26 14:15:08
Message-ID: CAP-AUygw30QWNWG_+qUe=MPRoZNUZyhOkV_4dBzdOxLQVt9yrA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Sorry for the delay response, the patch works; however, it segfaults if the
input to -p is malformed. For example, "busybox ntpd -k /etc/ntp/keys -p
keyno:192.168.1.1 -d -n -q". Also, it seems like the book keeping for
determine whether a key is used or not and free unused entries isn't worth
it. Typically, you'll only have a single key entry.
On Fri, Oct 26, 2018 at 5:10 PM Denys Vlasenko <vda.linux@googlemail.com>
wrote:
> On Fri, Oct 26, 2018 at 7:01 PM Denys Vlasenko <vda.linux@googlemail.com>
> wrote:
> > On Tue, Oct 16, 2018 at 9:49 PM Brandon Enochs <enochs.brandon@gmail.com>
> wrote:
> > > //usage: "\n -p PEER Obtain time from PEER (may be
> repeated)"
> > > +//usage: "\n -K key number for preceding PEER (may be
> repeated)"
> > > +//usage: "\n -k key file (see man 5 ntp.keys)"
> >
> > The interplay between -p and -K is rather hard to code.
> >
> > Since -p is busybox's invention anyway, there is no compatibility
> > to support, and we can, say, just include keys into -p ARG.
> > Then we don't need -K.
> >
> > Brainstorming. How about -p [ALGO:KEYNO:]PEER ?
> >
> > Also, code which parses of "server" lines in /etc/ntp.conf
> > probably needs to be extended to understand "key KEYNO" arg?
>
> Here's the code attached. Can you try it?
>
[Attachment #5 (text/html)]
<div dir="ltr">Sorry for the delay response, the patch works; however, it segfaults \
if the input to -p is malformed. For example, "busybox ntpd -k /etc/<span \
class="inbox-inbox-lG">ntp</span>/keys
-p keyno:192.168.1.1 -d -n -q". Also, it seems like the book keeping
for determine whether a key is used or not and free unused entries isn't
worth it. Typically, you'll only have a single key entry.<br><br><div \
class="gmail_quote"><div dir="ltr">On Fri, Oct 26, 2018 at 5:10 PM Denys Vlasenko \
<<a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Oct 26, 2018 at 7:01 PM \
Denys Vlasenko <<a href="mailto:vda.linux@googlemail.com" \
target="_blank">vda.linux@googlemail.com</a>> wrote:<br> > On Tue, Oct 16, 2018 \
at 9:49 PM Brandon Enochs <<a href="mailto:enochs.brandon@gmail.com" \
target="_blank">enochs.brandon@gmail.com</a>> wrote:<br> > > //usage: \
"\n -p PEER Obtain time from PEER (may be repeated)"<br> > \
> +//usage: "\n -K key number for preceding PEER (may be \
repeated)"<br> > > +//usage: "\n -k key file (see \
man 5 ntp.keys)"<br> ><br>
> The interplay between -p and -K is rather hard to code.<br>
><br>
> Since -p is busybox's invention anyway, there is no compatibility<br>
> to support, and we can, say, just include keys into -p ARG.<br>
> Then we don't need -K.<br>
><br>
> Brainstorming. How about -p [ALGO:KEYNO:]PEER ?<br>
><br>
> Also, code which parses of "server" lines in /etc/ntp.conf<br>
> probably needs to be extended to understand "key KEYNO" arg?<br>
<br>
Here's the code attached. Can you try it?<br>
</blockquote></div></div>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic