libroot/posix: fchdir() should not accept AT_FDCWD.
It doesn't make sense to change directories to the current one. Should fix #19059.
This commit is contained in:
@@ -23,6 +23,8 @@ chdir(const char *path)
|
||||
int
|
||||
fchdir(int fd)
|
||||
{
|
||||
if (fd < 0)
|
||||
RETURN_AND_SET_ERRNO(EBADF);
|
||||
RETURN_AND_SET_ERRNO(_kern_setcwd(fd, NULL));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user