[rancid] Strange Jerancid/Rancid behavior
Mack, David A (Dave)
dmack at verizon.com
Mon Aug 22 23:44:27 UTC 2011
Oh and btw the bgp neighbor passwords are also fluctuating. So I am going to use the same logic on them as well. You might want to include that with future updates.
Thanks!
Dave
-----Original Message-----
From: john heasley [mailto:heas at shrubbery.net]
Sent: Monday, August 22, 2011 6:32 PM
To: Mack, David A (Dave)
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] Strange Jerancid/Rancid behavior
Mon, Aug 22, 2011 at 12:34:01PM -0400, Mack, David A (Dave):
> All,
> Hello! I am in the process of bringing up a new Rancid server and have run into something with at least the jerancid script for Juniper ERXs. What I am seeing is related to password removal. I have filter passwords globally set to "no". However the ERXs have certain passwords that have their hashes calculated on the fly. So each time they are display the values shown will change. This means you get a new CVS every run. Jerancid has routines to handle two of these conditions for FTP and MPLS LDP passwords:
>
> # ftp host encrypted password oscillates
> if (/^(host \S+ \S+ ftp) /) {
> if ($filter_pwds >= 1 || /^host \S+ \S+ ftp \d /) {
> ProcessHistory("","","","!$1 <removed>\n"); next;
> }
> }
> # mpls ldp encrypted password oscillates
> if (/^(mpls ldp neighbor \S+ password)/) {
> if ($filter_pwds >= 1 || /^mpls ldp neighbor \S+ password \d /) {
> ProcessHistory("","","","!$1 <removed>\n"); next;
> }
> }
>
> I am comparing the collected configuration files between my old Rancid install and my new one and here is what I am seeing:
>
> Old Rancid:
>
> !host "FTP1" 172.15.1.1 ftp <removed>
> !host "FTP2" 172.15.1.2 ftp <removed>
>
> New Rancid:
>
> ! <removed>
> ! <removed>
Does this fix it?
Index: jerancid.in
===================================================================
--- jerancid.in (revision 2320)
+++ jerancid.in (working copy)
@@ -444,14 +444,16 @@
# ftp host encrypted password oscillates
if (/^(host \S+ \S+ ftp) /) {
+ my($prefix) = $1;
if ($filter_pwds >= 1 || /^host \S+ \S+ ftp \d /) {
- ProcessHistory("","","","!$1 <removed>\n"); next;
+ ProcessHistory("","","","!$prefix <removed>\n"); next;
}
}
# mpls ldp encrypted password oscillates
if (/^(mpls ldp neighbor \S+ password)/) {
+ my($prefix) = $1;
if ($filter_pwds >= 1 || /^mpls ldp neighbor \S+ password \d /) {
- ProcessHistory("","","","!$1 <removed>\n"); next;
+ ProcessHistory("","","","!$prefix <removed>\n"); next;
}
}
More information about the Rancid-discuss
mailing list