.\" -*- nroff -*- .\" .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" 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. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified Thu Oct 31 12:04:29 1996 by Eric S. Raymond .TH GETGROUPS 2 "10/12/1997" "Linux 2.0.32" "Manual do Programador Linux" .SH NOME getgroups, setgroups \- obtém/seleciona a lista sumplementar das IDs grupo .SH SINOPSE .B #include .br .B #include .sp .BI "int getgroups(int " size ", gid_t " list []); .sp 2 .B #define _BSD_SOURCE .br .B #include .sp .BI "int setgroups(size_t " size ", const gid_t *" list ); .SH DESCRIÇÂO .TP .B getgroups Até .I size grupos sumplementares são retornados na .IR list . Se .I size é zero, .I list não é modificado, mas o número total de grupos sumplementares para o processo é retornado. .TP .B setgroups Seleciona os grupos suplementares para o processo. Somente o superusuário pode usar esta função. .SH "VALORES RETORNADOS" .TP .B getgroups Em caso de sucesso, o número de IDs de grupos suplementares é retornado. Caso contrário, \-1 é retornado, e .I errno selecionado apropriadamente. .TP .B setgroups Em caso de sucesso, zero é retornado. Caso contrário, \-1 é retornado, e .I errno selecionado apropriadamente. .SH ERROS .TP .B EFAULT .I list tem um endereço inválido. .TP .B EPERM Para .BR setgroups , o usuário não é o superusuário. .TP .B EINVAL Para .BR setgroups , .I size é maior que .B NGROUPS (32 para o Linux 2.0.32). Para .BR getgroups , .I size é menor que o número de IDs de grupos suplementares, mas não é zero. .SH "DE ACORDO COM" SVr4, SVID (lançado somente na 4; estas chamadas não estavam presentes na SVr3), X/OPEN, 4.3BSD. A função .B getgroups está em POSIX.1. Desde .B setgroups requerer privilégios, ele não é coberto pela POSIX.1. .SH PROBLEMAS O sinalizador .B _BSD_SOURCE provavelmente não deveria ser retornado por .BR setgroups . .SH "VEJA TAMBÉM" .BR initgroups (3), .BR getgid (2), .BR setgid (2) .SH TRADUZIDO POR LDP-BR em 21/08/2000. \&\fR\&\f(CWAndré L. Fassone Canova (tradução)\fR \&\fR\&\f(CWxxxxxxxxxxxxxxxxxxxxxxxxx (revisão)\fR