• Paul Moore's avatar
    NetLabel: return the correct error for translated CIPSOv4 tags · 9fade4bf
    Paul Moore authored
    The CIPSOv4 translated tag #1 mapping does not always return the correct error
    code if the desired mapping does not exist; instead of returning -EPERM it
    returns -ENOSPC indicating that the buffer is not large enough to hold the
    translated value.  This was caused by failing to check a specific error
    condition.  This patch fixes this so that unknown mappings return
    -EPERM which is consistent with the rest of the related CIPSOv4 code.
    Signed-off-by: default avatarPaul Moore <paul.moore@hp.com>
    Signed-off-by: default avatarJames Morris <jmorris@namei.org>
    9fade4bf
cipso_ipv4.c 40.3 KB