Re: chmod from LSM

From: Chris Wright (chrisat_private)
Date: Thu May 22 2003 - 14:07:59 PDT

  • Next message: Russell Coker: "security/lids/lids_net.c"

    * Michael Halcrow (mhalcrowat_private) 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
    > of the arguments may be an invalid pointer.  I have checked my
    > pointers carefully, and they are valid.  I tried allocating the memory
    > those pointers point to via __get_free_page, but that did not help.
    > Is there some sort of dark magic that I have yet to become acquainted
    > with in order for this to work?
    
    This is similar to the questions dmitry was asking.  You have the set_fs
    if you are going to use some of the interfaces that expect userpointers
    if they come from kernelspace.  But if you use the lowerlevel api's you
    won't need to do this kind of stuff.  notify_change() won't require it
    for example.
    
    thanks,
    -chris
    -- 
    Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
    _______________________________________________
    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 - 14:10:21 PDT