aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2011-04-20 21:00:24 +0000
committerColin Percival <cperciva@FreeBSD.org>2011-04-20 21:00:24 +0000
commit459a0b16118d13b009dd7ffeaf4926940661ca7a (patch)
tree5bf8194e1c11fe5967e9515aa3be86ef42a85b28
parenta92e32c6e92d43c510782860a055a2d736966c11 (diff)
downloadsrc-459a0b16118d13b009dd7ffeaf4926940661ca7a.tar.gz
src-459a0b16118d13b009dd7ffeaf4926940661ca7a.zip
Fix CIDR parsing bug in mountd ACLs.
Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd
Notes
Notes: svn path=/releng/7.4/; revision=220901
-rw-r--r--UPDATING3
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--usr.sbin/mountd/mountd.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/UPDATING b/UPDATING
index 5b17c1fd3d1d..a92fedb06e7e 100644
--- a/UPDATING
+++ b/UPDATING
@@ -8,6 +8,9 @@ Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before running
portupgrade.
+20110420: p1 FreeBSD-SA-11:01.mountd
+ Fix CIDR parsing bug in mountd ACLs.
+
20110221:
FreeBSD 7.4-RELEASE
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 9c7d26ea0f5b..0a81cea9d58f 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="7.4"
-BRANCH="RELEASE"
+BRANCH="RELEASE-p1"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index fbcb4ec61cd9..d9a983a5ada2 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -2676,7 +2676,7 @@ makemask(struct sockaddr_storage *ssp, int bitlen)
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;