Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2010 11:43:22 +0000 (UTC)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203486 - head/sbin/ifconfig
Message-ID:  <201002041143.o14BhMOn006183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ru
Date: Thu Feb  4 11:43:22 2010
New Revision: 203486
URL: http://svn.freebsd.org/changeset/base/203486

Log:
  Shortening a passphrase caused wrong authentication key to be used.
  Fix this in a FreeBSD and OpenBSD compatible way.
  
  MFC after:	3 days

Modified:
  head/sbin/ifconfig/ifcarp.c

Modified: head/sbin/ifconfig/ifcarp.c
==============================================================================
--- head/sbin/ifconfig/ifcarp.c	Thu Feb  4 11:23:28 2010	(r203485)
+++ head/sbin/ifconfig/ifcarp.c	Thu Feb  4 11:43:22 2010	(r203486)
@@ -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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002041143.o14BhMOn006183>