mountd - Pass in an array of gid_t
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sun, 30 Nov 2014 13:07:01 +0000 (14:07 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sun, 30 Nov 2014 13:19:30 +0000 (14:19 +0100)
Taken from: FreeBSD SVN 136051

sbin/mountd/mountd.c

index ce05e80..7cf7831 100644 (file)
@@ -2081,7 +2081,7 @@ parsecred(char *namelist, struct ucred *cr)
        char *names;
        struct passwd *pw;
        struct group *gr;
-       int ngroups, groups[NGROUPS + 1];
+       gid_t ngroups, groups[NGROUPS + 1];
 
        /*
         * Set up the unprivileged user.
@@ -2112,7 +2112,7 @@ parsecred(char *namelist, struct ucred *cr)
                if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups))
                        syslog(LOG_ERR, "too many groups");
                /*
-                * Convert from int's to gid_t's and compress out duplicate
+                * Compress out duplicate
                 */
                cr->cr_ngroups = ngroups - 1;
                cr->cr_groups[0] = groups[0];