Page MenuHomeFreeBSD

D47343.diff
No OneTemporary

D47343.diff

diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9
--- a/share/man/man9/groupmember.9
+++ b/share/man/man9/groupmember.9
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
.\" DAMAGE.
.\"
-.Dd August 18, 2023
+.Dd October 31, 2024
.Dt GROUPMEMBER 9
.Os
.Sh NAME
@@ -35,9 +35,9 @@
.In sys/param.h
.In sys/ucred.h
.Ft bool
-.Fn groupmember "gid_t gid" "struct ucred *cred"
+.Fn groupmember "gid_t gid" "const struct ucred *cred"
.Ft bool
-.Fn realgroupmember "gid_t gid" "struct ucred *cred"
+.Fn realgroupmember "gid_t gid" "const struct ucred *cred"
.Sh DESCRIPTION
The
.Fn groupmember
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1307,7 +1307,7 @@
* supplementary groups).
*/
bool
-groupmember(gid_t gid, struct ucred *cred)
+groupmember(gid_t gid, const struct ucred *cred)
{
/*
@@ -1328,7 +1328,7 @@
* groups).
*/
bool
-realgroupmember(gid_t gid, struct ucred *cred)
+realgroupmember(gid_t gid, const struct ucred *cred)
{
if (gid == cred->cr_rgid)
return (true);
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -155,8 +155,8 @@
void cru2x(struct ucred *cr, struct xucred *xcr);
void cru2xt(struct thread *td, struct xucred *xcr);
void crsetgroups(struct ucred *cr, int n, gid_t *groups);
-bool groupmember(gid_t gid, struct ucred *cred);
-bool realgroupmember(gid_t gid, struct ucred *cred);
+bool groupmember(gid_t gid, const struct ucred *cred);
+bool realgroupmember(gid_t gid, const struct ucred *cred);
#endif /* _KERNEL */
#endif /* !_SYS_UCRED_H_ */

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 13, 1:48 PM (19 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15782758
Default Alt Text
D47343.diff (1 KB)

Event Timeline