[mod_auth_kerb] hard-code use of /run/user/apache for cache dir

jorton jorton at fedoraproject.org
Wed Jun 13 15:11:42 UTC 2012


commit 7ec72fbee571525d4ea48d98987c07e576462aaa
Author: Joe Orton <jorton at redhat.com>
Date:   Wed Jun 13 16:11:38 2012 +0100

    hard-code use of /run/user/apache for cache dir
    
    - package /run/user/apache
    - move tmpfiles drop-in to /usr/lib
    Resolves: rhbz#796430

 mod_auth_kerb-5.4-cachedir.patch |    7 ++-----
 mod_auth_kerb.spec               |   17 ++++++++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/mod_auth_kerb-5.4-cachedir.patch b/mod_auth_kerb-5.4-cachedir.patch
index edbbe4b..460db0c 100644
--- a/mod_auth_kerb-5.4-cachedir.patch
+++ b/mod_auth_kerb-5.4-cachedir.patch
@@ -4,15 +4,12 @@ switch the cache dir to be relative to runtimedir.
 
 --- mod_auth_kerb-5.4/src/mod_auth_kerb.c.cachedir
 +++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
-@@ -891,7 +891,10 @@ create_krb5_ccache(krb5_context kcontext
+@@ -891,7 +891,7 @@ create_krb5_ccache(krb5_context kcontext
     int ret;
     krb5_ccache tmp_ccache = NULL;
  
 -   ccname = apr_psprintf(r->connection->pool, "FILE:%s/krb5cc_apache_XXXXXX", P_tmpdir);
-+   ccname = apr_pstrcat(r->connection->pool, "FILE:",
-+                        ap_server_root_relative(r->pool, 
-+                                                DEFAULT_REL_RUNTIMEDIR
-+                                                "/krb5cc_apache_XXXXXX"), NULL);
++   ccname = apr_pstrdup(r->connection->pool, "FILE:/run/user/apache/krb5cc_apache_XXXXXX");
     fd = mkstemp(ccname + strlen("FILE:"));
     if (fd < 0) {
        log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
diff --git a/mod_auth_kerb.spec b/mod_auth_kerb.spec
index d024b93..fb43727 100644
--- a/mod_auth_kerb.spec
+++ b/mod_auth_kerb.spec
@@ -8,7 +8,7 @@
 Summary: Kerberos authentication module for HTTP
 Name: mod_auth_kerb
 Version: 5.4
-Release: 15%{?dist}
+Release: 16%{?dist}
 License: BSD and MIT and ASL 2.0
 Group: System Environment/Daemons
 URL: http://modauthkerb.sourceforge.net/
@@ -60,9 +60,10 @@ install -Dp -m 0644 10-auth_kerb.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-aut
 install -Dp -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/auth_kerb.conf
 %endif
 
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
-echo 'd /var/run/user/apache 700 apache apache' \
-     > $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/httpd-user.conf
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
+echo 'd /run/user/apache 700 apache apache' \
+     > $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/httpd-user.conf
+mkdir -p $RPM_BUILD_ROOT/run/user/apache
 
 # Copy the license files here so we can include them in %doc
 cp -p %{SOURCE2} .
@@ -78,9 +79,15 @@ rm -rf $RPM_BUILD_ROOT
 %doc example.conf
 %endif
 %{_httpd_moddir}/*.so
-%config %{_sysconfdir}/tmpfiles.d/httpd-user.conf
+%{_prefix}/lib/tmpfiles.d/httpd-user.conf
+%attr(0700,apache,apache) %dir /run/user/apache
 
 %changelog
+* Wed Jun 13 2012 Joe Orton <jorton at redhat.com> - 5.4-16
+- hard-code use of /run/user/apache for cache dir
+- package /run/user/apache
+- move tmpfiles drop-in to /usr/lib
+
 * Wed Jun 13 2012 Joe Orton <jorton at redhat.com> - 5.4-15
 - fix segfault in cache dir fix (#796430)
 


More information about the scm-commits mailing list