criu/test
Tycho Andersen ae3cb4fb1f restore: open the pidfile with O_EXCL
There is a potential attack here where if someone is restoring something and
criu write the pid to a file the attacker controls, the attacker can then
re-write that to whatever pid they want. ciru should instead open the file with
O_EXCL so that the restore fails if the file exists.

We don't need O_TRUNC here since we're O_EXCL-ing the file.

Reported-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-09-03 20:58:24 +04:00
..
app-emu test/*Makefile: add/append PHONY targets 2014-01-11 09:12:35 +04:00
bers test: bers -- Add short help output 2014-08-13 15:50:54 +04:00
ext-links test/ext-links: fix path to the ip tool 2014-06-24 22:50:17 +04:00
fault-injection test: check, that parasite can rollback itself (v2) 2013-08-06 15:11:12 +04:00
jenkins jenkins: exclude static/cgroups02 from the criu-dump job (v2) 2014-08-26 14:54:09 +04:00
libcriu test: Test how criu_dump_iters from library works 2014-06-27 14:29:56 +04:00
mem-snap test/meme-snap: remove an nonexistent target 2014-07-02 12:13:11 +04:00
mounts test: add mounts/ext in the "other" list 2014-07-03 19:21:20 +04:00
rpc make: test: rpc: don't forget to delete rpc_pb2.pyc 2014-08-06 09:36:00 +04:00
security test: security 2014-08-06 10:20:30 +04:00
tcp test: add a target to execute non-zdtm tests 2014-06-24 22:50:43 +04:00
unix-callback test: add a target to execute non-zdtm tests 2014-06-24 22:50:43 +04:00
zdtm test: Don't compare PIDs when searching for our locks 2014-09-02 19:09:47 +04:00
.gitignore zdtm/fanotify00: use /tmp instead of / 2014-09-02 16:12:32 +04:00
app-emu.sh test: add a script for executing all app-emu test cases 2012-11-22 19:08:29 +04:00
env.sh test: create env.sh for environment setting 2013-08-20 14:52:34 +04:00
functions.sh test/app-emu: wait while tasks are dying before starting restore 2012-11-22 19:08:14 +04:00
Makefile zdtm/fanotify00: use /tmp instead of / 2014-09-02 16:12:32 +04:00
maps.py zdtm: check that a process has the same set of VMS-s after restore 2013-09-23 15:23:12 +04:00
post-dump.sh zdtm: the post-dump scripts returns zero, if action is not post-dump 2013-07-24 19:10:49 +04:00
zdtm.sh restore: open the pidfile with O_EXCL 2014-09-03 20:58:24 +04:00
zdtm_ct.c zdtm: fix compile errors of zdtm_ct 2014-08-26 12:52:39 +04:00