httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/modules/ldap util_ldap.c
Date Mon, 23 Aug 2004 23:25:12 GMT
bnicholes    2004/08/23 16:25:12

  Modified:    modules/ldap util_ldap.c
  Log:
  Since OpenLDAP doesn't validate the certificate until it tries to use it, at lease make
sure that the file path is good during configuration.
  
  Revision  Changes    Path
  1.9       +11 -0     httpd-2.0/modules/ldap/util_ldap.c
  
  Index: util_ldap.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ldap/util_ldap.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- util_ldap.c	19 Aug 2004 18:06:47 -0000	1.8
  +++ util_ldap.c	23 Aug 2004 23:25:12 -0000	1.9
  @@ -1044,6 +1044,8 @@
           (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
   						  &ldap_module);
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  +    apr_finfo_t finfo;
  +
       if (err != NULL) {
           return err;
       }
  @@ -1053,6 +1055,15 @@
                          file);
   
       st->cert_auth_file = ap_server_root_relative(cmd->pool, file);
  +
  +    if (st->cert_auth_file && 
  +        (apr_stat (&finfo, st->cert_auth_file, APR_FINFO_MIN, cmd->pool) != APR_SUCCESS))
  +    {
  +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, 
  +                     "LDAP: Could not open SSL trusted certificate authority file - %s",

  +                     st->cert_auth_file == NULL ? file : st->cert_auth_file);
  +        return "Invalid file path";
  +    }
   
       return(NULL);
   }
  
  
  

Mime
View raw message