Date: Wed, 1 Jun 2016 20:45:21 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301167 - head/lib/libcasper/services/cap_grp Message-ID: <201606012045.u51KjLuF026869@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Wed Jun 1 20:45:21 2016 New Revision: 301167 URL: https://svnweb.freebsd.org/changeset/base/301167 Log: Don't call setgrent() in an unportable way. For FreeBSD 12, I'm considering updating setgrent() to have a function prototype that conforms to POSIX. FreeBSD seems to be the only operating system that lets setgrent() return an integer. It's also inconsistent with setpwent(). It looks like our libcasper depends on setgrent() returning an integer. Get rid of that. Reviewed by: oshogbo Differential Revision: https://reviews.freebsd.org/D6659 Modified: head/lib/libcasper/services/cap_grp/cap_grp.c Modified: head/lib/libcasper/services/cap_grp/cap_grp.c ============================================================================== --- head/lib/libcasper/services/cap_grp/cap_grp.c Wed Jun 1 20:44:28 2016 (r301166) +++ head/lib/libcasper/services/cap_grp/cap_grp.c Wed Jun 1 20:45:21 2016 (r301167) @@ -703,7 +703,9 @@ grp_setgrent(const nvlist_t *limits __un nvlist_t *nvlout __unused) { - return (setgrent() == 0 ? EFAULT : 0); + setgrent(); + + return (0); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606012045.u51KjLuF026869>