[rancid] Cisco ACSW support

Brian De Wolf bldewolf at csupomona.edu
Thu Jul 7 23:25:57 UTC 2011


Hello,

I found a patch on this list from 2008 that added ACSW support but it
doesn't appear to have ever been merged.  Further, after applying it,
rancid still didn't work.  I have attached a revised patch that makes
it work again by adding a ";" to the end of the list of commands.  The
problem was that, in this case, WriteTerm was eating the line that held
"$prompt exit" so rancid assumed clogin exited uncleanly.  Instead,
this makes the switch print an extra prompt for WriteTerm to eat so
that rancid can see the exit line and realize that everything went as
expected.

Next, once we have a rancid run working correctly, I noticed it wasn't
hiding the tacacs passwords right.  This exposed a really broken regex
in rancid:
/^((tacacs|radius)-server\s(\w*[-\s(\s\S+])*\s?key) (\d )?\w+/

I've rewritten it to be less mind-bending, and added optional quotes
around the \w+ to support the style ACSW uses.

Please consider these patches for inclusion in future versions.

Thanks!
Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rancid-acsw.patch
Type: text/x-patch
Size: 1729 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20110707/3f4bb293/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rancid-tacacs-regex.patch
Type: text/x-patch
Size: 487 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20110707/3f4bb293/attachment-0001.bin>


More information about the Rancid-discuss mailing list