41f522a921
- Update from NSA * Merged further change to fixfiles -C from Dan Walsh. * Merged updated fixfiles script from Dan Walsh. - Fix error handling of restorecon
23 lines
898 B
Diff
23 lines
898 B
Diff
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.21.13/restorecon/restorecon.c
|
|
--- nsapolicycoreutils/restorecon/restorecon.c 2005-02-02 17:20:59.000000000 -0500
|
|
+++ policycoreutils-1.21.13/restorecon/restorecon.c 2005-02-08 13:32:22.000000000 -0500
|
|
@@ -118,8 +118,8 @@
|
|
int restore(char *filename) {
|
|
int retcontext=0;
|
|
int retval=0;
|
|
- security_context_t scontext;
|
|
- security_context_t prev_context;
|
|
+ security_context_t scontext=NULL;
|
|
+ security_context_t prev_context=NULL;
|
|
int len=strlen(filename);
|
|
struct stat st;
|
|
char path[PATH_MAX+1];
|
|
@@ -185,6 +185,7 @@
|
|
|
|
if (retcontext >= 0 || errno == ENODATA) {
|
|
int customizable=0;
|
|
+ if (retcontext < 0) prev_context=NULL;
|
|
if (retcontext < 0 ||
|
|
(strcmp(prev_context,scontext) != 0 &&
|
|
!(customizable=(force ? 0: (is_context_customizable(prev_context) > 0))))) {
|