monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

beta release


From: Jan-Henrik Haukeland
Subject: beta release
Date: 01 Nov 2002 10:49:45 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

First thing first. I have added a simple ASSERT macro I strongly
advise everyone to use to test values that must not be wrong, like
input parameters in functions and so on. Here is an example on usage:

     static int check_file(char *filename, char *description, 
                      int permmask) {
     
       struct stat buf;
       errno= 0;
     
       ASSERT(filename);
       ASSERT(description);


Now if filename or description is not defined an assert "exception" is
thrown, and the output looks like:

 AssertException: at files.c:337
 aborting..
 Aborted


I found out that we need something like this when I got a SIGSEGV when
I tested the ssl functions and did not add a client cert.


On another note:

We're still not ready for a beta release as far as I can see.

1) dependencies - Rory could you please elaborate a bit more in the
documentation for the dependency statement in monit.pod? For example
write the statement syntax and some examples.

2) ssl - Initialization and start. 

   a) Alternativly two flags should be set, one for httpds support and
   one for client ssl support (like imaps).

   The code in monitor.c should be changed accordingly. Today we just
   start the ssl support in init:

  /*
   * Inititlize the ssl engine 
   */
  if ( have_ssl() ) {

    start_ssl();

  }
  
  /*
   * Check the permissions of the SSL related files
   */
  if ( ! check_ssl_files() ) {
    
    exit(1);

  }


  We should use something like this instead:

  if(use_ssl()) {
    
     start_ssl();

  }


 Where the following method or something like it should be defined in
 ssl.c and supersede (that is replace) the method check_ssl_files:

 int use_ssl() {

   int rv= FALSE;

   if((rv= Run.httpdssl))
       if(!Run.httpsslpem && 
           !check_file(Run.httpsslpem, "SSL server PEM file", S_IRWXU))
           exit(1);

   if((rv= Run.clientssl)) <- New flag set in p.y
        if(!Run.httpsslclientpem && 
           !check_file(Run.httpsslclientpem, "SSL client PEM file", 
                              S_IRWXU | S_IRGRP | S_IROTH))
           exit(1);
    
   return rv;

  }


So I propose that we postpone the beta release until everything is tip
top, what do you think?

-- 
Jan-Henrik Haukeland




reply via email to

[Prev in Thread] Current Thread [Next in Thread]