* syscalls.cc (chroot): Disallow chroot into special directories.
Return EPERM instead.
This commit is contained in:
parent
cb1975812d
commit
7b8b467def
@ -1,3 +1,8 @@
|
|||||||
|
2006-03-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* syscalls.cc (chroot): Disallow chroot into special directories.
|
||||||
|
Return EPERM instead.
|
||||||
|
|
||||||
2006-03-02 Corinna Vinschen <corinna@vinschen.de>
|
2006-03-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
|
* fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
|
||||||
|
@ -2359,6 +2359,8 @@ chroot (const char *newroot)
|
|||||||
set_errno (ENOENT);
|
set_errno (ENOENT);
|
||||||
else if (!path.isdir ())
|
else if (!path.isdir ())
|
||||||
set_errno (ENOTDIR);
|
set_errno (ENOTDIR);
|
||||||
|
else if (path.isspecial ())
|
||||||
|
set_errno (EPERM);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getwinenv("PATH="); /* Save the native PATH */
|
getwinenv("PATH="); /* Save the native PATH */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user