.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" 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 .\" .\" Translated 8 Jan 1996 Miguel A. Sepulveda (miguel@typhoon.harvard.edu) .\" Modified 1 Jul 1996 Miguel A. Sepulveda (angel@vivaldi.princeton.edu) .\" Translation revised on Wed Apr 29 18:30:20 CEST 1998 by Gerardo .\" Aburruzaga García .\" Translation revised Tue Aug 18 1998 by Juan Piernas .\" .TH GETGROUPS 2 "10 Diciembre 1997" "Linux 2.0.32" "Manual del Programador de Linux" .SH NOMBRE getgroups, setgroups \- obtiene/asigna la lista de IDs de grupo suplementarios .SH SINOPSIS .B #include .sp .BI "int getgroups(int " size ", gid_t " list []); .sp 2 .B #define __USE_BSD .br .B #include .sp .BI "int setgroups(size_t " size ", const gid_t *" list ); .SH DESCRIPCIÓN .TP .B getgroups Se devuelven como mucho .I size grupos suplementarios en .IR list . Si .I size es cero, .I list no se modifica, pero se devuelve el número total de grupos suplementarios para el proceso. .TP .B setgroups Asigna los grupos suplementarios para el proceso. Sólo el superusuario puede usar esta función. .SH "VALOR DEVUELTO" .TP .B getgroups En caso de éxito, se devuelve el número de grupos suplementarios. En caso de error, se devuelve \-1 y se pone en .I errno un valor apropiado. .TP .B setgroups En caso de éxito, se devuelve 0. Si hay un error, \-1, y se pone en .I errno un valor apropiado. .SH ERRORES .TP .B EFAULT .I list tiene una dirección inválida. .TP .B EPERM Para .BR setgroups , el usuario no es el superusuario. .TP .B EINVAL Para .BR setgroups , .I size es más grande que .B NGROUPS (32 para Linux 2.0.32). Para .BR getgroups , .I size es menor que el número de IDs de grupos suplementarios, pero no es cero. .SH "CONFORME A" SVr4, SVID (sólo en la distribución 4; estas llamadas al sistema no estaban presentes en SVr3), X/OPEN, 4.3BSD. La función .B getgroups está en POSIX.1. Puesto que .B setgroups requiere privilegios, no está cubierta por POSIX.1. .SH FALLOS La macro .B __USE_BSD probablemente no debería ser necesaria para .BR setgroups . .SH "VÉASE TAMBIÉN" .BR initgroups (3), .BR getgid (2), .BR setgid (2)