/[monit]/monit/env.c
ViewVC logotype

Diff of /monit/env.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by rory, Wed Oct 2 03:56:27 2002 UTC revision 1.11 by chopp, Sat Nov 2 10:47:22 2002 UTC
# Line 218  static void set_environment(void) { Line 218  static void set_environment(void) {
218    Run.Env.user= xstrdup(pw->pw_name);    Run.Env.user= xstrdup(pw->pw_name);
219        
220  }  }
221    
222    /**
223     * Are we using SSL and is it correctly installed?
224     */
225    void use_ssl() {
226      
227      if(! have_ssl()) {
228    
229        return;
230    
231      }
232      
233      if(Run.httpdssl) {
234    
235        /* If Run.httpdssl is TRUE and we don't have a PEM file something
236           went wrong -> ASSERT! */
237    
238        ASSERT(Run.httpsslpem);
239        
240        if(!check_file(Run.httpsslpem, "SSL server PEM file", S_IRWXU)) {
241    
242          exit(1);
243    
244        }
245    
246      }
247      
248      if(Run.httpdssl && Run.clientssl) {
249    
250        /* If Run.clientssl is TRUE and we don't have a client PEM file
251           something went wrong -> ASSERT! */
252        
253        ASSERT(Run.httpsslclientpem);
254        
255        if(!check_file(Run.httpsslclientpem, "SSL client PEM file",
256                       S_IRWXU | S_IRGRP | S_IROTH)) {
257    
258          exit(1);
259    
260        }
261    
262      }    
263    
264    }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26