svn commit: r301167 - head/lib/libcasper/services/cap_grp
Ed Schouten
ed at FreeBSD.org
Wed Jun 1 20:45:23 UTC 2016
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
More information about the svn-src-all
mailing list