summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2009-09-17 08:13:59 -0700
committerNathan Kinder <nkinder@redhat.com>2009-09-17 08:13:59 -0700
commit8af8dffe2416290b8777dcda3450d1e76ca8657c (patch)
tree8499e2182f20619cdc3d4396728f8fe86e73c00b /Makefile.am
parent0dedc61d90e84e15dad2d9ade77bc5503f6e4b62 (diff)
downloadds-8af8dffe2416290b8777dcda3450d1e76ca8657c.tar.gz
ds-8af8dffe2416290b8777dcda3450d1e76ca8657c.tar.xz
ds-8af8dffe2416290b8777dcda3450d1e76ca8657c.zip
Add SELinux policy for ldap-agent.
This adds SELinux policy to confine the SNMP subagent (ldap-agent). There were some changes required around the aubagent to make it work in a more standard fashion. I moved the ldap-agent binary and wrapper to sbindir. It was previously in bindir, yet it is not a user command. The location really should be sbindir per FHS. I added init scripts for the subagent, so it can now be managed using "service dirsrv-snmp [start|stop|restart|condrestart|status]". While doing this, I found that the parent process was exiting with 1 on success instead of 0, so I fixed that. I added a default config file for the subagent as well. When using the init script, the config file is hardcoded into this standard location. Having this config template should also hopefully cut down on configuration errors since it's self documenting. The pid file location was also changed to go into /var/run per FHS. Previously, it was written to the same directory as the log file. There are a few notes in the policy .te file about some bugs that we are working around for now. These bugs are mainly minor issues in the snmp policy that is a part of the selinux-policy pacakge. Once those bugs are fixed, we can clean our policy .te file up.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 665b1f4f..7f35c6a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -135,10 +135,10 @@ defaultgroup=@defaultgroup@
#------------------------
# Build Products
#------------------------
-sbin_PROGRAMS = ns-slapd
+sbin_PROGRAMS = ns-slapd ldap-agent-bin
-bin_PROGRAMS = dbscan-bin dsktune-bin infadd-bin ldap-agent-bin \
- ldclt-bin ldif-bin migratecred-bin mmldif-bin pwdhash-bin rsearch-bin
+bin_PROGRAMS = dbscan-bin dsktune-bin infadd-bin ldclt-bin \
+ ldif-bin migratecred-bin mmldif-bin pwdhash-bin rsearch-bin
server_LTLIBRARIES = libslapd.la libns-dshttpd.la
@@ -193,7 +193,8 @@ policy_DATA = $(POLICY_MODULE)
config_DATA = $(srcdir)/lib/ldaputil/certmap.conf \
$(srcdir)/ldap/schema/slapd-collations.conf \
- ldap/admin/src/template-initconfig
+ ldap/admin/src/template-initconfig \
+ ldap/servers/snmp/ldap-agent.conf
# the schema files in this list are either not
# standard schema, not tested, or not compatible
@@ -274,13 +275,13 @@ sbin_SCRIPTS = ldap/admin/src/scripts/setup-ds.pl \
ldap/admin/src/scripts/remove-ds.pl \
ldap/admin/src/scripts/start-dirsrv \
ldap/admin/src/scripts/stop-dirsrv \
- ldap/admin/src/scripts/restart-dirsrv
+ ldap/admin/src/scripts/restart-dirsrv \
+ wrappers/ldap-agent
bin_SCRIPTS = ldap/servers/slapd/tools/rsearch/scripts/dbgen.pl \
wrappers/dbscan \
wrappers/dsktune \
wrappers/infadd \
- wrappers/ldap-agent \
wrappers/ldclt \
wrappers/ldif \
$(srcdir)/ldap/admin/src/logconv.pl \
@@ -343,7 +344,8 @@ task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \
ldap/admin/src/scripts/template-verify-db.pl \
ldap/admin/src/scripts/template-dbverify
-init_SCRIPTS = wrappers/$(PACKAGE_NAME)
+init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
+ wrappers/$(PACKAGE_NAME)-snmp
initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
@@ -1315,3 +1317,8 @@ endif
%/$(PACKAGE_NAME): %/initconfig.in
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $^ > $@
+
+%/$(PACKAGE_NAME)-snmp: %/ldap-agent-initscript.in
+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
+ $(fixupcmd) $^ > $@
+