From owner-svn-src-stable-7@FreeBSD.ORG Wed Apr 20 21:00:25 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497331065677; Wed, 20 Apr 2011 21:00:25 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 358288FC1A; Wed, 20 Apr 2011 21:00:25 +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 p3KL0PQW066215; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3KL0PBx066213; Wed, 20 Apr 2011 21:00:25 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201104202100.p3KL0PBx066213@svn.freebsd.org> From: Colin Percival Date: Wed, 20 Apr 2011 21:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220901 - releng/7.3 releng/7.3/sys/conf releng/7.3/usr.sbin/mountd releng/7.4 releng/7.4/sys/conf releng/7.4/usr.sbin/mountd releng/8.1 releng/8.1/sys/conf releng/8.1/usr.sbin/mountd r... X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 21:00:25 -0000 Author: cperciva Date: Wed Apr 20 21:00:24 2011 New Revision: 220901 URL: http://svn.freebsd.org/changeset/base/220901 Log: Fix CIDR parsing bug in mountd ACLs. Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd Modified: stable/7/usr.sbin/mountd/mountd.c Changes in other areas also in this revision: Modified: releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/usr.sbin/mountd/mountd.c releng/7.4/UPDATING releng/7.4/sys/conf/newvers.sh releng/7.4/usr.sbin/mountd/mountd.c releng/8.1/UPDATING releng/8.1/sys/conf/newvers.sh releng/8.1/usr.sbin/mountd/mountd.c releng/8.2/UPDATING releng/8.2/sys/conf/newvers.sh releng/8.2/usr.sbin/mountd/mountd.c stable/8/usr.sbin/mountd/mountd.c Modified: stable/7/usr.sbin/mountd/mountd.c ============================================================================== --- stable/7/usr.sbin/mountd/mountd.c Wed Apr 20 19:41:08 2011 (r220900) +++ stable/7/usr.sbin/mountd/mountd.c Wed Apr 20 21:00:24 2011 (r220901) @@ -2676,7 +2676,7 @@ makemask(struct sockaddr_storage *ssp, i for (i = 0; i < len; i++) { bits = (bitlen > CHAR_BIT) ? CHAR_BIT : bitlen; - *p++ = (1 << bits) - 1; + *p++ = (u_char)~0 << (CHAR_BIT - bits); bitlen -= bits; } return 0;