.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2001 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%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. .\" .\" 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. .\" %%%LICENSE_END .\" .\" [should really be seteuid.3] .\" Modified, 27 May 2004, Michael Kerrisk .\" Added notes on capability requirements .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH SETEUID 2 "15 septembre 2017" Linux "Manuel du programmeur Linux" .SH NOM seteuid, setegid \- Définir les UID et GID effectifs .SH SYNOPSIS \fB#include \fP .br \fB#include \fP .PP \fBint seteuid(uid_t \fP\fIeuid\fP\fB);\fP .br \fBint setegid(gid_t \fP\fIegid\fP\fB);\fP .PP .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP .ad l \fBseteuid\fP(), \fBsetegid\fP()\ : .RS 4 _POSIX_C_SOURCE\ >=\ 200112L || /* Glibc versions <= 2.19: */ _BSD_SOURCE .RE .ad .SH DESCRIPTION \fBseteuid\fP() sets the effective user ID of the calling process. Unprivileged processes may only set the effective user ID to the real user ID, the effective user ID or the saved set\-user\-ID. .PP .\" When .\" .I euid .\" equals \-1, nothing is changed. .\" (This is an artifact of the implementation in glibc of seteuid() .\" using setresuid(2).) Ceci fonctionne exactement de la même façon avec \fBsetegid\fP() en raisonnant en terme de groupe (GID) au lieu d'utilisateur (UID). .SH "VALEUR RENVOYÉE" En cas de succès, zéro est renvoyé. En cas d'erreur, \fB\-1\fP est renvoyé et \fIerrno\fP reçoit une valeur adéquate. .PP \fINote\fP\ : dans certains cas, \fBseteuid\fP() peut échouer alors même que l'UID de l'appelant est 0\ ; ne pas vérifier la valeur renvoyée par \fBseteuid\fP() pour détecter un échec est une grave erreur qui compromet la sécurité du système. .SH ERREURS .TP \fBEINVAL\fP L'identifiant utilisateur ou groupe cible n'est pas valide dans cet espace de noms. .TP \fBEPERM\fP In the case of \fBseteuid\fP(): the calling process is not privileged (does not have the \fBCAP_SETUID\fP capability in its user namespace) and \fIeuid\fP does not match the current real user ID, current effective user ID, or current saved set\-user\-ID. .IP In the case of \fBsetegid\fP(): the calling process is not privileged (does not have the \fBCAP_SETGID\fP capability in its user namespace) and \fIegid\fP does not match the current real group ID, current effective group ID, or current saved set\-group\-ID. .SH CONFORMITÉ POSIX.1\-2001, POSIX.1\-2008, 4.3BSD. .SH NOTES Définir l'UID (GID) effectif à la valeur de l'UID (GID) sauvé est possible depuis Linux 1.1.37 (1.1.38). Sur un système UNIX inconnu, il faut vérifier la présence de la constante \fB_POSIX_SAVED_IDS\fP. .PP Under glibc 2.0, \fBseteuid(\fP\fIeuid\fP\fB)\fP is equivalent to \fBsetreuid(\-1,\fP\fI euid\fP\fB)\fP and hence may change the saved set\-user\-ID. Under glibc 2.1 and later, it is equivalent to \fBsetresuid(\-1,\fP\fI euid\fP\fB, \-1)\fP and hence does not change the saved set\-user\-ID. Analogous remarks hold for \fBsetegid\fP(), with the difference that the change in implementation from \fBsetregid(\-1,\fP\fI egid\fP\fB)\fP to \fBsetresgid(\-1,\fP\fI egid\fP\fB, \-1)\fP occurred in glibc 2.2 or 2.3 (depending on the hardware architecture). .PP D'après POSIX.1, \fBseteuid\fP() (resp. \fBsetegid\fP()) n'a pas besoin de permettre à \fIeuid\fP (resp. \fIegid\fP) d'avoir la même valeur que l'identifiant d'utilisateur (resp. de groupe) effectif, et certaines implémentations ne le permettent effectivement pas. .SS "différences entre bibliothèque C et noyau" On Linux, \fBseteuid\fP() and \fBsetegid\fP() are implemented as library functions that call, respectively, \fBsetreuid\fP(2) and \fBsetregid\fP(2). .SH "VOIR AUSSI" \fBgeteuid\fP(2), \fBsetresuid\fP(2), \fBsetreuid\fP(2), \fBsetuid\fP(2), \fBcapabilities\fP(7), \fBcredentials\fP(7), \fBuser_namespaces\fP(7) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot , Cédric Boutillier et Frédéric Hantrais . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .