Re: chmod from LSM

From: Seth Arnold (sarnoldat_private)
Date: Wed May 21 2003 - 11:37:46 PDT

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

    On Wed, May 21, 2003 at 10:36:36AM -0700, Michael Halcrow wrote:
    > Anyone have any good ways of chmod'ing a file from inside an LSM
    > module?  No hacks, please.  :-)
    
    Take a look at sys_chmod() for some ideas how it should work. The kernel
    source most easily available to me appears to go through some hoops with
    struct iattr newattrs, performs the mode masking operations on the
    structure, then uses notify_change() to perform the modifications.
    (This is probably to assist tools such as the file access monitor, used
    in many explorer.exe-work-alikes.)
    
    I hope this helps...
    
    -- 
    "I think anybody who believes that they understand the will of God,
    and can act as an agent for God, is dangerous." -- Chris Hedges
    
    
    

    _______________________________________________ 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 : Wed May 21 2003 - 11:38:27 PDT