linux(4): Fix unlink() after a125ed50

MFC after:		2 weeks
This commit is contained in:
Dmitry Chagin 2022-05-23 13:18:07 +03:00
parent 53726a1f1e
commit e0aef0d62d

View File

@ -741,7 +741,7 @@ linux_unlink(struct thread *td, struct linux_unlink_args *args)
if (error == EPERM) {
/* Introduce POSIX noncompliant behaviour of Linux */
if (kern_statat(td, 0, AT_FDCWD, args->path,
UIO_SYSSPACE, &st, NULL) == 0) {
UIO_USERSPACE, &st, NULL) == 0) {
if (S_ISDIR(st.st_mode))
error = EISDIR;
}