[rancid] Error with 10 character prompts
Michael Newton
mnewton at pofp.com
Sat Feb 28 00:18:17 UTC 2015
I’ve come across a bit of an odd problem in clogin, I believe it shows up
with prompts that are ten characters long, and the tenth character would
need escaping if it were put in a regex.
I modified clogin to show me what it was building for a prompt and this is
what I saw:
(ThisLong) #
reprompt is \(ThisLong\([^#>\r\n]+)?[#>](\([^)\r\n]+\))?
(ThisIsLonger) #
reprompt is \(ThisIsLon([^#>\r\n]+)?[#>](\([^)\r\n]+\))?
Notice on the shorter prompt, the parenthesis in the regex ends up being
escaped, I suspect because the prompt is being escaped and then trimmed.
The problem code is right near the top of run_commands().
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150228/900d4787/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5966 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150228/900d4787/attachment.bin>
More information about the Rancid-discuss
mailing list