Date: Sun, 18 Mar 2018 19:50:33 +0000 (UTC) From: Mariusz Zaborski <oshogbo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331146 - head/lib/libcasper/services/cap_grp Message-ID: <201803181950.w2IJoXRT063012@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: oshogbo Date: Sun Mar 18 19:50:32 2018 New Revision: 331146 URL: https://svnweb.freebsd.org/changeset/base/331146 Log: The gids argument can be declared as const. We don't modified it in this function. Modified: head/lib/libcasper/services/cap_grp/cap_grp.3 head/lib/libcasper/services/cap_grp/cap_grp.c head/lib/libcasper/services/cap_grp/cap_grp.h Modified: head/lib/libcasper/services/cap_grp/cap_grp.3 ============================================================================== --- head/lib/libcasper/services/cap_grp/cap_grp.3 Sun Mar 18 19:34:30 2018 (r331145) +++ head/lib/libcasper/services/cap_grp/cap_grp.3 Sun Mar 18 19:50:32 2018 (r331146) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2018 +.Dd March 18, 2018 .Dt CAP_GRP 3 .Os .Sh NAME @@ -70,7 +70,7 @@ .Ft int .Fn cap_grp_limit_fields "cap_channel_t *chan" "const char * const *fields" "size_t nfields" .Ft int -.Fn cap_grp_limit_groups "cap_channel_t *chan" "const char * const *names" "size_t nnames" "gid_t *gids" "size_t ngids" +.Fn cap_grp_limit_groups "cap_channel_t *chan" "const char * const *names" "size_t nnames" "const gid_t *gids" "size_t ngids" .Sh DESCRIPTION The functions .Fn cap_getgrent , @@ -163,7 +163,7 @@ casper service and uses it to get a group name. cap_channel_t *capcas, *capgrp; const char *cmds[] = { "getgrgid" }; const char *fields[] = { "gr_name" }; -gid_t gid[] = { 1 }; +const gid_t gid[] = { 1 }; struct group *group; /* Open capability to Casper. */ Modified: head/lib/libcasper/services/cap_grp/cap_grp.c ============================================================================== --- head/lib/libcasper/services/cap_grp/cap_grp.c Sun Mar 18 19:34:30 2018 (r331145) +++ head/lib/libcasper/services/cap_grp/cap_grp.c Sun Mar 18 19:50:32 2018 (r331146) @@ -410,7 +410,7 @@ cap_grp_limit_fields(cap_channel_t *chan, const char * int cap_grp_limit_groups(cap_channel_t *chan, const char * const *names, - size_t nnames, gid_t *gids, size_t ngids) + size_t nnames, const gid_t *gids, size_t ngids) { nvlist_t *limits, *groups; unsigned int i; Modified: head/lib/libcasper/services/cap_grp/cap_grp.h ============================================================================== --- head/lib/libcasper/services/cap_grp/cap_grp.h Sun Mar 18 19:34:30 2018 (r331145) +++ head/lib/libcasper/services/cap_grp/cap_grp.h Sun Mar 18 19:50:32 2018 (r331146) @@ -57,7 +57,7 @@ int cap_grp_limit_cmds(cap_channel_t *chan, const char int cap_grp_limit_fields(cap_channel_t *chan, const char * const *fields, size_t nfields); int cap_grp_limit_groups(cap_channel_t *chan, const char * const *names, - size_t nnames, gid_t *gids, size_t ngids); + size_t nnames, const gid_t *gids, size_t ngids); #else #define cap_getgrent(chan) getgrent() #define cap_getgrnam(chan, name) getgrnam(name)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803181950.w2IJoXRT063012>