httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <madhusudan_mathiha...@hp.com>
Subject RE: cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_engine_pphras e.c ssl_util.c
Date Wed, 09 Jan 2002 23:48:27 GMT
mod_ssl build is broken because of the new argument introduced in
ssl_util_ppopen().. [build breaks for ssl_engine_rand.c]

-Madhu

-----Original Message-----
From: dougm@apache.org [mailto:dougm@apache.org]
Sent: Wednesday, January 09, 2002 11:25 AM
To: httpd-2.0-cvs@apache.org
Subject: cvs commit: httpd-2.0/modules/ssl mod_ssl.h
ssl_engine_pphrase.c ssl_util.c


dougm       02/01/09 11:24:32

  Modified:    .        CHANGES
               modules/ssl mod_ssl.h ssl_engine_pphrase.c ssl_util.c
  Log:
  get SSLPassPhraseDialog exec: working by passing the proper arguments
  to apr_proc_create()
  
  Revision  Changes    Path
  1.507     +2 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.506
  retrieving revision 1.507
  diff -u -r1.506 -r1.507
  --- CHANGES	8 Jan 2002 23:42:11 -0000	1.506
  +++ CHANGES	9 Jan 2002 19:24:32 -0000	1.507
  @@ -1,5 +1,7 @@
   Changes with Apache 2.0.31-dev
   
  +  *) Fix SSLPassPhraseDialog exec: [Doug MacEachern]
  +
   Changes with Apache 2.0.30
   
     *) Fix the main bug for FreeBSD and threaded MPM's. There are
  
  
  
  1.51      +4 -2      httpd-2.0/modules/ssl/mod_ssl.h
  
  Index: mod_ssl.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_ssl.h	29 Nov 2001 07:07:36 -0000	1.50
  +++ mod_ssl.h	9 Jan 2002 19:24:32 -0000	1.51
  @@ -743,9 +743,11 @@
   void         ssl_util_strupper(char *);
   void         ssl_util_uuencode(char *, const char *, BOOL);
   void         ssl_util_uuencode_binary(unsigned char *, const unsigned
char *, int, BOOL);
  -apr_file_t  *ssl_util_ppopen(server_rec *, apr_pool_t *, char *);
  +apr_file_t  *ssl_util_ppopen(server_rec *, apr_pool_t *, const char *,
  +                             const char * const *);
   void         ssl_util_ppclose(server_rec *, apr_pool_t *, apr_file_t *);
  -char        *ssl_util_readfilter(server_rec *, apr_pool_t *, char *);
  +char        *ssl_util_readfilter(server_rec *, apr_pool_t *, const char
*,
  +                                 const char * const *);
   BOOL         ssl_util_path_check(ssl_pathcheck_t, const char *,
apr_pool_t *);
   ssl_algo_t   ssl_util_algotypeof(X509 *, EVP_PKEY *); 
   char        *ssl_util_algotypestr(ssl_algo_t);
  
  
  
  1.12      +9 -7      httpd-2.0/modules/ssl/ssl_engine_pphrase.c
  
  Index: ssl_engine_pphrase.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_pphrase.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ssl_engine_pphrase.c	17 Oct 2001 00:03:22 -0000	1.11
  +++ ssl_engine_pphrase.c	9 Jan 2002 19:24:32 -0000	1.12
  @@ -533,18 +533,20 @@
        * Filter program
        */
       else if (sc->nPassPhraseDialogType == SSL_PPTYPE_FILTER) {
  -        char *cmd;
  +        const char *cmd = sc->szPassPhraseDialogPath;
  +        const char **argv = apr_palloc(p, sizeof(char *) * 4);
           char *result;
   
           ssl_log(s, SSL_LOG_INFO,
                   "Init: Requesting pass phrase from dialog filter program
(%s)",
  -                sc->szPassPhraseDialogPath);
  +                cmd);
   
  -        if (ap_strchr_c(sc->szPassPhraseDialogPath, ' ') != NULL)
  -            cmd = apr_psprintf(p, "\"%s\" %s %s",
sc->szPassPhraseDialogPath, cpVHostID, cpAlgoType);
  -        else
  -            cmd = apr_psprintf(p, "%s %s %s", sc->szPassPhraseDialogPath,
cpVHostID, cpAlgoType);
  -        result = ssl_util_readfilter(s, p, cmd);
  +        argv[0] = cmd;
  +        argv[1] = cpVHostID;
  +        argv[2] = cpAlgoType;
  +        argv[3] = NULL;
  +
  +        result = ssl_util_readfilter(s, p, cmd, argv);
           apr_cpystrn(buf, result, bufsize);
           len = strlen(buf);
       }
  
  
  
  1.23      +8 -5      httpd-2.0/modules/ssl/ssl_util.c
  
  Index: ssl_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_util.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ssl_util.c	29 Nov 2001 05:45:48 -0000	1.22
  +++ ssl_util.c	9 Jan 2002 19:24:32 -0000	1.23
  @@ -139,7 +139,8 @@
       return;
   }
   
  -apr_file_t *ssl_util_ppopen(server_rec *s, apr_pool_t *p, char *cmd)
  +apr_file_t *ssl_util_ppopen(server_rec *s, apr_pool_t *p, const char
*cmd,
  +                            const char * const *argv)
   {
       apr_procattr_t *procattr;
       apr_proc_t *proc;
  @@ -156,7 +157,7 @@
           return NULL;
       if ((proc = (apr_proc_t *)apr_pcalloc(p, sizeof(apr_proc_t))) ==
NULL)
           return NULL;
  -    if (apr_proc_create(proc, cmd, NULL, NULL, procattr, p) !=
APR_SUCCESS)
  +    if (apr_proc_create(proc, cmd, argv, NULL, procattr, p) !=
APR_SUCCESS)
           return NULL;
       return proc->out;
   }
  @@ -170,16 +171,18 @@
   /*
    * Run a filter program and read the first line of its stdout output
    */
  -char *ssl_util_readfilter(server_rec *s, apr_pool_t *p, char *cmd)
  +char *ssl_util_readfilter(server_rec *s, apr_pool_t *p, const char *cmd,
  +                          const char * const *argv)
   {
       static char buf[MAX_STRING_LEN];
       apr_file_t *fp;
  -    apr_size_t nbytes;
  +    apr_size_t nbytes = 1;
       char c;
       int k;
   
  -    if ((fp = ssl_util_ppopen(s, p, cmd)) == NULL)
  +    if ((fp = ssl_util_ppopen(s, p, cmd, argv)) == NULL)
           return NULL;
  +    /* XXX: we are reading 1 byte at a time here */
       for (k = 0; apr_file_read(fp, &c, &nbytes) == APR_SUCCESS
                   && nbytes == 1 && (k < MAX_STRING_LEN-1)     ; ) {
           if (c == '\n' || c == '\r')
  
  
  

Mime
View raw message