SHA256
1
0
forked from pool/qemu
qemu/0064-9pfs-local-remove-use-correct-path-.patch
Bruce Rogers fa62cbc344 Accepting request 505145 from home:bfrogers:branches:Virtualization
Latest security fixes, a fix to a security fix, and a tweak to how we select the compiler where size is critical. Also found we need --no-renames for git format-patch as we do our git patch workflow.

OBS-URL: https://build.opensuse.org/request/show/505145
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=345
2017-06-21 01:27:18 +00:00

29 lines
895 B
Diff

From d8ebbbc6a85bc9a6a6e194564719e43a51ec2e86 Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Mon, 19 Jun 2017 14:48:02 -0600
Subject: [PATCH] 9pfs: local: remove: use correct path component
Commit a0e640a8 introduced a path processing error.
Pass fstatat the dirpath based path component instead
of the entire path.
[BR: BSC#1045035]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/9pfs/9p-local.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 226234d386..47f6d9ec99 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -1044,7 +1044,7 @@ static int local_remove(FsContext *ctx, const char *path)
goto out;
}
- if (fstatat(dirfd, path, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
+ if (fstatat(dirfd, name, &stbuf, AT_SYMLINK_NOFOLLOW) < 0) {
goto err_out;
}