OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man3 / getgrouplist.3
index 7c9f339..c0c6272 100644 (file)
@@ -1,6 +1,10 @@
 .\" Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
 .\" <mtk.manpages@gmail.com>
 .\"
+.\" A few pieces remain from an earlier version written in
+.\" 2002 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.\" A few pieces remain from an earlier version written in
-.\" 2002 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
-.\"
-.TH GETGROUPLIST 3 2008-07-03 "GNU" "Linux Programmer's Manual"
+.TH GETGROUPLIST 3 2014-08-19 "GNU" "Linux Programmer's Manual"
 .SH NAME
 getgrouplist \- get list of groups to which a user belongs
 .SH SYNOPSIS
@@ -73,7 +75,7 @@ including
 .IR group ;
 this value may be greater than the number of groups stored in
 .IR groups .
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 If the number of groups of which
 .I user
 is a member is less than or equal to
@@ -87,13 +89,13 @@ If the user is a member of more than
 groups, then
 .BR getgrouplist ()
 returns \-1.
-In this case the value returned in
+In this case, the value returned in
 .IR *ngroups
 can be used to resize the buffer passed to a further call
 .BR getgrouplist ().
-.SH "VERSIONS"
+.SH VERSIONS
 This function is present since glibc 2.2.4.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 This function is nonstandard; it appears on most BSDs.
 .SH BUGS
 In glibc versions before 2.3.3,
@@ -167,7 +169,7 @@ main(int argc, char *argv[])
     if (getgrouplist(argv[1], pw\->pw_gid, groups, &ngroups) == \-1) {
         fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\\n",
                 ngroups);
-       exit(EXIT_FAILURE);
+        exit(EXIT_FAILURE);
     }
 
     /* Display list of retrieved groups, along with group names */
@@ -184,9 +186,19 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .fi
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR getgroups (2),
 .BR setgroups (2),
 .BR getgrent (3),
+.BR group_member (3),
 .BR group (5),
 .BR passwd (5)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.