/[muddleftpd]/muddleftpd/src/init.c
ViewVC logotype

Diff of /muddleftpd/src/init.c

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

revision 1.1 by ganneff, Thu Sep 26 07:55:42 2002 UTC revision 1.1.6.1 by ganneff, Mon Oct 21 19:52:58 2002 UTC
# Line 1  Line 1 
1    
2  /* init.c main program initalization  /* init.c main program initalization
3    
4     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
# Line 28  void ftpd_preinit(void) Line 29  void ftpd_preinit(void)
29          config = NULL;          config = NULL;
30  }  }
31    
32  void ftpd_init(char *filename, int verbose)  void ftpd_init(char *filename,
33                               int verbose)
34  {  {
35          int result = TRUE;          int result = TRUE;
36          char *scratchfile;          char *scratchfile;
37            
38          ftpd_preinit();          ftpd_preinit();
39    
40          if (verbose)          if (verbose)
41          {          {
42                  printf("Starting "PROGNAME" server. (Version "VERSTR")\n");                  printf("Starting " PROGNAME " server. (Version " VERSTR ")\n");
43                  printf("Copyright (C) 1999,2000 Beau Kuiper\n");                  printf("Copyright (C) 1999,2000 Beau Kuiper\n");
44                  printf("License under GPL. See the http://www.fsf.org for more info.\n\n");                  printf
45                            ("License under GPL. See the http://www.fsf.org for more info.\n\n");
46    
47                  printf("LOADING CONFIG FILE: %s\n", filename);                  printf("LOADING CONFIG FILE: %s\n", filename);
48          }          }
49            
50          config = ftpd_loadconfig(filename, FALSE, umask(0));          config = ftpd_loadconfig(filename, FALSE, umask(0));
51          if (config)          if (config)
52                  result = ftpd_checkconfig(config);                  result = ftpd_checkconfig(config);
53          if ((!config) || (!result))          if ((!config) || (!result))
# Line 60  void ftpd_init(char *filename, int verbo Line 63  void ftpd_init(char *filename, int verbo
63          }          }
64    
65          result = getsectionid(config->configfile, "main");          result = getsectionid(config->configfile, "main");
66          loadstrfromconfig(config->configfile, result, "scratchfile",          loadstrfromconfig(config->configfile, result, "scratchfile",
67                            &scratchfile, SCRATCHFILE);                                            &scratchfile, SCRATCHFILE);
68          if (scratchfile[0] != '/')          if (scratchfile[0] != '/')
69                  ERRORMSGFATAL("Scratchfile is not a valid absolute filename");                  ERRORMSGFATAL("Scratchfile is not a valid absolute filename");
70    
71          shinfo_init(scratchfile);          shinfo_init(scratchfile);
72            
73          ftpd_setnogroups();          ftpd_setnogroups();
74  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.6.1

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