summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrcritten@redhat.com <rcritten@redhat.com>2007-08-06 10:51:23 -0400
committerrcritten@redhat.com <rcritten@redhat.com>2007-08-06 10:51:23 -0400
commitb9b06a2a607ddc7a98ac78b46e63304b714f3cce (patch)
treedc8c625c3e10aa964d1d1187ebcabc9a67b396f1
parent993f76fe6035cf59cceb88f3611fc53680738007 (diff)
downloadfreeipa.git-b9b06a2a607ddc7a98ac78b46e63304b714f3cce.tar.gz
freeipa.git-b9b06a2a607ddc7a98ac78b46e63304b714f3cce.tar.xz
freeipa.git-b9b06a2a607ddc7a98ac78b46e63304b714f3cce.zip
Generate /etc/httpd/conf.d/ipa.conf from a template so the realm can
be set during installation
-rwxr-xr-xipa-server/freeipa-server.spec5
-rw-r--r--ipa-server/freeipa-server.spec.in5
-rw-r--r--ipa-server/ipaserver/krbinstance.py8
-rw-r--r--ipa-server/xmlrpc-server/Makefile3
-rw-r--r--ipa-server/xmlrpc-server/ipa.conf2
5 files changed, 10 insertions, 13 deletions
diff --git a/ipa-server/freeipa-server.spec b/ipa-server/freeipa-server.spec
index 8348e4b9..54a7ac20 100755
--- a/ipa-server/freeipa-server.spec
+++ b/ipa-server/freeipa-server.spec
@@ -12,8 +12,6 @@ BuildArch: noarch
Requires: python fedora-ds-base krb5-server krb5-server-ldap nss-tools openldap-clients httpd mod_python mod_auth_kerb python-ldap freeipa-python cyrus-sasl-gssapi
-%define httpd_conf /etc/httpd/conf.d
-
%description
FreeIPA is a server for identity, policy, and audit.
@@ -23,7 +21,6 @@ FreeIPA is a server for identity, policy, and audit.
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
-mkdir -p %{buildroot}%{httpd_conf}
make install DESTDIR=%{buildroot}
@@ -40,8 +37,6 @@ rm -rf %{buildroot}
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/*
-%{httpd_conf}/ipa.conf
-
%changelog
* Mon Aug 5 2007 Rob Crittenden <rcritten@redhat.com> - 0.1.0-3
diff --git a/ipa-server/freeipa-server.spec.in b/ipa-server/freeipa-server.spec.in
index 4de5207b..de6ff4ee 100644
--- a/ipa-server/freeipa-server.spec.in
+++ b/ipa-server/freeipa-server.spec.in
@@ -12,8 +12,6 @@ BuildArch: noarch
Requires: python fedora-ds-base krb5-server krb5-server-ldap nss-tools openldap-clients httpd mod_python mod_auth_kerb python-ldap freeipa-python cyrus-sasl-gssapi
-%define httpd_conf /etc/httpd/conf.d
-
%description
FreeIPA is a server for identity, policy, and audit.
@@ -23,7 +21,6 @@ FreeIPA is a server for identity, policy, and audit.
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
-mkdir -p %{buildroot}%{httpd_conf}
make install DESTDIR=%{buildroot}
@@ -40,8 +37,6 @@ rm -rf %{buildroot}
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/*
-%{httpd_conf}/ipa.conf
-
%changelog
* Mon Aug 5 2007 Rob Crittenden <rcritten@redhat.com> - 0.1.0-3
diff --git a/ipa-server/ipaserver/krbinstance.py b/ipa-server/ipaserver/krbinstance.py
index f4fe6001..84f8ebf2 100644
--- a/ipa-server/ipaserver/krbinstance.py
+++ b/ipa-server/ipaserver/krbinstance.py
@@ -79,6 +79,8 @@ class KrbInstance:
self.__configure_ldap()
+ self.__configure_http()
+
self.__create_instance()
self.__create_ds_keytab()
@@ -193,3 +195,9 @@ class KrbInstance:
time.sleep(1)
pent = pwd.getpwnam("apache")
os.chown("/etc/httpd/conf/ipa.keytab", pent.pw_uid, pent.pw_gid)
+
+ def __configure_http(self):
+ http_txt = template_file(SHARE_DIR + "ipa.conf", self.sub_dict)
+ http_fd = open("/etc/httpd/conf.d/ipa.conf", "w")
+ http_fd.write(http_txt)
+ http_fd.close()
diff --git a/ipa-server/xmlrpc-server/Makefile b/ipa-server/xmlrpc-server/Makefile
index 10b796ea..7d219a7b 100644
--- a/ipa-server/xmlrpc-server/Makefile
+++ b/ipa-server/xmlrpc-server/Makefile
@@ -1,12 +1,11 @@
SHAREDIR = $(DESTDIR)/usr/share/ipa/ipaserver
-HTTPDIR = $(DESTDIR)/etc/httpd/conf.d/
all: ;
install:
-mkdir -p $(SHAREDIR)
install -m 644 *.py $(SHAREDIR)
- install -m 644 ipa.conf $(HTTPDIR)
+ install -m 644 ipa.conf $(SHAREDIR)/..
clean:
rm -f *~ *.pyc
diff --git a/ipa-server/xmlrpc-server/ipa.conf b/ipa-server/xmlrpc-server/ipa.conf
index dbe6b99f..b80c5c57 100644
--- a/ipa-server/xmlrpc-server/ipa.conf
+++ b/ipa-server/xmlrpc-server/ipa.conf
@@ -8,7 +8,7 @@ Alias /ipa "/usr/share/ipa/ipaserver/XMLRPC"
KrbMethodNegotiate on
KrbMethodK5Passwd off
KrbServiceName HTTP
- KrbAuthRealms GREYOAK.COM
+ KrbAuthRealms $REALM
Krb5KeyTab /etc/httpd/conf/ipa.keytab
KrbSaveCredentials on
Require valid-user