Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2011 21:00:25 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
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...
Message-ID:  <201104202100.p3KL0PdM066219@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/8/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/7/usr.sbin/mountd/mountd.c

Modified: stable/8/usr.sbin/mountd/mountd.c
==============================================================================
--- stable/8/usr.sbin/mountd/mountd.c	Wed Apr 20 19:41:08 2011	(r220900)
+++ stable/8/usr.sbin/mountd/mountd.c	Wed Apr 20 21:00:24 2011	(r220901)
@@ -2937,7 +2937,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;



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