• Stephen Smalley's avatar
    libselinux: support specifying file_contexts.bin file path · 6c8be56d
    Stephen Smalley authored
    
    
    At present, the label_file backend expects to be provided the path
    to the text file_contexts file and always appends the .bin suffix
    when checking for the binary file_contexts.bin file.  If one
    attempts to directly specify the path to a file_contexts.bin file
    to selabel_open(), it will fail as the code will append a second
    .bin suffix to it.  Check to see if the file path already has a .bin
    suffix and do not append it in that case.
    
    Change-Id: Id560d093440a2aba99cef28c20133b35feebf950
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    6c8be56d
label_file.c 17.2 KB