mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
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
This commit is contained in:
parent
07ff474a68
commit
c4f2941e0b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317601
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user