From: ao@morpork.shnet.org (A. Ott)
Subject: rm -r hang patch
Date: 15 Nov 1998 22:48:00 +0100
Next Article (by Author): RSBAC v1.0.6 for 2.1.128 ao@morpork.shnet.org (A. Ott)
Previous Article (by Author): Request for discussion ao@morpork.shnet.org (A. Ott)
Articles sorted by: [Date]
[Author]
[Subject]
The hanging rm -r problem in 1.0.5 is solved, the following patch should be applied to fs/namei.c (cd fs ; patch < namei.diff). Amon. --- namei.c~ Fri Oct 30 21:00:07 1998 +++ namei.c Sun Nov 15 21:54:36 1998 @@ -1383,7 +1383,6 @@ union rsbac_target_id_t rsbac_target_id; union rsbac_target_id_t rsbac_new_target_id; union rsbac_attribute_value_t rsbac_attribute_value; - struct dentry * rsbac_dentry; #endif dentry = lookup_dentry(name, NULL, 0); @@ -1428,20 +1427,9 @@ #ifdef CONFIG_RSBAC if (rsbac_debug_aef) printk(KERN_DEBUG "do_unlink() [sys_unlink()]: calling ADF\n"); - /* looking up dentry of subdir */ - rsbac_dentry = rsbac_lookup_dentry(name,dget(dir),0); - if (IS_ERR(rsbac_dentry)) - { - if (rsbac_debug_aef && (PTR_ERR(rsbac_dentry) != -ENOENT)) - printk(KERN_DEBUG - "do_unlink() [sys_unlink()]: rsbac_lookup_dentry returned error nr. %li\n", - PTR_ERR(rsbac_dentry)); - error = -ENOENT; - goto exit_lock; - } - rsbac_target_id.dir.device = rsbac_dentry->d_inode->i_dev; - rsbac_target_id.dir.inode = rsbac_dentry->d_inode->i_ino; - rsbac_attribute_value.nlink = rsbac_dentry->d_inode->i_nlink; + rsbac_target_id.dir.device = dentry->d_inode->i_dev; + rsbac_target_id.dir.inode = dentry->d_inode->i_ino; + rsbac_attribute_value.nlink = dentry->d_inode->i_nlink; if (!rsbac_adf_request(R_DELETE, current->pid, T_FILE, @@ -1450,7 +1438,6 @@ rsbac_attribute_value)) { error = -EPERM; - dput(rsbac_dentry); goto exit_lock; } #endif @@ -1477,7 +1464,6 @@ "do_unlink() [sys_unlink()]: rsbac_adf_set_attr() returned error"); } } - dput(rsbac_dentry); #endif exit_lock: -- ## CrossPoint v3.11 ## - To unsubscribe ao@morpork.shnet.org (A. Ott) from the rsbac list, send a mail to majordomo@morpork.shnet.org with unsubscribe rsbac as single line in the body.
Next Article (by Author): RSBAC v1.0.6 for 2.1.128 ao@morpork.shnet.org (A. Ott)
Previous Article (by Author): Request for discussion ao@morpork.shnet.org (A. Ott)
Articles sorted by: [Date]
[Author]
[Subject]