/[anubis]/anubis/src/main.c
ViewVC logotype

Diff of /anubis/src/main.c

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

revision 1.2 by gray, Sat Feb 1 17:08:53 2003 UTC revision 1.3 by gray, Wed Feb 5 21:50:41 2003 UTC
# Line 52  main(int argc, char *argv[]) Line 52  main(int argc, char *argv[])
52    
53          /* Native Language Support */          /* Native Language Support */
54    
55          #ifdef ENABLE_NLS  #ifdef ENABLE_NLS
56           /* Set locale via LC_ALL.  */           /* Set locale via LC_ALL.  */
57           #ifdef HAVE_SETLOCALE  # ifdef HAVE_SETLOCALE
58            setlocale(LC_ALL, "");            setlocale(LC_ALL, "");
59           #endif /* HAVE_SETLOCALE */  # endif /* HAVE_SETLOCALE */
60           bindtextdomain(PACKAGE, LOCALEDIR);           bindtextdomain(PACKAGE, LOCALEDIR);
61           textdomain(PACKAGE);           textdomain(PACKAGE);
62          #endif /* ENABLE_NLS */  #endif /* ENABLE_NLS */
63    
64          /* default values */          /* default values */
65    
# Line 77  main(int argc, char *argv[]) Line 77  main(int argc, char *argv[])
77          anubis_getlogin(session.supervisor, sizeof(session.supervisor));          anubis_getlogin(session.supervisor, sizeof(session.supervisor));
78    
79          /*          /*
80             Read the system configuration file (SUPERVISOR).             Initialize the rc parsing subsystem
81            */
82            rc_system_init();
83            
84            /*
85              Read the system configuration file (SUPERVISOR).
86          */          */
87    
88          endsection_len = strlen(END_SECTION);          if (topt & T_CHECK_CONFIG) {
89                    open_rcfile(CF_SUPERVISOR);
90                    exit(0);
91            }
92            
93          if (!(topt & T_NORC)) {          if (!(topt & T_NORC)) {
94                  open_rcfile(SUPERVISOR);                  open_rcfile(CF_SUPERVISOR);
95                  read_rcfile(INIT);                  process_rcfile(CF_INIT);
                 close_rcfile(); /* SUPERVISOR */  
96          }          }
97    
98          /*          /*
99             DEBUG             DEBUG
100          */          */
101    
102          #if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)  #if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
103          if (options.termlevel != DEBUG) {          if (options.termlevel != DEBUG) {
104                  struct rlimit corelimit;                  struct rlimit corelimit;
105                  if (getrlimit(RLIMIT_CORE, &corelimit) == 0) {                  if (getrlimit(RLIMIT_CORE, &corelimit) == 0) {
# Line 99  main(int argc, char *argv[]) Line 107  main(int argc, char *argv[])
107                          setrlimit(RLIMIT_CORE, &corelimit);                          setrlimit(RLIMIT_CORE, &corelimit);
108                  }                  }
109          }          }
110          #endif /* HAVE_GETRLIMIT and HAVE_SETRLIMIT */  #endif /* HAVE_GETRLIMIT and HAVE_SETRLIMIT */
111    
112          info(DEBUG, _("UID:%d, GID:%d, EUID:%d, EGID:%d"), (int)getuid(),          info(DEBUG, _("UID:%d, GID:%d, EUID:%d, EGID:%d"), (int)getuid(),
113                  (int)getgid(), (int)geteuid(), (int)getegid());                  (int)getgid(), (int)geteuid(), (int)getegid());
# Line 108  main(int argc, char *argv[]) Line 116  main(int argc, char *argv[])
116             Initialize the GnuTLS or OpenSSL library and the PRNG.             Initialize the GnuTLS or OpenSSL library and the PRNG.
117          */          */
118    
119          #ifdef HAVE_TLS  #ifdef HAVE_TLS
120          init_tls_libs();          init_tls_libs();
121          #endif /* HAVE_TLS */  #endif /* HAVE_TLS */
122    
123          #ifdef HAVE_SSL  #ifdef HAVE_SSL
124          init_ssl_libs();          init_ssl_libs();
125          #endif /* HAVE_SSL */  #endif /* HAVE_SSL */
126    
127          /*          /*
128             Enter the main core...             Enter the main core...
# Line 126  main(int argc, char *argv[]) Line 134  main(int argc, char *argv[])
134  void  void
135  anubis(char *arg)  anubis(char *arg)
136  {        {      
         trigger_len = strlen(BEGIN_TRIGGER);  
137          if (topt & T_STDINOUT) { /* stdin/stdout */          if (topt & T_STDINOUT) { /* stdin/stdout */
138                  if (options.termlevel != DEBUG)                  if (options.termlevel != DEBUG)
139                          options.termlevel = SILENT;                          options.termlevel = SILENT;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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