static int setSecCtxByName(const char *src, const struct logInfo *log, char **pPrevCtx)
{
    int hasErrors = 0;
#ifdef WITH_SELINUX
    int fd;

    if (!selinux_enabled)
        /* pretend success */
        return 0;

    fd = open_logfile(src, log, 0);
    if (fd < 0) {
        message(MESS_ERROR, "error opening %s: %s\n", src, strerror(errno));
        return 1;
    }
    hasErrors = setSecCtx(fd, src, pPrevCtx);
    close(fd);
#else
    (void) src;
    (void) log;
    (void) pPrevCtx;
#endif
    return hasErrors;
}
static int setSecCtxByName(const char *src, const struct logInfo *log, char **pPrevCtx)
{
    int hasErrors = 0;
#ifdef WITH_SELINUX
    int fd;

    if (!selinux_enabled)
         
        return 0;

    fd = open_logfile(src, log, 0);
    if (fd < 0) {
        message(MESS_ERROR, "error opening %s: %s\n", src, strerror(errno));
        return 1;
    }
    hasErrors = setSecCtx(fd, src, pPrevCtx);
    close(fd);
#else
    (void) src;
    (void) log;
    (void) pPrevCtx;
#endif
    return hasErrors;
}