162037
This commit is contained in:
parent
6c603be5b5
commit
975055dba8
@ -1,7 +1,28 @@
|
||||
diff -u rpm-4.4.2/lib/verify.c rpm-4.4.2/lib/verify.c
|
||||
--- rpm-4.4.2/lib/verify.c 2005-07-21 16:47:11.000000000 -0400
|
||||
+++ rpm-4.4.2/lib/verify.c 2005-08-26 12:23:35.000000000 -0400
|
||||
@@ -138,8 +138,10 @@
|
||||
--- rpm-4.4.2/lib/verify.c.contextverify 2005-09-22 13:24:09.000000000 -0400
|
||||
+++ rpm-4.4.2/lib/verify.c 2005-09-22 13:38:17.000000000 -0400
|
||||
@@ -122,24 +122,29 @@
|
||||
*/
|
||||
/*@-branchstate@*/
|
||||
if (selinuxEnabled == 1 && (flags & RPMVERIFY_CONTEXTS)) {
|
||||
- security_context_t con;
|
||||
+ security_context_t con = NULL;
|
||||
|
||||
rc = lgetfilecon(fn, &con);
|
||||
if (rc == -1)
|
||||
*res |= (RPMVERIFY_LGETFILECONFAIL|RPMVERIFY_CONTEXTS);
|
||||
else {
|
||||
- security_context_t fcontext;
|
||||
+ security_context_t fcontext = NULL;
|
||||
|
||||
/* Get file security context from patterns. */
|
||||
if (matchpathcon(fn,fmode,&fcontext) != 0) {
|
||||
/* Get file security context from package. */
|
||||
- fcontext = rpmfiFContext(fi);
|
||||
+ char * ficontext = NULL;
|
||||
+ ficontext = rpmfiFContext(fi);
|
||||
+ fcontext = xmalloc(sizeof(ficontext));
|
||||
+ strncpy(fcontext, ficontext, sizeof(ficontext));
|
||||
}
|
||||
|
||||
if (fcontext == NULL || strcmp(fcontext, con))
|
||||
*res |= RPMVERIFY_CONTEXTS;
|
||||
|
Loading…
Reference in New Issue
Block a user