summaryrefslogtreecommitdiffstats
path: root/loader2/selinux.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-08-13 00:52:40 +0000
committerChris Lumens <clumens@redhat.com>2005-08-13 00:52:40 +0000
commit26091625f3cf24dc0ba5bf655a83a868c5b20e89 (patch)
treea492c91713966c8050f0cee47cad79e87d15dbea /loader2/selinux.c
parenta96d25d6bdae5703ff8d9ee5993d9942f2a6a48d (diff)
downloadanaconda-26091625f3cf24dc0ba5bf655a83a868c5b20e89.tar.gz
anaconda-26091625f3cf24dc0ba5bf655a83a868c5b20e89.tar.xz
anaconda-26091625f3cf24dc0ba5bf655a83a868c5b20e89.zip
Support logging levels in the loader just like in the python parts of the
installer. Also make the output look the same. This isn't going to be nearly as sophisticated as the python logging module, but it will at least behave similarly with command line options.
Diffstat (limited to 'loader2/selinux.c')
-rw-r--r--loader2/selinux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/loader2/selinux.c b/loader2/selinux.c
index 4cf721a0e..33a861b27 100644
--- a/loader2/selinux.c
+++ b/loader2/selinux.c
@@ -40,7 +40,7 @@ static char * getpolicyver() {
buf = malloc(32);
buf = memset(buf, 0, 32);
if ((read(fd, buf, 32)) == -1) {
- logMessage("error getting policy version: %s", strerror(errno));
+ logMessage(ERROR, "error getting policy version: %s", strerror(errno));
free(buf);
close(fd);
return NULL;
@@ -88,16 +88,16 @@ int loadpolicy() {
}
if (access(fn, R_OK) || access(bfn, R_OK)) {
- logMessage("Unable to load suitable SELinux policy");
+ logMessage(ERROR, "Unable to load suitable SELinux policy");
return -1;
}
- logMessage("Loading SELinux policy from %s", fn);
+ logMessage(INFO, "Loading SELinux policy from %s", fn);
if (!(pid = fork())) {
setenv("LD_LIBRARY_PATH", LIBPATH, 1);
execl("/usr/sbin/load_policy",
"/usr/sbin/load_policy", "-q", "-b", fn, bfn, NULL);
- logMessage("exec of load_policy failed: %s", strerror(errno));
+ logMessage(ERROR, "exec of load_policy failed: %s", strerror(errno));
exit(1);
}