projects
/
platform
/
upstream
/
enlightenment.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b430e4
)
E17: fix race condition when copying a file
author
Vincent Torri
<vincent.torri@gmail.com>
Sat, 21 Jul 2012 18:20:19 +0000
(18:20 +0000)
committer
Vincent Torri
<vincent.torri@gmail.com>
Sat, 21 Jul 2012 18:20:19 +0000
(18:20 +0000)
during the copy, the file can be accessed by users.
See http://cwe.mitre.org/data/definitions/689.html
So we apply the access rights after the creation of
the dest file.
Patch by Maxime Villard
SVN revision: 74284
src/bin/e_fm_op.c
patch
|
blob
|
history
diff --git
a/src/bin/e_fm_op.c
b/src/bin/e_fm_op.c
index
64b3c1f
..
1ea4cae
100644
(file)
--- a/
src/bin/e_fm_op.c
+++ b/
src/bin/e_fm_op.c
@@
-1250,6
+1250,7
@@
_e_fm_op_open_files(E_Fm_Op_Task *task)
data->to = fopen(task->dst.name, "wb");
if (!data->to)
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot open file '%s' for writing: %s.", task->dst.name);
+ _e_fm_op_copy_stat_info(task);
}
return 0;