.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), Märzch 28, 1992 .\" .\" 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 by Michael Haardt .\" Modified Wed Juli 21 22:18:17 1993 by Rik Faith .\" Modified 21 August 1994 by Michael Chastain .\" Fixed typoes. .\" Modified 13 Juni 1996 by aeb - Added a warning: . may be outside / tree. .\" Modified Wed November 6 03:50:45 1996 by Eric S. Raymond .\" Modified by Joseph S. Myers , 970821 .\" .\" Translated into German by Ralf Demmer, Translation & Consulting .\" rdemmer@rdemmer.de, http://www.rdemmer.de .\" Berlin, 20.4.1999 .\" .TH CHROOT 2 "20. April 1999" "Linux 2.0.30" "Systemaufrufe" .SH BEZEICHNUNG chroot \- Root-Verzeichnis wechseln .SH "ÜBERSICHT" .B #include .sp .BI int chroot(const char * path ); .SH BESCHREIBUNG .B chroot wechselt in das durch .IR path angegebenen Root-Verzeichnis. Dieses Verzeichnis wird für Pfadnamen verwendet, die mit / beginnen. Das Root-Verzeichnis wird an alle Child-Prozesse des aktuellen Prozesses vererbt. Nur der Super-User kann das Root-Verzeichnis ändern. Beachten Sie, dass dieser Aufruf keine Auswirkung auf das aktuelle Arbeitsverzeichnis hat, d.h. `.' kann sich außerhalb des mit `/' beginnenden Pfades befinden. .SH "RÜCKGABEWERT" Bei Erfolg wird 0 zurückgegeben. Tritt ein Fehler auf, ist der Rückgabewert \-1 und .I errno wird entsprechend gesetzt. .SH FEHLER In Abhängigkeit vom Dateisystem können andere Fehlerwerte zurückgegeben werden. Die verbreitetsten Fehler sind hier aufgelistet: .TP 0.8i .B EPERM Die tatsächliche UID ist nicht Null. .TP .B EFAULT .I path befindet sich außerhalb Ihres verfügbaren Adressbereichs. .TP .B ENAMETOOLONG .I path ist zu lang. .TP .B ENOENT Die Datei existiert nicht. .TP .B ENOMEM Zu wenig Kernelspeicher verfügbar. .TP .B ENOTDIR Ein Teil des .I path ist kein gültiges Verzeichnis. .TP .B EACCES Die Sucherlaubnis auf einen Teil des path-Prefix wurde verweigert. .TP .B ELOOP Es wurden zu viele symbolische Links bei der Auflösung des .IR path vorgefunden. .TP .B EIO Es ist ein E/A-Fehler (engl. I/O) aufgetreten. .SH "KONFORM ZU" SVr4, SVID, 4.4BSD, X/OPEN. Diese Funktion ist kein Bestandteil der POSIX.1-Spezifikation. SVr4 dokumentiert zusätzlich die Fehlerbedingungen EINTR, ENOLINK und EMULTIHOP. X/OPEN dokumentiert die Fehlerbedingungen EIO, ENOMEM oder EFAULT nicht. Diese Schnittstelle ist durch X/OPEN als Legacy vermerkt. .SH "SIEHE AUCH" .BR chdir (2).