[rancid] Strange Jerancid/Rancid behavior

Mack, David A (Dave) dmack at verizon.com
Mon Aug 22 23:39:38 UTC 2011


John,
	That fixed it. Can you tell me what the issue was?

Thanks!
Dave


___________________________________________________________________________
David A. Mack                                            (703) 886-2661 (W)
CCIE #6963 (Sec, SP OPS, SP and R&S) JNCIE-M #399 CISSP  (703) 431-7617 (C)
email:  dmack at verizon.com
___________________________________________________________________________
"We are now the knights who say... Ping!"

-----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