Re: chmod from LSM

From: Seth Arnold (sarnoldat_private)
Date: Thu May 22 2003 - 09:52:32 PDT

  • Next message: Axelle Apvrille (LMC): "Re: Cannot load root_plug or capability: Security framework already initialized (2.5.66)"

    On Thu, May 22, 2003 at 09:17:24AM -0700, Michael Halcrow wrote:
    > I've been trying to re-implement sys_chmod inside of my LSM, but I
    > keep getting errno=14 every time I use __user_walk to get the dentry
    > for my file.  This is the EFAULT error code, which indicates that one
    
    Hopefully, your module is already working with a dentry or inode, in
    which case the __user_walk() function is superfluous. (Given a pathname
    _in userspace_, it copies the pathname to the kernel and then performs a
    lookup on the name to find a dentry.)
    
    If your pathname originates in the the kernel, then the copy operation
    which normally works userspace-->kernelspace is now being asked to
    perform kernelspace-->kernelspace. Since the path is already in the
    kernel, you don't need that. :)
    
    I hope this helps.
    
    -- 
    "In God we trust, all others we monitor."
     -- NSA, Intercept Operators's motto, 1970
    
    
    

    _______________________________________________ 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 May 22 2003 - 09:53:17 PDT