• P
    selinux: Fix a problem in security_netlbl_sid_to_secattr() · 99d854d2
    Paul Moore 提交于
    Currently when SELinux fails to allocate memory in
    security_netlbl_sid_to_secattr() the NetLabel LSM domain field is set to
    NULL which triggers the default NetLabel LSM domain mapping which may not
    always be the desired mapping.  This patch fixes this by returning an error
    when the kernel is unable to allocate memory.  This could result in more
    failures on a system with heavy memory pressure but it is the "correct"
    thing to do.
    Signed-off-by: NPaul Moore <paul.moore@hp.com>
    Acked-by: NJames Morris <jmorris@namei.org>
    99d854d2
services.c 66.1 KB