Page MenuHomeFreeBSD

D46920.diff
No OneTemporary

D46920.diff

diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -3610,7 +3610,6 @@
parsecred(char *namelist, struct expcred *cr)
{
char *name;
- int inpos;
char *names;
struct passwd *pw;
struct group *gr;
@@ -3652,23 +3651,12 @@
ngroups = NGROUPS_MAX + 1;
}
- /*
- * Compress out duplicate.
- */
- if (ngroups > 1 && groups[0] == groups[1]) {
- ngroups--;
- inpos = 2;
- } else {
- inpos = 1;
- }
if (ngroups > NGROUPS_MAX)
ngroups = NGROUPS_MAX;
if (ngroups > SMALLNGROUPS)
cr->cr_groups = malloc(ngroups * sizeof(gid_t));
cr->cr_ngroups = ngroups;
- cr->cr_groups[0] = groups[0];
- memcpy(&cr->cr_groups[1], &groups[inpos], (ngroups - 1) *
- sizeof(gid_t));
+ memcpy(cr->cr_groups, groups, ngroups * sizeof(gid_t));
return;
}
/*

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 6, 1:27 AM (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13626136
Default Alt Text
D46920.diff (864 B)

Event Timeline