Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man2/getgroups.2
Real path: /usr/share/man/man2/getgroups.2
Zurück
'\" te .\" Copyright (c) 2009, 2023, Oracle and/or its affiliates. .\" Copyright (c) 1989, AT&T. All rights reserved. .TH getgroups 2 "30 Jan 2023" "Oracle Solaris 11.4" "System Calls" .SH NAME getgroups, setgroups \- get or set supplementary group access list IDs .SH SYNOPSIS .LP .nf #include <unistd.h> \fBint\fR \fBgetgroups\fR(\fBint\fR \fIgidsetsize\fR, \fBgid_t *\fR\fIgrouplist\fR); .fi .LP .nf \fBint\fR \fBsetgroups\fR(\fBint\fR \fIngroups\fR, \fBconst gid_t *\fR\fIgrouplist\fR); .fi .SH DESCRIPTION .sp .LP The \fBgetgroups()\fR function gets the current supplemental group access list of the calling process and stores the result in the array of group IDs specified by \fIgrouplist\fR. This array has \fIgidsetsize\fR entries and must be large enough to contain the entire list. This list cannot be larger than \fBNGROUPS_MAX\fR. If \fIgidsetsize\fR equals 0, \fBgetgroups()\fR will return the number of groups to which the calling process belongs without modifying the array pointed to by \fIgrouplist\fR. .sp .LP The \fBsetgroups()\fR function sets the supplementary group access list of the calling process from the array of group IDs specified by \fIgrouplist\fR. The number of entries is specified by \fIngroups\fR and can not be greater than \fBNGROUPS_MAX\fR. .SH RETURN VALUES .sp .LP Upon successful completion, \fBgetgroups()\fR returns the number of supplementary group IDs set for the calling process and \fBsetgroups()\fR returns \fB0\fR. Otherwise, \fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP The \fBgetgroups()\fR and \fBsetgroups()\fR functions will fail if: .sp .ne 2 .mk .na \fB\fBEFAULT\fR\fR .ad .RS 10n .rt A referenced part of the array pointed to by \fIgrouplist\fR is an illegal address. .RE .sp .LP The \fBgetgroups()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The value of \fIgidsetsize\fR is non-zero and less than the number of supplementary group IDs set for the calling process. .RE .sp .LP The \fBsetgroups()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The value of \fIngroups\fR is greater than {\fBNGROUPS_MAX\fR}. .RE .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 10n .rt The {\fBPRIV_PROC_SETID\fR} privilege is not asserted in the effective set of the calling process. .RE .SH USAGE .sp .LP Use of the \fBsetgroups()\fR function requires the {\fBPRIV_PROC_SETID\fR} privilege. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level Async-Signal-Safe _ Standard For \fBgetgroups()\fR, see \fBstandards\fR(7). .TE .sp .SH SEE ALSO .sp .LP \fBgroups\fR(1), \fBchown\fR(2), \fBgetuid\fR(2), \fBsetuid\fR(2), \fBgetgrnam\fR(3C), \fBgetgrouplist\fR(3C), \fBinitgroups\fR(3C), \fBlimits.h\fR(3HEAD) \fBattributes\fR(7), \fBprivileges\fR(7), \fBstandards\fR(7) .sp .LP \fIngroups_max Parameter\fR in \fIOracle Solaris 11.4 Tunable Parameters Reference Manual\fR .SH HISTORY .sp .LP The \fBgetgroups()\fR and \fBsetgroups()\fR functions have been included in all Sun and Oracle releases of Solaris. .sp .LP The value defined in <\fBlimits.h\fR> for \fBNGROUPS_MAX\fR was raised to 1024 in the Oracle Solaris 11.4.0 release. In prior releases it was defined to be 16. .sp .LP The default value of the \fBngroups_max\fR system tunable was raised to 1024 in the Oracle Solaris 11.4.0 release. In prior releases it was defined to be 16. .sp .LP The maximum limit of the \fBngroups_max\fR system tunable was raised to 1024 in the Solaris 10 8/11 release and Solaris 10 kernel patches. In prior releases it was defined to be 32.