/[mailutils]/mailutils/pop3d/pop3d.c
ViewVC logotype

Diff of /mailutils/pop3d/pop3d.c

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

revision 1.56 by gray, Mon Jan 6 14:47:33 2003 UTC revision 1.57 by polak, Mon Jan 13 23:01:30 2003 UTC
# Line 32  struct daemon_param daemon_param = { Line 32  struct daemon_param daemon_param = {
32    
33  int debug_mode;  int debug_mode;
34    
35    #ifdef WITH_TLS
36    int tls_available;
37    int tls_done;
38    #endif /* WITH_TLS */
39    
40  /* Number of child processes.  */  /* Number of child processes.  */
41  volatile size_t children;  volatile size_t children;
42    
# Line 57  static struct argp argp = { Line 62  static struct argp argp = {
62  static const char *pop3d_argp_capa[] = {  static const char *pop3d_argp_capa[] = {
63    "daemon",    "daemon",
64    "auth",    "auth",
65    #ifdef WITH_TLS
66      "tls",
67    #endif /* WITH_TLS */
68    "common",    "common",
69    "mailbox",    "mailbox",
70    "logging",    "logging",
# Line 90  main (int argc, char **argv) Line 98  main (int argc, char **argv)
98    mu_init_nls ();    mu_init_nls ();
99    
100    MU_AUTH_REGISTER_ALL_MODULES();    MU_AUTH_REGISTER_ALL_MODULES();
101    #ifdef WITH_TLS
102      mu_tls_init_argp ();
103    #endif /* WITH_TLS */
104    mu_argp_parse (&argp, &argc, &argv, 0, pop3d_argp_capa, NULL, &daemon_param);    mu_argp_parse (&argp, &argc, &argv, 0, pop3d_argp_capa, NULL, &daemon_param);
105    
106  #ifdef USE_LIBPAM  #ifdef USE_LIBPAM
# Line 117  main (int argc, char **argv) Line 128  main (int argc, char **argv)
128            exit (EXIT_FAILURE);            exit (EXIT_FAILURE);
129          }          }
130      }      }
131      
132    /* Register the desired formats.  */    /* Register the desired formats.  */
133    {    {
134      list_t bookie;      list_t bookie;
# Line 154  main (int argc, char **argv) Line 165  main (int argc, char **argv)
165        
166    umask (S_IROTH | S_IWOTH | S_IXOTH);  /* 007 */    umask (S_IROTH | S_IWOTH | S_IXOTH);  /* 007 */
167    
168      /* Check TLS environment, i.e. cert and key files */
169    #ifdef WITH_TLS
170      tls_available = mu_check_tls_environment ();
171      if (tls_available)
172        tls_available = mu_init_tls_libs ();
173    #endif /* WITH_TLS */
174    
175    /* Actually run the daemon.  */    /* Actually run the daemon.  */
176    if (daemon_param.mode == MODE_DAEMON)    if (daemon_param.mode == MODE_DAEMON)
177      pop3d_daemon (daemon_param.maxchildren, daemon_param.port);      pop3d_daemon (daemon_param.maxchildren, daemon_param.port);
# Line 330  pop3d_mainloop (int fd, FILE *infile, FI Line 348  pop3d_mainloop (int fd, FILE *infile, FI
348          status = pop3d_uidl (arg);          status = pop3d_uidl (arg);
349        else if (strncasecmp (cmd, "CAPA", 4) == 0)        else if (strncasecmp (cmd, "CAPA", 4) == 0)
350          status = pop3d_capa (arg);          status = pop3d_capa (arg);
351    #ifdef WITH_TLS
352          else if ((strncasecmp (cmd, "STLS", 4) == 0) && tls_available)
353            status = pop3d_stls (arg);
354    #endif /* WITH_TLS */
355        else        else
356          status = ERR_BAD_CMD;          status = ERR_BAD_CMD;
357    
# Line 362  pop3d_mainloop (int fd, FILE *infile, FI Line 384  pop3d_mainloop (int fd, FILE *infile, FI
384        free (arg);        free (arg);
385      }      }
386    
387    #ifdef WITH_TLS
388      pop3d_deinit_tls_server ();
389      mu_deinit_tls_libs ();
390    #endif /* WITH_TLS */
391    
392    return (status != OK);    return (status != OK);
393  }  }
394    

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

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