- python: throw exception on bad arg to labelCompare (#113661).
- re-add --enable-posixmutexes to build.
- fix: set fcontext from pkg when file_contexts doesn't exist (#114040).
+ - fix: set fcontext for "mkdir -p" directories not in packages.
4.2.1 -> 4.2.2:
- unify signal handling in librpmio, use condvar to deliver signal.
int dc = dnlCount(dnli);
int rc = 0;
int i;
+ rpmts ts = fsmGetTs(fsm);
+ rpmsx sx = rpmtsREContext(ts);
fsm->path = NULL;
*te = '\0';
st->st_mode = S_IFDIR | (fi->dperms & 07777);
rc = fsmNext(fsm, FSM_MKDIR);
- if (!rc)
+ if (!rc) {
+ /* XXX FIXME? only new dir will have context set. */
+ /* Get file security context from patterns. */
+ if (sx != NULL) {
+ fsm->fcontext = rpmsxFContext(sx, fsm->path, st->st_mode);
+ rc = fsmNext(fsm, FSM_LSETFCON);
+ }
+ if (fsm->fcontext == NULL)
rpmMessage(RPMMESS_DEBUG,
- _("%s directory created with perms %04o.\n"),
+ _("%s directory created with perms %04o, no context.\n"),
fsm->path, (unsigned)(st->st_mode & 07777));
+ else
+ rpmMessage(RPMMESS_DEBUG,
+ _("%s directory created with perms %04o, context %s.\n"),
+ fsm->path, (unsigned)(st->st_mode & 07777),
+ fsm->fcontext);
+ fsm->fcontext = NULL;
+ }
*te = '/';
}
if (rc)
/*@innerbreak@*/ break;
}
+ sx = rpmsxFree(sx);
if (rc) break;
/* Save last validated path. */
%changelog
* Sun Feb 15 2004 Jeff Johnson <jbj@jbj.org> 4.3-0.11
- fix: set fcontext from pkg when file_contexts doesn't exist (#114040).
+- fix: set fcontext for "mkdir -p" directories not in packages.
* Wed Feb 11 2004 Jeff Johnson <jbj@redhat.com> 4.3-0.10
- re-add --enable-posixmutexes to build.