Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Apr 2017 05:56:58 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317601 - head/sys/compat/linux
Message-ID:  <201704300556.v3U5uwZ8088896@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sun Apr 30 05:56:57 2017
New Revision: 317601
URL: https://svnweb.freebsd.org/changeset/base/317601

Log:
  Fix symlinkat() which use the newdfd argument to look up the old path,
  while it should use it for the new path instead.
  
  Reported by:	trasz@
  MFC after:	1 month

Modified:
  head/sys/compat/linux/linux_file.c

Modified: head/sys/compat/linux/linux_file.c
==============================================================================
--- head/sys/compat/linux/linux_file.c	Sun Apr 30 02:08:46 2017	(r317600)
+++ head/sys/compat/linux/linux_file.c	Sun Apr 30 05:56:57 2017	(r317601)
@@ -826,7 +826,7 @@ linux_symlinkat(struct thread *td, struc
 	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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704300556.v3U5uwZ8088896>