Commit 9ddb91d3 authored by Thomas Schmitt's avatar Thomas Schmitt

Allowed to perform -rm_r /

parent a7e8b474
......@@ -994,7 +994,7 @@ int Xorriso_rmi(struct XorrisO *xorriso, void *boss_iter, off_t boss_mem,
if(ret<=0)
goto ex;
root_dir= iso_image_get_root(volume);
if(((void *) root_dir) == ((void *) victim_node)) {
if(((void *) root_dir) == ((void *) victim_node) && !(flag & 1)) {
sprintf(xorriso->info_text, "May not delete root directory");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
......@@ -1012,7 +1012,7 @@ int Xorriso_rmi(struct XorrisO *xorriso, void *boss_iter, off_t boss_mem,
} else {
if(flag&1) { /* rm -r */
if((xorriso->do_reassure==1 && !xorriso->request_not_to_ask) ||
(flag&32)) {
(flag&32) || ((void *) root_dir) == ((void *) victim_node)) {
/* Iterate over subordinates and delete them */
mem= boss_mem;
......@@ -1089,6 +1089,9 @@ dir_not_removed:;
}
}
if(((void *) root_dir) == ((void *) victim_node))
{ret= 2; goto ex;}
if(xorriso->request_to_abort)
{ret= 3; goto ex;}
boss_node= iso_node_get_parent(victim_node);
......
#define Xorriso_timestamP "2010.10.29.164503"
#define Xorriso_timestamP "2010.11.01.191542"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment