summaryrefslogtreecommitdiffstats
path: root/UPDATING
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2009-06-19 17:10:35 +0000
committerbrooks <brooks@FreeBSD.org>2009-06-19 17:10:35 +0000
commitf53c1c309de799bd46cd12223b6f4966838f2e7a (patch)
tree851f3659dd95c07bf7aaf4a54cd53e83c804702d /UPDATING
parent020220234336a0527c3a4eb5fe739a256bd31981 (diff)
downloadFreeBSD-src-f53c1c309de799bd46cd12223b6f4966838f2e7a.zip
FreeBSD-src-f53c1c309de799bd46cd12223b6f4966838f2e7a.tar.gz
Rework the credential code to support larger values of NGROUPS and
NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024 and 1023 respectively. (Previously they were equal, but under a close reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it is the number of supplemental groups, not total number of groups.) The bulk of the change consists of converting the struct ucred member cr_groups from a static array to a pointer. Do the equivalent in kinfo_proc. Introduce new interfaces crcopysafe() and crsetgroups() for duplicating a process credential before modifying it and for setting group lists respectively. Both interfaces take care for the details of allocating groups array. crsetgroups() takes care of truncating the group list to the current maximum (NGROUPS) if necessary. In the future, crsetgroups() may be responsible for insuring invariants such as sorting the supplemental groups to allow groupmember() to be implemented as a binary search. Because we can not change struct xucred without breaking application ABIs, we leave it alone and introduce a new XU_NGROUPS value which is always 16 and is to be used or NGRPS as appropriate for things such as NFS which need to use no more than 16 groups. When feasible, truncate the group list rather than generating an error. Minor changes: - Reduce the number of hand rolled versions of groupmember(). - Do not assign to both cr_gid and cr_groups[0]. - Modify ipfw to cache ucreds instead of part of their contents since they are immutable once referenced by more than one entity. Submitted by: Isilon Systems (initial implementation) X-MFC after: never PR: bin/113398 kern/133867
Diffstat (limited to 'UPDATING')
-rw-r--r--UPDATING17
1 files changed, 17 insertions, 0 deletions
diff --git a/UPDATING b/UPDATING
index 6eff98b..adc63ea 100644
--- a/UPDATING
+++ b/UPDATING
@@ -22,6 +22,23 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW:
to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20090619:
+ NGROUPS_MAX and NGROUPS have been increased from 16 to 1023
+ and 1024 respectively. As long as no more than 16 groups per
+ process are used, no changes should be visible. When more
+ than 16 groups are used, old binaries may fail if they call
+ getgroups() or getgrouplist() with statically sized storage.
+ Recompiling will work around this, but applications should be
+ modified to use dynamically allocated storage for group arrays
+ as POSIX.1-2008 does not cap an implementation's number of
+ supported groups at NGROUPS_MAX+1 as previous versions did.
+
+ NFS and portalfs mounts may also be affected as the list of
+ groups is truncated to 16. Users of NFS who use more than 16
+ groups, should take care that negative group permissions are not
+ used on the exported file systems as they will not be reliable
+ unless a GSSAPI based authentication method is used.
+
20090616:
The compiling option ADAPTIVE_LOCKMGRS has been introduced.
This option compiles in the support for adaptive spinning for lockmgrs
OpenPOWER on IntegriCloud