Ntpdc crashes when prompting for keyid on Windows - NTP

This is a discussion on Ntpdc crashes when prompting for keyid on Windows - NTP ; Hi, I am using Ntp version 4.2.5p82 on Windows. I am using ntpdc to dynamically add a peer. I am issuing the following command: ntpdc> addpeer <IP address> Once, I press enter, ntpdc crashes. I traced the problem to the ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Ntpdc crashes when prompting for keyid on Windows

  1. Ntpdc crashes when prompting for keyid on Windows

    Hi,

    I am using Ntp version 4.2.5p82 on Windows.

    I am using ntpdc to dynamically add a peer. I am issuing the following command:
    ntpdc> addpeer <IP address>

    Once, I press enter, ntpdc crashes.
    I traced the problem to the line
    if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL)
    in the getkeyid function in ntpdc.c file.

    Tracing further, i found the condition (_osfile(filedes) & FOPEN) was not true
    Line 56: fdopen.c: _VALIDATE_RETURN((_osfile(filedes) & FOPEN), EBADF, NULL);

    Has anybody faced this issue or am I missing something?
     
    Thanks! 

  2. Re: Ntpdc crashes when prompting for keyid on Windows

    Ginni Misra wrote:
    > Hi,
    >
    > I am using Ntp version 4.2.5p82 on Windows.
    >
    > I am using ntpdc to dynamically add a peer. I am issuing the following command:
    > ntpdc> addpeer <IP address>
    >
    > Once, I press enter, ntpdc crashes.


    Start by omitting the "&^get;" and "<". The line should read
    ntpdc addpeer address.

    Ntpdc is deprecated, largely because of the lack of volunteers to
    maintain it.

  3. Re: Ntpdc crashes when prompting for keyid on Windows

    On 2008-06-08, Richard B. Gilbert wrote:

    > Ginni Misra wrote:
    >
    >> I am using Ntp version 4.2.5p82 on Windows.
    >>
    >> I am using ntpdc to dynamically add a peer. I am issuing the
    >> following command: ntpdc> addpeer <IP address>
    >>

    > Start by omitting the "&^[gt];" and "<". The line should read ntpdc
    > addpeer address.


    The OP used web-mail software and posted the example line as:

    ntpdc addpeer

    The > and < are HTML entities.

    Please stop muddying the waters.

    --
    Steve Kostecke
    NTP Public Services Project - http://support.ntp.org/

  4. Re: Ntpdc crashes when prompting for keyid on Windows

    Steve Kostecke writes:

    >On 2008-06-08, Richard B. Gilbert wrote:


    >> Ginni Misra wrote:
    >>
    >>> I am using Ntp version 4.2.5p82 on Windows.
    >>>
    >>> I am using ntpdc to dynamically add a peer. I am issuing the
    >>> following command: ntpdc> addpeer <IP address>
    >>>

    >> Start by omitting the "&^[gt];" and "<". The line should read ntpdc
    >> addpeer address.


    >The OP used web-mail software and posted the example line as:


    >ntpdc addpeer


    No. He wrote
    ntpdc> addpeer



    >The > and < are HTML entities.


    >Please stop muddying the waters.


    >--
    >Steve Kostecke
    >NTP Public Services Project - http://support.ntp.org/


  5. Re: Ntpdc crashes when prompting for keyid onWindows

    Ginni Misra wrote:
    > Hi,
    >
    > I am using Ntp version 4.2.5p82 on Windows.
    >
    > I am using ntpdc to dynamically add a peer. I am issuing the following command:
    > ntpdc> addpeer <IP address>
    >
    > Once, I press enter, ntpdc crashes.
    > I traced the problem to the line
    > if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL)
    > in the getkeyid function in ntpdc.c file.
    >
    > Tracing further, i found the condition (_osfile(filedes) & FOPEN) was not true
    > Line 56: fdopen.c: _VALIDATE_RETURN((_osfile(filedes) & FOPEN), EBADF, NULL);
    >
    > Has anybody faced this issue or am I missing something?
    >  
    > Thanks! 


    Since you are building this yourself, please try the latest development
    version which I believe is 4.2.5p116. I don't think it will make any
    difference but it's worth giving a try. Otherwise please file a bug
    report. I'm not sure why this would fail.

    Danny

  6. Re: Ntpdc crashes when prompting for keyid on Windows

    On 2008-06-09, Unruh wrote:

    > Steve Kostecke writes:
    >
    >>On 2008-06-08, Richard B. Gilbert wrote:

    >
    >>> Start by omitting the "&^[gt];" and "<". The line should read
    >>> ntpdc addpeer address.

    >
    >>The OP used web-mail software and posted the example line as:

    >
    >>ntpdc addpeer

    >
    > No. He wrote ntpdc> addpeer
    >
    > [---=| TOFU protection by t-prot: 5 lines snipped |=---]


    Richard didn't recognise HTML entities.

    You're moaning about a meaningless typo.

    Neither of you are contributing anything towards solving the OP's
    problem.

    --
    Steve Kostecke
    NTP Public Services Project - http://support.ntp.org/

  7. Re: Ntpdc crashes when prompting for keyid on Windows

    Steve Kostecke wrote:

    >
    > Richard didn't recognise HTML entities.
    >
    > You're moaning about a meaningless typo.
    >


    Unruh's decode of the broken email was correct. What is being shown is
    not just the command, but the command and the prompt, or at least
    hopefully that is the case (the questioner could have seen documentation
    with that intent and actually typed the whole thing at the shell prompt).

    I realised that the & g t ;, etc. was the result of broken HTML email
    software, but trying to decode it in my head I sawe a redirect operator
    for the first > and decided I didn't understand what was going on.
    Only when I saw Unruh's decode was it obvious that it was actually part
    of the prompt.

+ Reply to Thread