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
commitc495e8ff6bde8e4a50623943857fe83047ffb9ab (patch)
tree22aee1fce09d7dc463eab60158d868e18d27414b
parent045f17e533c0209bbcddcccbbb0192d61ffd6c9c (diff)
Fix CIDR parsing bug in mountd ACLs.
Approved by: so (cperciva) Security: FreeBSD-SA-11:01.mountd
Notes
svn path=/releng/8.2/; 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 1e95278f7c0a..198fee4e71b8 100644
--- a/UPDATING
+++ b/UPDATING
@@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
debugging tools present in HEAD were left in place because
sun4v support still needs work to become production ready.
+20110420: p1 FreeBSD-SA-11:01.mountd
+ Fix CIDR parsing bug in mountd ACLs.
+
20110221:
8.2-RELEASE.
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index d9301866dd19..91070a13bbbd 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="8.2"
-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 41a845f5b03a..f858a05f19be 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -2937,7 +2937,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;