• Paul Moore's avatar
    NetLabel: Allow passing the LSM domain as a shared pointer · 00447872
    Paul Moore authored
    Smack doesn't have the need to create a private copy of the LSM "domain" when
    setting NetLabel security attributes like SELinux, however, the current
    NetLabel code requires a private copy of the LSM "domain".  This patches fixes
    that by letting the LSM determine how it wants to pass the domain value.
    
     * NETLBL_SECATTR_DOMAIN_CPY
       The current behavior, NetLabel assumes that the domain value is a copy and
       frees it when done
    
     * NETLBL_SECATTR_DOMAIN
       New, Smack-friendly behavior, NetLabel assumes that the domain value is a
       reference to a string managed by the LSM and does not free it when done
    Signed-off-by: default avatarPaul Moore <paul.moore@hp.com>
    Acked-by: default avatarJames Morris <jmorris@namei.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    00447872
smack_lsm.c 57.3 KB