Ver código fonte

squeeze in openpkg-like path to server config files

Michael van Elst 22 anos atrás
pai
commit
abba900a2e
2 arquivos alterados com 34 adições e 5 exclusões
  1. 23 0
      sasl/sasl.patch
  2. 11 5
      sasl/sasl.spec

+ 23 - 0
sasl/sasl.patch

@@ -83,3 +83,26 @@
  	
  	sparams->utils->prop_set(sparams->propctx, cur->name,
  				 value, value_len);
+--- lib/server.c.dist	Mon Apr  7 16:48:41 2003
++++ lib/server.c	Mon Apr  7 16:52:27 2003
+@@ -379,18 +379,9 @@
+   char *c;
+   char *config_filename=NULL;
+   int len;
+-  const sasl_callback_t *getpath_cb=NULL;
+ 
+-  /* get the path to the plugins; for now the config file will reside there */
+-  getpath_cb=_sasl_find_getpath_callback( global_callbacks.callbacks );
+-  if (getpath_cb==NULL) return SASL_BADPARAM;
+-
+-  /* getpath_cb->proc MUST be a sasl_getpath_t; if only c had a type
+-     system */
+-  result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
+-						  &path_to_config);
+-  if (result!=SASL_OK) goto done;
+-  if (path_to_config == NULL) path_to_config = "";
++  result = SASL_OK;
++  path_to_config = "@l_sysconfdir@";
+ 
+   if ((c = strchr(path_to_config, PATHS_DELIMITER))) {
+       *c = '\0';

+ 11 - 5
sasl/sasl.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
 Group:        Cryptography
 License:      BSD
 Version:      2.1.12
-Release:      20030405
+Release:      20030407
 
 #   package options
 %option       with_fsl    no
@@ -101,6 +101,11 @@ AutoReqProv:  no
         saslauthd/configure
 %endif
 
+    #   configure path to sasl-server config files
+    %{l_shtool} subst \
+        -e 's;@l_sysconfdir@;%{l_prefix}/etc/sasl/apps;g' \
+        lib/server.c
+
     #   determine build flags
     cflags="%{l_cflags -O} %{l_cppflags}"
     ldflags="%{l_ldflags}"
@@ -228,10 +233,10 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/man/man8/
 
     #   create necessary additional directories
-    %{l_shtool} mkdir -f -p -m 700 \
-        $RPM_BUILD_ROOT%{l_prefix}/var/sasl/log/
     %{l_shtool} mkdir -f -p -m 755 \
-        $RPM_BUILD_ROOT%{l_prefix}/var/sasl/saslauthd/
+        $RPM_BUILD_ROOT%{l_prefix}/var/sasl/log/ \
+        $RPM_BUILD_ROOT%{l_prefix}/var/sasl/saslauthd/ \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/sasl/apps
 
     #   install run-command script
 %if "%{with_pam}" == "yes"
@@ -270,7 +275,8 @@ AutoReqProv:  no
 %endif
         '%config %{l_prefix}/etc/sasl/saslauthd.conf' \
         '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/sasl' \
-        '%dir %attr(-,%{l_susr},%{l_sgrp}) %{l_prefix}/var/sasl/log'
+        '%dir %attr(0750,%{l_musr},%{l_rgrp}) %{l_prefix}/var/sasl/saslauthd' \
+        '%dir %attr(0700,%{l_susr},%{l_sgrp}) %{l_prefix}/var/sasl/log'
 
 %files -f files