From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 11:43:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E00106566C; Thu, 4 Feb 2010 11:43:22 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B339D8FC22; Thu, 4 Feb 2010 11:43:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14BhMbX006185; Thu, 4 Feb 2010 11:43:22 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14BhMOn006183; Thu, 4 Feb 2010 11:43:22 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201002041143.o14BhMOn006183@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 4 Feb 2010 11:43:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203486 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 11:43:22 -0000 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);