diff options
author | Ira Cooper <ira@samba.org> | 2013-06-13 14:06:13 -0400 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2013-06-17 13:39:15 -0400 |
commit | b77dfcc8362f3695ece944d5bb504276753a40f9 (patch) | |
tree | 2941ef558337dcd855be8e51a892f69f03fd386c | |
parent | be468fc6d7266e97f1330ad9a761169925f5f3f1 (diff) | |
download | illumos-joyent-b77dfcc8362f3695ece944d5bb504276753a40f9.tar.gz |
3691 setgroups() needs a sorted GID list for more than 16 groups
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/uts/common/os/cred.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/common/os/cred.c b/usr/src/uts/common/os/cred.c index 1ec63249ab..7add6a4b8e 100644 --- a/usr/src/uts/common/os/cred.c +++ b/usr/src/uts/common/os/cred.c @@ -19,6 +19,9 @@ * CDDL HEADER END */ /* + * Copyright (c) 2013, Ira Cooper. All rights reserved. + */ +/* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -1440,6 +1443,7 @@ crgrpcopyin(int n, gid_t *gidset) } mem->crg_ref = 1; mem->crg_ngroups = n; + qsort(mem->crg_groups, n, sizeof (gid_t), gidcmp); return (mem); } |