qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 504557: glib: add compatibility implementatio


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 504557: glib: add compatibility implementation for g_dir_m...
Date: Fri, 19 Aug 2016 06:00:09 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 50455700092412d90ffaf57ee5d00f38f7d1cc5b
      
https://github.com/qemu/qemu/commit/50455700092412d90ffaf57ee5d00f38f7d1cc5b
  Author: Sascha Silbe <address@hidden>
  Date:   2016-08-19 (Fri, 19 Aug 2016)

  Changed paths:
    M include/glib-compat.h

  Log Message:
  -----------
  glib: add compatibility implementation for g_dir_make_tmp()

We're going to make use of g_dir_make_tmp() in test-logging. Provide a
compatibility implementation of it for glib < 2.30.

May behave differently in some edge cases (e.g. pattern only at the
end of the template, the file name is not part of the error message),
but good enough in practice.

Signed-off-by: Sascha Silbe <address@hidden>
Message-id: address@hidden
[PMM: removed variable "template" which caused compilation failures
 when C++ files include glib-compat.h]
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 5f9f818ea88a013b2464563be354dd2f0f316407
      
https://github.com/qemu/qemu/commit/5f9f818ea88a013b2464563be354dd2f0f316407
  Author: Sascha Silbe <address@hidden>
  Date:   2016-08-19 (Fri, 19 Aug 2016)

  Changed paths:
    M tests/test-logging.c

  Log Message:
  -----------
  test-logging: don't hard-code paths in /tmp

Since f6880b7f [qemu-log: support simple pid substitution for logs],
test-logging creates files with hard-coded names in /tmp. In the best
case, this prevents multiple developers from running "make check" on
the same machine. In the worst case, it allows for symlink attacks,
enabling an attacker to overwrite files that are writable to the
developer running "make check".

Instead of hard-coding the paths, create a temporary directory using
g_dir_make_tmp() and clean it up afterwards.

Fixes: f6880b7f ("qemu-log: support simple pid substitution for logs")
Signed-off-by: Sascha Silbe <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/60c6b790fc5d...5f9f818ea88a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]