Author: ru
Date: Sun Feb  7 06:22:28 2010
New Revision: 203603
URL: http://svn.freebsd.org/changeset/base/203603

Log:
  MFC: r203486: Shortening a passphrase caused wrong authentication key
  to be used.

Modified:
  stable/8/sbin/ifconfig/ifcarp.c
Directory Properties:
  stable/8/sbin/ifconfig/   (props changed)

Modified: stable/8/sbin/ifconfig/ifcarp.c
==============================================================================
--- stable/8/sbin/ifconfig/ifcarp.c     Sun Feb  7 05:50:00 2010        
(r203602)
+++ stable/8/sbin/ifconfig/ifcarp.c     Sun Feb  7 06:22:28 2010        
(r203603)
@@ -96,6 +96,7 @@ setcarp_passwd(const char *val, int d, i
        if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
                err(1, "SIOCGVH");
 
+       memset(carpr.carpr_key, 0, sizeof(carpr.carpr_key));
        /* XXX Should hash the password into the key here, perhaps? */
        strlcpy(carpr.carpr_key, val, CARP_KEY_LEN);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to