diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mount_portalfs/portald.h | 1 | ||||
-rw-r--r-- | usr.sbin/mountd/mountd.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/mount_portalfs/portald.h b/usr.sbin/mount_portalfs/portald.h index 5bd63ed..99cd5d7 100644 --- a/usr.sbin/mount_portalfs/portald.h +++ b/usr.sbin/mount_portalfs/portald.h @@ -36,6 +36,7 @@ */ #include <sys/cdefs.h> +#include <sys/ucred.h> #include <fs/portalfs/portal.h> /* diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 6977b93..b6ca3cd 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -2637,7 +2637,7 @@ parsecred(namelist, cr) char *names; struct passwd *pw; struct group *gr; - gid_t groups[NGROUPS + 1]; + gid_t groups[XU_NGROUPS + 1]; int ngroups; cr->cr_version = XUCRED_VERSION; @@ -2665,7 +2665,7 @@ parsecred(namelist, cr) return; } cr->cr_uid = pw->pw_uid; - ngroups = NGROUPS + 1; + ngroups = XU_NGROUPS + 1; if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) syslog(LOG_ERR, "too many groups"); /* @@ -2690,7 +2690,7 @@ parsecred(namelist, cr) return; } cr->cr_ngroups = 0; - while (names != NULL && *names != '\0' && cr->cr_ngroups < NGROUPS) { + while (names != NULL && *names != '\0' && cr->cr_ngroups < XU_NGROUPS) { name = strsep(&names, ":"); if (isdigit(*name) || *name == '-') { cr->cr_groups[cr->cr_ngroups++] = atoi(name); @@ -2702,7 +2702,7 @@ parsecred(namelist, cr) cr->cr_groups[cr->cr_ngroups++] = gr->gr_gid; } } - if (names != NULL && *names != '\0' && cr->cr_ngroups == NGROUPS) + if (names != NULL && *names != '\0' && cr->cr_ngroups == XU_NGROUPS) syslog(LOG_ERR, "too many groups"); } |