Make linux(4) open(2)/openat(2) return ELOOP instead of EMLINK,
when being passed O_NOFOLLOW. This fixes LTP testcase openat02:5. Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22384
This commit is contained in:
parent
a8c08e008a
commit
dfe91e5e34
@ -132,8 +132,11 @@ linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int mod
|
||||
/* XXX LINUX_O_NOATIME: unable to be easily implemented. */
|
||||
|
||||
error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode);
|
||||
if (error != 0)
|
||||
if (error != 0) {
|
||||
if (error == EMLINK)
|
||||
error = ELOOP;
|
||||
goto done;
|
||||
}
|
||||
if (bsd_flags & O_NOCTTY)
|
||||
goto done;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user