26 lines
890 B
Diff
26 lines
890 B
Diff
diff --exclude-from=exclude -N -u -r nsalibsemanage/src/conf-parse.y libsemanage-1.6.8/src/conf-parse.y
|
|
--- nsalibsemanage/src/conf-parse.y 2006-06-05 13:20:27.000000000 -0400
|
|
+++ libsemanage-1.6.8/src/conf-parse.y 2006-06-16 13:27:59.000000000 -0400
|
|
@@ -25,6 +25,7 @@
|
|
#include <selinux/selinux.h>
|
|
#include <semanage/handle.h>
|
|
|
|
+#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
@@ -187,7 +188,12 @@
|
|
if ((conf->setfiles = calloc(1, sizeof(*(current_conf->setfiles)))) == NULL) {
|
|
return -1;
|
|
}
|
|
- if ((conf->setfiles->path = strdup("/sbin/setfiles")) == NULL ||
|
|
+ if (access("/sbin/setfiles",X_OK) == 0) {
|
|
+ conf->setfiles->path = strdup("/sbin/setfiles");
|
|
+ } else {
|
|
+ conf->setfiles->path = strdup("/usr/sbin/setfiles");
|
|
+ }
|
|
+ if ((conf->setfiles->path == NULL) ||
|
|
(conf->setfiles->args = strdup("-q -c $@ $<")) == NULL) {
|
|
return -1;
|
|
}
|