.\" Copyright (C), 1994, Graeme W. Wilford. (Wilf.) .\" .\" 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. .\" .\" Fri Jul 29th 12:56:44 BST 1994 Wilf. .\" Modified Fri Jan 31 17:06:56 1997 by Eric S. Raymond .\" .TH SETGID 2 "29 Juli 1994" "Linux 1.1.36" "Linux Programmeurs Handleiding" .SH NAAM setgid \- zet groep identiteit .SH OVERZICHT .B #include .sp .BI "int setgid(gid_t " gid ) .SH BESCHRIJVING .B setgid zet het geldende groep ID van het huidige proces. Als de aanroeper de supergebruiker is worden de echte en de bewaarde groep ID's ook gezet. Onder Linux is .B setgid verwezenlijkt zoals de POSIX versie met de _POSIX_SAVED_IDS uitrusting. Dit status een zet-gid (anders dan root) toe al zijn groep privileges te laten vallen, wat ongepriveligieerd werk te doen en dan het originele geldende groep ID weer op te pakken op een veilige manier. Als de gebruiker root is of het programma is zet-gid root moet er extra opgelet worden. De .B setgid functie test het geldende gid van de aanroeper, en als het de supergebruiker is worden alle met het proces verbonden groep ID's naar .IR gid gezet. Nadat dit is opgetreden is het onmogelijk voor het programma om root privileges te herwinnen. Dus een zet-gid-root programma dat wenst om tijdelijk zijn root privileges te laten vallen, de identiteit van een niet-root groep aan wil nemen, en dan de root privileges te hernemen kan .BR setgid " niet gebruiken." Je kunt dat bereiken met de (niet-POSIX, BSD) aanroep .BR setegid . .SH "TERUGGEEF WAARDE" Bij success wordt nul teruggegeven. Bij falen wordt \-1 teruggegeven, en wordt .I errno naar behoren gezet. .SH FOUTEN .TP .B EPERM {toestemming} De gebruiker is niet de supergebruiker, en .I gid komt niet overeen met het geldende groep ID of het bewaarde groep ID van het aanroepende proces. .SH "VOLDOET AAN" SVr4, SVID. .SH ZIE .BR getgid "(2) {krijg gid}," .BR setregid "(2) {zet echte/geldende gid}," .BR setegid "(2) {zet geldende gid}" .\" Translated Sat Nov 11 07:29:10 CET 2000 by Jos Boersema .\" .SH VERTALING Dit is een handleiding uit \fBmanpages-dev 1.29\fR. Alles wat tussen `\fB{\fR'..`\fB}\fR' staat is \fBaanvullende vertaling\fR, en hoort \fBniet\fR bij de originele handleiding. Email naar . .\"Vertaling Jos Boersema $Id: setgid.2,v 1.1 2003/04/28 18:43:35 bokkie Exp $