diff options
Diffstat (limited to 'src/logicalfile')
-rw-r--r-- | src/logicalfile/LMI_UnixFileProvider.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logicalfile/LMI_UnixFileProvider.c b/src/logicalfile/LMI_UnixFileProvider.c index d822565..ff9423b 100644 --- a/src/logicalfile/LMI_UnixFileProvider.c +++ b/src/logicalfile/LMI_UnixFileProvider.c @@ -137,7 +137,8 @@ static CMPIStatus LMI_UnixFileGetInstance( security_context_t context; struct selabel_handle *hnd; if (lgetfilecon(path, &context) < 0) { - CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Can't get selinux file context"); + lmi_warn("Can't get selinux file context: %s", path); + context = strdup("<<none>>"); } LMI_UnixFile_Set_SELinuxCurrentContext(&lmi_file, context); freecon(context); @@ -146,7 +147,8 @@ static CMPIStatus LMI_UnixFileGetInstance( CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Can't get selabel handle"); } if (selabel_lookup(hnd, &context, path, 0) < 0) { - CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Can't look up selinux file context"); + lmi_warn("Can't look up expected selinux file context: %s", path); + context = strdup("<<none>>"); } LMI_UnixFile_Set_SELinuxExpectedContext(&lmi_file, context); freecon(context); |