summaryrefslogtreecommitdiff
path: root/Userland/chroot.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-01 17:17:23 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-01 19:21:19 +0100
commita28f29c82c1967bd017f02aa6ce254335cd48394 (patch)
treee9f6b0db8aa4569a7dd00829fdabdeb1b56f79cf /Userland/chroot.cpp
parent13aa3d2d62e3fcd21c029cf91c930d09deb148cb (diff)
downloadserenity-a28f29c82c1967bd017f02aa6ce254335cd48394.zip
Kernel+LibC: Don't allow a directory to become a subdirectory of itself
If you try to do this (e.g "mv directory directory"), sys$rename() will now fail with EDIRINTOSELF. Dr. POSIX says we should return EINVAL for this, but a custom error code allows us to print a much more helpful error message when this problem occurs. :^)
Diffstat (limited to 'Userland/chroot.cpp')
0 files changed, 0 insertions, 0 deletions