From 20146da1fc4dd2e2db520cd214d6fad1180d79e5 Mon Sep 17 00:00:00 2001 From: dchagin Date: Sun, 4 Jun 2017 19:56:21 +0000 Subject: MFC r317601: Fix symlinkat() which use the newdfd argument to look up the old path, while it should use it for the new path instead. Approved by: re (kib) --- sys/compat/linux/linux_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_file.c') diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 37b8595..6480fc8 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -826,7 +826,7 @@ linux_symlinkat(struct thread *td, struct linux_symlinkat_args *args) int error, dfd; dfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd; - LCONVPATHEXIST_AT(td, args->oldname, &path, dfd); + LCONVPATHEXIST(td, args->oldname, &path); /* Expand LCONVPATHCREATE so that `path' can be freed on errors */ error = linux_emul_convpath(td, args->newname, UIO_USERSPACE, &to, 1, dfd); if (to == NULL) { -- cgit v1.1