Re: Updated auth patch for 2.4.12

From: richard offer (offerat_private)
Date: Thu Oct 11 2001 - 17:11:27 PDT

  • Next message: Chris Wright: "Re: Updated auth patch for 2.4.12"

    * frm chrisat_private "10/11/2001 02:40:17 PM -0700" | sed '1,$s/^/* /'
    *
    ** richard offer (offerat_private) wrote:
    *> 
    *> 
    *> Attached is the auth patch updated for 2.4.12 (there was one conflict in
    *> fs/attr.c)
    * 
    * as stephen reminded me...DQUOT_TRANSFER needs to happen _after_
    * successfully passing lsm hook, so your change to fs/attr.c isn't
    * completely right ;-/
    
    Should this mean that there should be a new hook that would allow for a
    module to implement a quota migration decision ? It seems that its
    currently basing its decision on uids/gids only.
    
    
    Currently I've got (no point sending the whole patch again until there are
    further comments) :-
    
    	if (inode->i_op && inode->i_op->setattr) {
    		error = security_ops->inode_ops->setattr(error,dentry, attr);
    		if (!error)
    			error = inode->i_op->setattr(dentry, attr);
    	} else {
    		error = inode_change_ok(inode, attr);
    		error = security_ops->inode_ops->setattr(error,dentry, attr);
    		if (!error) {
    			if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
    			    (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
    				error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
    			if (!error)
    				inode_setattr(inode, attr);
    		}
    	}
    
    
    
    * -chris
    
    richard.
    
    -- 
    -----------------------------------------------------------------------
    Richard Offer                     Technical Lead, Trust Technology, SGI
    "Specialization is for insects"
    _______________________________________________________________________
    
    
    _______________________________________________
    linux-security-module mailing list
    linux-security-moduleat_private
    http://mail.wirex.com/mailman/listinfo/linux-security-module
    



    This archive was generated by hypermail 2b30 : Thu Oct 11 2001 - 17:12:32 PDT