<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Wes,<br>
      <br>
      As per Paul's suggestion, I did:<br>
      [root@victor C]# ls
      /etc/ipsec.d/*.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      /etc/ipsec.d/ipsec.unmanaged.david.conf<br>
      /etc/ipsec.d/ipsec.unmanaged.mumin.conf<br>
      /etc/ipsec.d/ipsec.unmanaged.paulin.conf<br>
      /etc/ipsec.d/vouters.conf<br>
      [root@victor C]# <b>echo -n " ikelifetime=1h" &gt;&gt;
        /etc/ipsec.d/ipsec.unmanaged.paulin.conf</b><br>
      [root@victor C]# od -a
      /etc/ipsec.d/ipsec.unmanaged.paulin.conf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0000000&nbsp;&nbsp;
      c&nbsp;&nbsp; o&nbsp;&nbsp; n&nbsp;&nbsp; n&nbsp; sp&nbsp;&nbsp; p&nbsp;&nbsp; a&nbsp;&nbsp; u&nbsp;&nbsp; l&nbsp;&nbsp; i&nbsp;&nbsp; n&nbsp; nl&nbsp; sp&nbsp;&nbsp; a&nbsp;&nbsp; u&nbsp;&nbsp; t<br>
      0000020&nbsp;&nbsp; o&nbsp;&nbsp; =&nbsp;&nbsp; a&nbsp;&nbsp; d&nbsp;&nbsp; d&nbsp; nl&nbsp; sp&nbsp;&nbsp; t&nbsp;&nbsp; y&nbsp;&nbsp; p&nbsp;&nbsp; e&nbsp;&nbsp; =&nbsp;&nbsp; t&nbsp;&nbsp; u&nbsp;&nbsp;
      n&nbsp;&nbsp; n<br>
      0000040&nbsp;&nbsp; e&nbsp;&nbsp; l&nbsp; nl&nbsp; sp&nbsp;&nbsp; a&nbsp;&nbsp; u&nbsp;&nbsp; t&nbsp;&nbsp; h&nbsp;&nbsp; b&nbsp;&nbsp; y&nbsp;&nbsp; =&nbsp;&nbsp; s&nbsp;&nbsp; e&nbsp;&nbsp; c&nbsp;&nbsp;
      r&nbsp;&nbsp; e<br>
      0000060&nbsp;&nbsp; t&nbsp; nl&nbsp; sp&nbsp;&nbsp; r&nbsp;&nbsp; i&nbsp;&nbsp; g&nbsp;&nbsp; h&nbsp;&nbsp; t&nbsp;&nbsp; =&nbsp;&nbsp; %&nbsp;&nbsp; a&nbsp;&nbsp; n&nbsp;&nbsp; y&nbsp; nl&nbsp;
      sp&nbsp;&nbsp; l<br>
      0000100&nbsp;&nbsp; e&nbsp;&nbsp; f&nbsp;&nbsp; t&nbsp;&nbsp; =&nbsp;&nbsp; %&nbsp;&nbsp; d&nbsp;&nbsp; e&nbsp;&nbsp; f&nbsp;&nbsp; a&nbsp;&nbsp; u&nbsp;&nbsp; l&nbsp;&nbsp; t&nbsp;&nbsp; r&nbsp;&nbsp; o&nbsp;&nbsp;
      u&nbsp;&nbsp; t<br>
      0000120&nbsp;&nbsp; e&nbsp; nl&nbsp; sp&nbsp;&nbsp; l&nbsp;&nbsp; e&nbsp;&nbsp; f&nbsp;&nbsp; t&nbsp;&nbsp; s&nbsp;&nbsp; u&nbsp;&nbsp; b&nbsp;&nbsp; n&nbsp;&nbsp; e&nbsp;&nbsp; t&nbsp;&nbsp; =&nbsp;&nbsp;
      1&nbsp;&nbsp; 9<br>
      0000140&nbsp;&nbsp; 2&nbsp;&nbsp; .&nbsp;&nbsp; 1&nbsp;&nbsp; 6&nbsp;&nbsp; 8&nbsp;&nbsp; .&nbsp;&nbsp; 1&nbsp;&nbsp; .&nbsp;&nbsp; 0&nbsp;&nbsp; /&nbsp;&nbsp; 2&nbsp;&nbsp; 4&nbsp; nl&nbsp; sp&nbsp;&nbsp;
      l&nbsp;&nbsp; e<br>
      0000160&nbsp;&nbsp; f&nbsp;&nbsp; t&nbsp;&nbsp; s&nbsp;&nbsp; o&nbsp;&nbsp; u&nbsp;&nbsp; r&nbsp;&nbsp; c&nbsp;&nbsp; e&nbsp;&nbsp; i&nbsp;&nbsp; p&nbsp;&nbsp; =&nbsp;&nbsp; 1&nbsp;&nbsp; 9&nbsp;&nbsp; 2&nbsp;&nbsp;
      .&nbsp;&nbsp; 1<br>
      0000200&nbsp;&nbsp; 6&nbsp;&nbsp; 8&nbsp;&nbsp; .&nbsp;&nbsp; 1&nbsp;&nbsp; .&nbsp;&nbsp; 2&nbsp; nl&nbsp; sp&nbsp;&nbsp; r&nbsp;&nbsp; i&nbsp;&nbsp; g&nbsp;&nbsp; h&nbsp;&nbsp; t&nbsp;&nbsp; s&nbsp;&nbsp;
      u&nbsp;&nbsp; b<br>
      0000220&nbsp;&nbsp; n&nbsp;&nbsp; e&nbsp;&nbsp; t&nbsp;&nbsp; =&nbsp;&nbsp; 1&nbsp;&nbsp; 9&nbsp;&nbsp; 2&nbsp;&nbsp; .&nbsp;&nbsp; 1&nbsp;&nbsp; 6&nbsp;&nbsp; 8&nbsp;&nbsp; .&nbsp;&nbsp; 3&nbsp;&nbsp; 0&nbsp;&nbsp;
      .&nbsp;&nbsp; 0<br>
      0000240&nbsp;&nbsp; /&nbsp;&nbsp; 2&nbsp;&nbsp; 4&nbsp; nl&nbsp; sp&nbsp;&nbsp; l&nbsp;&nbsp; e&nbsp;&nbsp; f&nbsp;&nbsp; t&nbsp;&nbsp; i&nbsp;&nbsp; d&nbsp;&nbsp; =&nbsp;&nbsp; @&nbsp;&nbsp; N&nbsp;&nbsp;
      i&nbsp;&nbsp; c<br>
      0000260&nbsp;&nbsp; k&nbsp;&nbsp; -&nbsp;&nbsp; P&nbsp;&nbsp; a&nbsp;&nbsp; u&nbsp;&nbsp; l&nbsp; nl&nbsp; sp&nbsp;&nbsp; i&nbsp;&nbsp; k&nbsp;&nbsp; e&nbsp;&nbsp; =&nbsp;&nbsp; a&nbsp;&nbsp; e&nbsp;&nbsp;
      s&nbsp;&nbsp; 2<br>
      0000300&nbsp;&nbsp; 5&nbsp;&nbsp; 6&nbsp;&nbsp; -&nbsp;&nbsp; s&nbsp;&nbsp; h&nbsp;&nbsp; a&nbsp;&nbsp; 1&nbsp; nl&nbsp; sp&nbsp;&nbsp; p&nbsp;&nbsp; h&nbsp;&nbsp; a&nbsp;&nbsp; s&nbsp;&nbsp; e&nbsp;&nbsp;
      2&nbsp;&nbsp; a<br>
      0000320&nbsp;&nbsp; l&nbsp;&nbsp; g&nbsp;&nbsp; =&nbsp;&nbsp; a&nbsp;&nbsp; e&nbsp;&nbsp; s&nbsp;&nbsp; 2&nbsp;&nbsp; 5&nbsp;&nbsp; 6&nbsp; nl&nbsp; sp&nbsp;&nbsp; d&nbsp;&nbsp; p&nbsp;&nbsp; d&nbsp;&nbsp;
      t&nbsp;&nbsp; i<br>
      0000340&nbsp;&nbsp; m&nbsp;&nbsp; e&nbsp;&nbsp; o&nbsp;&nbsp; u&nbsp;&nbsp; t&nbsp;&nbsp; =&nbsp;&nbsp; 1&nbsp;&nbsp; 2&nbsp;&nbsp; 0&nbsp; nl&nbsp; sp&nbsp;&nbsp; d&nbsp;&nbsp; p&nbsp;&nbsp; d&nbsp;&nbsp;
      d&nbsp;&nbsp; e<br>
      0000360&nbsp;&nbsp; l&nbsp;&nbsp; a&nbsp;&nbsp; y&nbsp;&nbsp; =&nbsp;&nbsp; 3&nbsp;&nbsp; 0&nbsp; nl&nbsp; sp&nbsp;&nbsp; d&nbsp;&nbsp; p&nbsp;&nbsp; d&nbsp;&nbsp; a&nbsp;&nbsp; c&nbsp;&nbsp; t&nbsp;&nbsp;
      i&nbsp;&nbsp; o<br>
      0000400&nbsp;&nbsp; n&nbsp;&nbsp; =&nbsp;&nbsp; r&nbsp;&nbsp; e&nbsp;&nbsp; s&nbsp;&nbsp; t&nbsp;&nbsp; a&nbsp;&nbsp; r&nbsp;&nbsp; t&nbsp;&nbsp; _&nbsp;&nbsp; b&nbsp;&nbsp; y&nbsp;&nbsp; _&nbsp;&nbsp; p&nbsp;&nbsp;
      e&nbsp;&nbsp; e<br>
      0000420&nbsp;&nbsp; r&nbsp; nl&nbsp; sp&nbsp;&nbsp; s&nbsp;&nbsp; a&nbsp;&nbsp; l&nbsp;&nbsp; i&nbsp;&nbsp; f&nbsp;&nbsp; e&nbsp;&nbsp; t&nbsp;&nbsp; i&nbsp;&nbsp; m&nbsp;&nbsp; e&nbsp;&nbsp; =&nbsp;&nbsp;
      1&nbsp;&nbsp; h<br>
      0000440&nbsp; nl&nbsp; sp&nbsp;&nbsp; i&nbsp;&nbsp; k&nbsp;&nbsp; e&nbsp;&nbsp; l&nbsp;&nbsp; i&nbsp;&nbsp; f&nbsp;&nbsp; e&nbsp;&nbsp; t&nbsp;&nbsp; i&nbsp;&nbsp; m&nbsp;&nbsp; e&nbsp;&nbsp; =&nbsp;&nbsp;
      1&nbsp;&nbsp; h<br>
      0000460<br>
      [root@victor C]# exit<br>
      exit<br>
      <br>
      <b>This parser.l code:</b><br>
      &lt;&lt;EOF&gt;&gt; {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(parser_y_eof()) {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yyterminate();<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (stacktop-&gt;file != NULL) {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yyterminate();<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
      }<br>
      <b>generates:</b><br>
      [philippe@victor C]$ sudo /usr/local/sbin/ipsec addconn --autoall<br>
      can not load config '/etc/ipsec.conf':
      /etc/ipsec.d/vouters.conf:1: syntax error, unexpected CONN,
      expecting EOL [conn]<br>
      [philippe@victor C]$ <br>
      [philippe@victor C]$ sudo /usr/local/sbin/ipsec addconn
      --checkconfig<br>
      can not load config '/etc/ipsec.conf':
      /etc/ipsec.d/vouters.conf:1: syntax error, unexpected CONN,
      expecting EOL [conn]<br>
      [philippe@victor C]$ <br>
      [philippe@victor C]$ sudo systemctl restart ipsec.service<br>
      Job failed. See system journal and 'systemctl status' for details.<br>
      [philippe@victor C]$ sudo systemctl status ipsec.service<br>
      ipsec.service - Internet Key Exchange (IKE) Protocol Daemon for
      IPsec<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Loaded: loaded (/usr/lib/systemd/system/ipsec.service;
      disabled)<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Active: inactive (dead)<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CGroup: name=systemd:/system/ipsec.service<br>
      <br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: | crl list
      locked by ...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: | crl list
      unlocked b...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: shutting
      down interfa...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: shutting
      down interfa...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: shutting
      down interfa...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: shutting
      down interfa...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org pluto[26425]: shutting
      down interfa...<br>
      Jan 08 20:26:14 victor.vouters.dyndns.org ipsec[29528]: 002
      shutting down<br>
      Jan 08 20:26:16 victor.vouters.dyndns.org ipsec[29557]: can not
      load config '...<br>
      Jan 08 20:26:16 victor.vouters.dyndns.org ipsec[29561]: can not
      load config '...<br>
      [philippe@victor C]$ <br>
      And pluto did NOT crashed because it did not start, addcon
      --checkconfig returning an execution error before.<br>
      <br>
      So this fix sounds sane, although the error message can eventually
      be made more accurate outputting the correct file name where the
      EOF at EOL condition is found.<br>
      <br>
      <b>Best fix that I shall git commit:</b><br>
      &lt;&lt;EOF&gt;&gt; {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(parser_y_eof()) {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yyterminate();<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (stacktop-&gt;file != NULL) {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(stderr,"ERROR: EOF at EOL condition found in
      %s\n",<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      stacktop-&gt;fileglob.gl_pathv[stacktop-&gt;fileglobcnt]);<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yyterminate();<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
      }<br>
      <b>This produces:</b><br>
      <br>
      [philippe@victor C]$ sudo /usr/local/sbin/ipsec addconn
      --checkconfig<br>
      ERROR: EOF at EOL condition found in
      /etc/ipsec.d/ipsec.unmanaged.paulin.conf<br>
      [philippe@victor C]$ <br>
      <br>
      <b>So the very accurate error message.</b><br>
      <br>
      <pre class="moz-signature" cols="72">Philippe Vouters (Fontainebleau/France)
URL: <a class="moz-txt-link-freetext" href="http://vouters.dyndns.org/">http://vouters.dyndns.org/</a>
SIP: <a class="moz-txt-link-abbreviated" href="mailto:sip:Vouters@sip.linphone.org">sip:Vouters@sip.linphone.org</a></pre>
      Le 08/01/2013 20:08, Paul Wouters a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote cite="mid:alpine.LFD.2.03.1301081408050.9238@nohats.ca"
      type="cite">On Tue, 8 Jan 2013, Philippe Vouters wrote:
      <br>
      <br>
      <blockquote type="cite">I have been trying to create an EOF at EOL
        condition. I can't succeed with /usr/bin/vi, /usr/bin/vim and
        gedit. All these editors call printf("\n") at the last line and
        before exiting. Which editor did you use to create such a
        condition leading to your test case ?
        <br>
        <br>
        I'd like to thoroughly test my code suggestion to parser.l
        before I git commit.
        <br>
      </blockquote>
      <br>
      echo -n "foo" &gt; filename
      <br>
      <br>
      Paul
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>