summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2006-08-14 23:00:24 +0000
committerPeter Jones <pjones@redhat.com>2006-08-14 23:00:24 +0000
commit771b0c766bbfc697c0f35db60fc0bb6c03917fdf (patch)
treee297c3a50e7ad2ac9066e572f0c0e51c98032d3c /loader2
parenta77167455e8f2ea3c31f1e0308c8c46232f92c85 (diff)
downloadanaconda-771b0c766bbfc697c0f35db60fc0bb6c03917fdf.tar.gz
anaconda-771b0c766bbfc697c0f35db60fc0bb6c03917fdf.tar.xz
anaconda-771b0c766bbfc697c0f35db60fc0bb6c03917fdf.zip
- Fix building with newer libselinux
Diffstat (limited to 'loader2')
-rw-r--r--loader2/loader.c1
-rw-r--r--loader2/selinux.c18
-rw-r--r--loader2/selinux.h1
3 files changed, 1 insertions, 19 deletions
diff --git a/loader2/loader.c b/loader2/loader.c
index 0676cb130..484ebbf23 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -83,6 +83,7 @@
#include "net.h"
#include "telnetd.h"
+#include <selinux/selinux.h>
#include "selinux.h"
#include "../isys/imount.h"
diff --git a/loader2/selinux.c b/loader2/selinux.c
index 1e50d534f..f142a7000 100644
--- a/loader2/selinux.c
+++ b/loader2/selinux.c
@@ -48,21 +48,3 @@ int loadpolicy() {
return 0;
}
-/* set a context for execution, from libselinux */
-int setexeccon(char * context) {
- int fd;
- ssize_t ret;
-
- fd = open("/proc/self/attr/exec", O_RDWR);
- if (fd < 0)
- return -1;
- if (context)
- ret = write(fd, context, strlen(context)+1);
- else
- ret = write(fd, NULL, 0); /* clear */
- close(fd);
- if (ret < 0)
- return -1;
- else
- return 0;
-}
diff --git a/loader2/selinux.h b/loader2/selinux.h
index faba65261..3cc7c8ab8 100644
--- a/loader2/selinux.h
+++ b/loader2/selinux.h
@@ -1,7 +1,6 @@
#ifndef SELINUX_H
#define SELINUX_H
-int setexeccon(char * context);
int loadpolicy();
#define ANACONDA_CONTEXT "system_u:system_r:anaconda_t:s0"