From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: load_policy has to be moved to /sbin from /usr/sbin to handle initrd executing load_policy
Date: Wed, 30 Sep 2009 13:56:20 -0400 [thread overview]
Message-ID: <4AC39BC4.8020804@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
Ubunto and Fedora have moved to a model where the initrd executes load_policy -i.
This means load_policy has to be in /sbin since /usr might not be mounted.
[-- Attachment #2: load_policy.patch --]
[-- Type: text/plain, Size: 1251 bytes --]
diff --git a/libsemanage/src/conf-parse.y b/libsemanage/src/conf-parse.y
index 23661bf..16e3c30 100644
--- a/libsemanage/src/conf-parse.y
+++ b/libsemanage/src/conf-parse.y
@@ -263,7 +263,7 @@ static int semanage_conf_init(semanage_conf_t * conf)
calloc(1, sizeof(*(current_conf->load_policy)))) == NULL) {
return -1;
}
- if ((conf->load_policy->path = strdup("/usr/sbin/load_policy")) == NULL) {
+ if ((conf->load_policy->path = strdup("/sbin/load_policy")) == NULL) {
return -1;
}
conf->load_policy->args = NULL;
diff --git a/policycoreutils/load_policy/Makefile b/policycoreutils/load_policy/Makefile
index 2dd2943..91dc6c8 100644
--- a/policycoreutils/load_policy/Makefile
+++ b/policycoreutils/load_policy/Makefile
@@ -1,6 +1,7 @@
# Installation directories.
PREFIX ?= ${DESTDIR}/usr
-SBINDIR ?= $(PREFIX)/sbin
+SBINDIR ?= $(DESTDIR)/sbin
+USRSBINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
LOCALEDIR ?= /usr/share/locale
@@ -17,6 +18,8 @@ install: all
install -m 755 $(TARGETS) $(SBINDIR)
test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
install -m 644 load_policy.8 $(MANDIR)/man8/
+ -mkdir -p $(USRSBINDIR)
+ ln -s /sbin/load_policy $(USRSBINDIR)/load_policy
clean:
-rm -f $(TARGETS) *.o
next reply other threads:[~2009-09-30 17:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 17:56 Daniel J Walsh [this message]
2009-09-30 17:59 ` load_policy has to be moved to /sbin from /usr/sbin to handle initrd executing load_policy Stephen Smalley
2009-09-30 18:16 ` Daniel J Walsh
2009-11-10 21:16 ` Chad Sellers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AC39BC4.8020804@redhat.com \
--to=dwalsh@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.