version 1.66 | | version 1.67 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.66 2005/08/12 08:18:59 ryo_saeba Exp $"; | | * "$Id: init.c,v 1.67 2005/09/04 16:58:12 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#ifndef WIN32 /* ***win32: set_csport: we remove csport error secure check here, do this later */ | | #ifndef WIN32 /* ***win32: set_csport: we remove csport error secure check here, do this later */ |
if (settings.csport<=0 || settings.csport>32765 || | | if (settings.csport<=0 || settings.csport>32765 || |
(settings.csport<1024 && getuid()!=0)) { | | (settings.csport<1024 && getuid()!=0)) { |
fprintf(stderr,"%d is an invalid csport number.\n",settings.csport); | | LOG(llevError, "%d is an invalid csport number.\n", settings.csport); |
exit(1); | | exit(1); |
} | | } |
#endif /* win32 */ | | #endif /* win32 */ |
| | |
exit(0); | | exit(0); |
#else | | #else |
execl("/bin/uname", "uname", "-a", NULL); | | execl("/bin/uname", "uname", "-a", NULL); |
LOG(llevError, "Oops, shouldn't have gotten here.\n"); | | LOG(llevError, "Oops, shouldn't have gotten here: execl(/bin/uname) failed: %s\n", strerror_local(errno)); |
perror("execl"); | | |
exit(-1); | | exit(-1); |
#endif | | #endif |
} | | } |
| | |
sprintf(fname,"%s/races",settings.datadir); | | sprintf(fname,"%s/races",settings.datadir); |
LOG(llevDebug, "Reading races from %s...",fname); | | LOG(llevDebug, "Reading races from %s...",fname); |
if(! (file=fopen(fname,"r"))) { | | if(! (file=fopen(fname,"r"))) { |
perror(fname); return; | | LOG(llevError, "Cannot open races file %s: %s\n", fname, strerror_local(errno)); |
| | return; |
} | | } |
| | |
while(fgets(buf,MAX_BUF,file)!=NULL) { | | while(fgets(buf,MAX_BUF,file)!=NULL) { |