git: 3eb8bf041831 - stable/13 - realgroupmember(9): Link to groupmember(9), document the function

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Thu, 21 Dec 2023 13:43:39 UTC
The branch stable/13 has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=3eb8bf041831a0f5ee6e682a9826c1ae89b254a4

commit 3eb8bf041831a0f5ee6e682a9826c1ae89b254a4
Author:     Olivier Certner <olce.freebsd@certner.fr>
AuthorDate: 2023-08-17 23:54:46 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2023-12-21 13:37:59 +0000

    realgroupmember(9): Link to groupmember(9), document the function
    
    Reviewed by:            bcr (older version), mhorne
    Sponsored by:           Kumacom SAS
    Differential Revision:  https://reviews.freebsd.org/D40643
    
    (cherry picked from commit 5d9f38405a10fdcd9fc108c940dcf2642e9f1833)
    
    Approved by:    markj (mentor)
---
 share/man/man9/Makefile      | 1 +
 share/man/man9/groupmember.9 | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 18642ff86010..d237f677311a 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1155,6 +1155,7 @@ MLINKS+=g_provider.9 g_destroy_provider.9 \
 	g_provider.9 g_error_provider.9 \
 	g_provider.9 g_new_providerf.9
 MLINKS+=gone_in.9 gone_in_dev.9
+MLINKS+=groupmember.9 realgroupmember.9
 MLINKS+=hash.9 hash32.9 \
 	hash.9 hash32_buf.9 \
 	hash.9 hash32_str.9 \
diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9
index 3a516622efce..ae7ccd477955 100644
--- a/share/man/man9/groupmember.9
+++ b/share/man/man9/groupmember.9
@@ -36,6 +36,8 @@
 .In sys/ucred.h
 .Ft int
 .Fn groupmember "gid_t gid" "struct ucred *cred"
+.Ft int
+.Fn realgroupmember "gid_t gid" "struct ucred *cred"
 .Sh DESCRIPTION
 The
 .Fn groupmember
@@ -49,6 +51,11 @@ Considered groups in
 .Fa cred
 are the effective and supplementary groups.
 The real group is not taken into account.
+.Pp
+Function
+.Fn realgroupmember
+works the same except that it considers instead the real and supplementary
+groups, and not the effective one.
 .Sh RETURN VALUES
 If the
 .Fa gid