Date: Thu, 3 May 2018 07:28:04 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r333197 - stable/11/usr.sbin/mountd Message-ID: <201805030728.w437S4GQ097147@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Thu May 3 07:28:04 2018 New Revision: 333197 URL: https://svnweb.freebsd.org/changeset/base/333197 Log: MFC r332559: mountd: fix a crash when getgrouplist reports too many groups Sponsored by: Panzura Modified: stable/11/usr.sbin/mountd/mountd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/mountd/mountd.c ============================================================================== --- stable/11/usr.sbin/mountd/mountd.c Thu May 3 07:22:24 2018 (r333196) +++ stable/11/usr.sbin/mountd/mountd.c Thu May 3 07:28:04 2018 (r333197) @@ -2913,8 +2913,11 @@ parsecred(char *namelist, struct xucred *cr) } cr->cr_uid = pw->pw_uid; ngroups = XU_NGROUPS + 1; - if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) + if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups)) { syslog(LOG_ERR, "too many groups"); + ngroups = XU_NGROUPS + 1; + } + /* * Compress out duplicate. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805030728.w437S4GQ097147>