mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
cred: Constify signature of groupmember() and realgroupmember()
Reviewed by emaste Approved by: markj (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D47343
This commit is contained in:
parent
2e031fd071
commit
b15110fb0d
@ -25,7 +25,7 @@
|
|||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
.\" DAMAGE.
|
.\" DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.Dd August 18, 2023
|
.Dd October 31, 2024
|
||||||
.Dt GROUPMEMBER 9
|
.Dt GROUPMEMBER 9
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -35,9 +35,9 @@
|
|||||||
.In sys/param.h
|
.In sys/param.h
|
||||||
.In sys/ucred.h
|
.In sys/ucred.h
|
||||||
.Ft bool
|
.Ft bool
|
||||||
.Fn groupmember "gid_t gid" "struct ucred *cred"
|
.Fn groupmember "gid_t gid" "const struct ucred *cred"
|
||||||
.Ft bool
|
.Ft bool
|
||||||
.Fn realgroupmember "gid_t gid" "struct ucred *cred"
|
.Fn realgroupmember "gid_t gid" "const struct ucred *cred"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Fn groupmember
|
.Fn groupmember
|
||||||
|
@ -1307,7 +1307,7 @@ group_is_supplementary(const gid_t gid, const struct ucred *const cred)
|
|||||||
* supplementary groups).
|
* supplementary groups).
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
groupmember(gid_t gid, struct ucred *cred)
|
groupmember(gid_t gid, const struct ucred *cred)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1328,7 +1328,7 @@ groupmember(gid_t gid, struct ucred *cred)
|
|||||||
* groups).
|
* groups).
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
realgroupmember(gid_t gid, struct ucred *cred)
|
realgroupmember(gid_t gid, const struct ucred *cred)
|
||||||
{
|
{
|
||||||
if (gid == cred->cr_rgid)
|
if (gid == cred->cr_rgid)
|
||||||
return (true);
|
return (true);
|
||||||
|
@ -155,8 +155,8 @@ void crcowfree(struct thread *td);
|
|||||||
void cru2x(struct ucred *cr, struct xucred *xcr);
|
void cru2x(struct ucred *cr, struct xucred *xcr);
|
||||||
void cru2xt(struct thread *td, struct xucred *xcr);
|
void cru2xt(struct thread *td, struct xucred *xcr);
|
||||||
void crsetgroups(struct ucred *cr, int n, gid_t *groups);
|
void crsetgroups(struct ucred *cr, int n, gid_t *groups);
|
||||||
bool groupmember(gid_t gid, struct ucred *cred);
|
bool groupmember(gid_t gid, const struct ucred *cred);
|
||||||
bool realgroupmember(gid_t gid, struct ucred *cred);
|
bool realgroupmember(gid_t gid, const struct ucred *cred);
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
#endif /* !_SYS_UCRED_H_ */
|
#endif /* !_SYS_UCRED_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user