+static int fsmLsetfcon(FSM_t fsm)
+{
+ int rc = 0;
+ if (fsm->fcontext == NULL || *fsm->fcontext == '\0'
+ || rstreq(fsm->fcontext, "<<none>>"))
+ return rc;
+ rc = lsetfilecon(fsm->path, (security_context_t)fsm->fcontext);
+ if (_fsm_debug && (FSM_LSETFCON & FSM_SYSCALL))
+ rpmlog(RPMLOG_DEBUG, " %8s (%s, %s) %s\n", fileStageString(FSM_LSETFCON),
+ fsm->path, fsm->fcontext,
+ (rc < 0 ? strerror(errno) : ""));
+ if (rc < 0) rc = (errno == EOPNOTSUPP ? 0 : CPIOERR_LSETFCON_FAILED);
+ return rc;
+}
+