mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Generate /etc/httpd/conf.d/ipa.conf from a template so the realm can
be set during installation
This commit is contained in:
parent
993f76fe60
commit
b9b06a2a60
@ -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
|
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
|
%description
|
||||||
FreeIPA is a server for identity, policy, and audit.
|
FreeIPA is a server for identity, policy, and audit.
|
||||||
|
|
||||||
@ -23,7 +21,6 @@ FreeIPA is a server for identity, policy, and audit.
|
|||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
mkdir -p %{buildroot}%{httpd_conf}
|
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
@ -40,8 +37,6 @@ rm -rf %{buildroot}
|
|||||||
%dir %{_usr}/share/ipa
|
%dir %{_usr}/share/ipa
|
||||||
%{_usr}/share/ipa/*
|
%{_usr}/share/ipa/*
|
||||||
|
|
||||||
%{httpd_conf}/ipa.conf
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Aug 5 2007 Rob Crittenden <rcritten@redhat.com> - 0.1.0-3
|
* Mon Aug 5 2007 Rob Crittenden <rcritten@redhat.com> - 0.1.0-3
|
||||||
|
@ -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
|
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
|
%description
|
||||||
FreeIPA is a server for identity, policy, and audit.
|
FreeIPA is a server for identity, policy, and audit.
|
||||||
|
|
||||||
@ -23,7 +21,6 @@ FreeIPA is a server for identity, policy, and audit.
|
|||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
mkdir -p %{buildroot}%{httpd_conf}
|
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
@ -40,8 +37,6 @@ rm -rf %{buildroot}
|
|||||||
%dir %{_usr}/share/ipa
|
%dir %{_usr}/share/ipa
|
||||||
%{_usr}/share/ipa/*
|
%{_usr}/share/ipa/*
|
||||||
|
|
||||||
%{httpd_conf}/ipa.conf
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Aug 5 2007 Rob Crittenden <rcritten@redhat.com> - 0.1.0-3
|
* Mon Aug 5 2007 Rob Crittenden <rcritten@redhat.com> - 0.1.0-3
|
||||||
|
@ -79,6 +79,8 @@ class KrbInstance:
|
|||||||
|
|
||||||
self.__configure_ldap()
|
self.__configure_ldap()
|
||||||
|
|
||||||
|
self.__configure_http()
|
||||||
|
|
||||||
self.__create_instance()
|
self.__create_instance()
|
||||||
|
|
||||||
self.__create_ds_keytab()
|
self.__create_ds_keytab()
|
||||||
@ -193,3 +195,9 @@ class KrbInstance:
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
pent = pwd.getpwnam("apache")
|
pent = pwd.getpwnam("apache")
|
||||||
os.chown("/etc/httpd/conf/ipa.keytab", pent.pw_uid, pent.pw_gid)
|
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()
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
SHAREDIR = $(DESTDIR)/usr/share/ipa/ipaserver
|
SHAREDIR = $(DESTDIR)/usr/share/ipa/ipaserver
|
||||||
HTTPDIR = $(DESTDIR)/etc/httpd/conf.d/
|
|
||||||
|
|
||||||
all: ;
|
all: ;
|
||||||
|
|
||||||
install:
|
install:
|
||||||
-mkdir -p $(SHAREDIR)
|
-mkdir -p $(SHAREDIR)
|
||||||
install -m 644 *.py $(SHAREDIR)
|
install -m 644 *.py $(SHAREDIR)
|
||||||
install -m 644 ipa.conf $(HTTPDIR)
|
install -m 644 ipa.conf $(SHAREDIR)/..
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.pyc
|
rm -f *~ *.pyc
|
||||||
|
@ -8,7 +8,7 @@ Alias /ipa "/usr/share/ipa/ipaserver/XMLRPC"
|
|||||||
KrbMethodNegotiate on
|
KrbMethodNegotiate on
|
||||||
KrbMethodK5Passwd off
|
KrbMethodK5Passwd off
|
||||||
KrbServiceName HTTP
|
KrbServiceName HTTP
|
||||||
KrbAuthRealms GREYOAK.COM
|
KrbAuthRealms $REALM
|
||||||
Krb5KeyTab /etc/httpd/conf/ipa.keytab
|
Krb5KeyTab /etc/httpd/conf/ipa.keytab
|
||||||
KrbSaveCredentials on
|
KrbSaveCredentials on
|
||||||
Require valid-user
|
Require valid-user
|
||||||
|
Loading…
Reference in New Issue
Block a user