.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) 1997 Andries Brouwer (aeb@cwi.nl) .\" .\" 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. .\" Translated into Spanish Mon Jan 26 1998 by Gerardo Aburruzaga .\" García .\" Revisado por Miguel Pérez Ibars el 1-diciembre-2004 .\" .TH SETRESUID 2 "15 noviembre 2001" "Linux 2.1.44" "Manual del Programador de Linux" .SH NOMBRE setresuid, setresgid \- establecen el UID o GID efectivo, real y salvado .SH SINOPSIS .B #include .sp .BI "int setresuid(uid_t " ruid ", uid_t " euid ", uid_t " suid ); .br .BI "int setresgid(gid_t " rgid ", gid_t " egid ", gid_t " sgid ); .SH DESCRIPCIÓN .B setresuid establece el UID real, el UID efectivo y el SETUID salvado del proceso actual. Los procesos de usuarios no privilegiados (esto es, procesos con cada uno de los UIDs real, efectivo y salvado distintos de cero) pueden cambiar el UID real, efectivo y salvado, cada uno a uno de: el UID actual, el UID efectivo actual o el UID salvado actual. El súper-usuario puede establecer los UIDs real, efectivo y salvado a valores arbitrarios. Si uno de los parámetros es igual a \-1, el valor correspondiente no se cambia. De forma completamente análoga, .B setresgid establece el GID real, efectivo y salvado del proceso en curso, con las mismas restricciones para procesos con cada uno de los UIDs real, efectivo y salvado distintos de cero. .SH "VALOR DEVUELTO" En caso de éxito, se devuelve cero. En caso de error, se devuelve \-1 y se pone en .I errno un valor adecuado. .SH ERRORES .TP .B EPERM El proceso en curso no era privilegiado e intentó cambiar los IDs de una forma no permitida. .SH "CONFORME A" Esta llamada no es estándar. .SH HISTORIA Esta llamada al sistema fue introducida por primera vez en HP-UX. En Linux está disponible desde la versión 2.1.44. Aquellos días también se podía encontrar en FreeBSD (para emulación de los binarios de Linux). .SH OBSERVACIONES Bajo HP-UX y FreeBSD el prototipo se encuentra en .IR . Bajo Linux no hay hasta ahora fichero de cabecera que incluya el prototipo - ésto es un fallo de glibc. Los programas que usen esta llamada al sistema deben añadir el prototipo ellos mismos. .SH "VÉASE TAMBIÉN" .BR getuid (2), .BR setuid (2), .BR getreuid (2), .BR setreuid (2), .BR getresuid (2)