Problems with RE matching in .cloginrc

john heasley heas at shrubbery.net
Wed Nov 14 18:23:34 UTC 2001


Thu, Oct 18, 2001 at 06:34:53PM -0700, john heasley:
> Tue, Oct 16, 2001 at 11:09:08PM -0400, Andrew Partan:
> > On Tue, Oct 16, 2001 at 06:31:36PM +1300, Dylan Hall wrote:
> > > The workaround is to remove the check for $loginname@$router from
> > > jlogin. Can you suggest a more elegant fix?
> > 
> > Hmm; I think that jlogin is the only *login that has this login at router
> > stuff.  I think that this bit should be removed.  Is anyone using it?
> > 	--asp at partan.com (Andrew Partan)
> 
> i put that in there a _long_ time ago.  i can't remember why and (grumble)
> the cvs note is empty, but suspect it was a stepping stone.  however, i
> see how it might be useful for a passphrase, granted "user at host" probably
> isnt the right thing.  comments?
> 
> otherwise, it should go.

if i havent bunged it up...

Index: jlogin.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/jlogin.in,v
retrieving revision 1.26
diff -c -r1.26 jlogin.in
*** jlogin.in	2001/11/02 22:05:01	1.26
--- jlogin.in	2001/11/14 18:22:17
***************
*** 452,468 ****
        # command line passwd
        set passwd $userpasswd
      } else {
!       set userpswd [lindex [find userpassword $loginname@$router] 0]
!       if { "$userpswd" == "" } {
!         set userpswd [lindex [find userpassword $router] 0]
!       }
!       if { "$userpswd" == "" } {
!         set passwd [lindex [find password $loginname@$router] 0]
          if { "$passwd" == "" } {
!           set passwd [lindex [find password $router] 0]
          }
-       } else {
-         set passwd $userpswd
        }
      }
  
--- 452,464 ----
        # command line passwd
        set passwd $userpasswd
      } else {
!       set passwd [lindex [find userpassword $loginname] 0]
!       if { "$passwd" == "" } {
!         set passwd [lindex [find password $router] 0]
          if { "$passwd" == "" } {
! 	  send_user "Error: no password for $router in $password_file.\n"
! 	  continue
          }
        }
      }
  



More information about the Rancid-discuss mailing list