1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-03 12:35:02 +00:00

The gids argument can be declared as const.

We don't modified it in this function.
This commit is contained in:
Mariusz Zaborski 2018-03-18 19:50:32 +00:00
parent d892051323
commit 4468cd1a73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331146
3 changed files with 5 additions and 5 deletions

View File

@ -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. */

View File

@ -410,7 +410,7 @@ cap_grp_limit_fields(cap_channel_t *chan, const char * const *fields,
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;

View File

@ -57,7 +57,7 @@ int cap_grp_limit_cmds(cap_channel_t *chan, const char * const *cmds,
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)