[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, &quot;busybox ntpd -k /etc/<span \
                class="inbox-inbox-lG">ntp</span>/keys
 -p keyno:192.168.1.1 -d -n -q&quot;.   Also, it seems like the book keeping 
for determine whether a key is used or not and free unused entries isn&#39;t
 worth it.   Typically, you&#39;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 \
&lt;<a href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>&gt; \
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 &lt;<a href="mailto:vda.linux@googlemail.com" \
target="_blank">vda.linux@googlemail.com</a>&gt; wrote:<br> &gt; On Tue, Oct 16, 2018 \
at 9:49 PM Brandon Enochs &lt;<a href="mailto:enochs.brandon@gmail.com" \
target="_blank">enochs.brandon@gmail.com</a>&gt; wrote:<br> &gt; &gt;   //usage:      \
&quot;\n      -p PEER      Obtain time from PEER (may be repeated)&quot;<br> &gt; \
&gt; +//usage:        &quot;\n      -K      key number for preceding PEER (may be \
repeated)&quot;<br> &gt; &gt; +//usage:        &quot;\n      -k      key file (see \
man 5 ntp.keys)&quot;<br> &gt;<br>
&gt; The interplay between -p and -K is rather hard to code.<br>
&gt;<br>
&gt; Since -p is busybox&#39;s invention anyway, there is no compatibility<br>
&gt; to support, and we can, say, just include keys into -p ARG.<br>
&gt; Then we don&#39;t need -K.<br>
&gt;<br>
&gt; Brainstorming. How about -p [ALGO:KEYNO:]PEER ?<br>
&gt;<br>
&gt; Also, code which parses of &quot;server&quot; lines in /etc/ntp.conf<br>
&gt; probably needs to be extended to understand &quot;key KEYNO&quot; arg?<br>
<br>
Here&#39;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