diff options
author | Greg Kurz | 2017-05-25 10:30:14 +0200 |
---|---|---|
committer | Greg Kurz | 2017-05-25 10:30:14 +0200 |
commit | 24df3371d97a7516605aef8abbc253a8c162b211 (patch) | |
tree | 4e24fa19e27fad4fdb6a3d30b68cfb1d5d809d9e /fsdev | |
parent | fsdev: fix virtfs-proxy-helper cwd (diff) | |
download | qemu-24df3371d97a7516605aef8abbc253a8c162b211.tar.gz qemu-24df3371d97a7516605aef8abbc253a8c162b211.tar.xz qemu-24df3371d97a7516605aef8abbc253a8c162b211.zip |
9pfs: assume utimensat() and futimens() are present
The utimensat() and futimens() syscalls have been around for ages (ie,
glibc 2.6 and linux 2.6.22), and the decision was already taken to
switch to utimensat() anyway when fixing CVE-2016-9602 in 2.9.
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'fsdev')
-rw-r--r-- | fsdev/virtfs-proxy-helper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 4c4238f62e..6c066ec9a0 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -945,7 +945,8 @@ static int process_requests(int sock) &spec[0].tv_sec, &spec[0].tv_nsec, &spec[1].tv_sec, &spec[1].tv_nsec); if (retval > 0) { - retval = qemu_utimens(path.data, spec); + retval = utimensat(AT_FDCWD, path.data, spec, + AT_SYMLINK_NOFOLLOW); if (retval < 0) { retval = -errno; } |