- fix: /etc/security/selinux/file_contexts is default path.
CVS patchset: 7220
CVS date: 2004/04/07 23:26:00
4.3.1 -> 4.4:
- - use package build time as EVR comparison tie breaker.
- - fix: don't add leading space to %* argv expansion (#119059).
- - scareMem = 0 everywhere, document deprecation phase out.
- pentium3/pentium4 arch support (pluto@PLD).
- cpuid() cleanups for PIC/non-PIC and gcc 3.4 (pluto@PLD).
- rpmGlob() is now locale independent (wiget@PLD).
4.3 -> 4.3.1:
+ - fix: don't add leading space to %* argv expansion (#119059).
+ - scareMem = 0 everywhere, document deprecation phase out.
+ - fix: add u+w to FIXPERMS.
+ - add buildtime to rpmds, methods to retrieve.
+ - python: hide labelCompare() underneath ds.cmp(a,b).
+ - fix: segfault on --recontext if file_contexts unreadable (#117374).
+ - fix: /etc/security/selinux/file_contexts is default path.
4.2.2 -> 4.3:
- upgrade to zlib-1.2.beta7.
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
rpmsx sx = NULL;
- const char ** av;
+ const char ** av = NULL;
int ac;
size_t nb;
char * t;
int * fcnb;
if ((ac = rpmfiFC(fi)) <= 0) {
- av = NULL;
ac = 0;
goto exit;
}
* Find the stem of a file name.
* Error iff a file in the root directory or a regex that is too complex.
*
+ * @param sx security context patterns
* @retval *bpp ptr to text after stem.
* @return stem index, -1 on error
*/
-static int rpmsxFind(const rpmsx sx, const char ** bpp)
+static int rpmsxFind(/*@null@*/ const rpmsx sx, const char ** bpp)
/*@modifies *bpp @*/
{
size_t stem_len = rpmsxsFStem(*bpp);
rpmsxs sxs;
int i;
- if (stem_len)
+ if (sx != NULL && stem_len > 0)
for (i = 0; i < sx->nsxs; i++) {
sxs = sx->sxs + i;
if (stem_len != sxs->len)
/*@-branchstate@*/
if (fn == NULL)
- fn = "/etc/security/selinux/src/policy/file_contexts/file_contexts";
+ fn = "/etc/security/selinux/file_contexts";
/*@=branchstate@*/
if ((fp = fopen(fn, "r")) == NULL) {
* @return file security context
*/
/*@owned@*/ /*@null@*/
-const char * rpmsxFContext(rpmsx sx, const char * fn, mode_t fmode)
+const char * rpmsxFContext(/*@null@*/ rpmsx sx, const char * fn, mode_t fmode)
/*@modifies sx @*/;
#ifdef __cplusplus