Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

CHROOT(2)

��������
chroot - ����� ��������� ��������

���������

        int chroot (path)
        char *path;

��������
�������� path �������� ���������� �� ���������� ��� ��������. ����� ���������� ���������� ������ chroot ��������� ������� ���������� ��������. ������ � ��������� �������� ���������� ����� ������ �� ���������� ������, ������ �������� ������� ������ /. ����� �������� �������� ��� ���� �� ����������.

��� ��������� ���������� ���������� ������ chroot ����������, ����� ��������������� �������� ����������� ������������� ������������ ��� ��������������� �����������������.

� �������� �������� ����������� .. ���������������� ��� ��� ������ ��������� ��������. ������� ��� ����������� �� ����� �������������� ��� ������� � ������, ������������� ��� ��������� � ������ � �������� ��������.

��������� ����� chroot ����������� �������� � ����� ��������� �������� �� ����������, ���� ��������� ���� �� ���� �� ��������� �������:

[ENOTDIR]
��������� �������� �� �������� ���������.
[ENOENT]
��������� ������� �� ����������.
[EPERM]
����������� ������������� ������������ �� �������� ��������������� �����������������.
[EFAULT]
�������� path ��������� �� ������� ����������� �������� ��������� ������������.
[EINTR]
�� ����� ���������� ���������� ������ ���������� ������.
[ENOLINK]
���������� ��� path ��������� �� ��������� ���������, ����� � ������� � ������ ������ ���.
[EMULTIHOP] ���������� path ������� ������������� ��������� � ��������� �����������.

��. �����
chdir(2).

�����������
��� �������� ���������� ��������� ����� 0; � ������ ������ ������������ -1, � ���������� errno ������������� ��� ������.
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT