home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Networking / wu-ftpd-2.4.2b13-MIHS / src / ckconfig.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-03  |  4.2 KB  |  110 lines

  1. /* Copyright (c) 1993, 1994  Washington University in Saint Louis
  2.  * All rights reserved.
  3.  *
  4.  * Redistribution and use in source and binary forms, with or without
  5.  * modification, are permitted provided that the following conditions are
  6.  * met: 1. Redistributions of source code must retain the above copyright
  7.  * notice, this list of conditions and the following disclaimer. 2.
  8.  * Redistributions in binary form must reproduce the above copyright notice,
  9.  * this list of conditions and the following disclaimer in the documentation
  10.  * and/or other materials provided with the distribution. 3. All advertising
  11.  * materials mentioning features or use of this software must display the
  12.  * following acknowledgement: This product includes software developed by the
  13.  * Washington University in Saint Louis and its contributors. 4. Neither the
  14.  * name of the University nor the names of its contributors may be used to
  15.  * endorse or promote products derived from this software without specific
  16.  * prior written permission.
  17.  *
  18.  * THIS SOFTWARE IS PROVIDED BY WASHINGTON UNIVERSITY AND CONTRIBUTORS
  19.  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21.  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASHINGTON
  22.  * UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  23.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  24.  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25.  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  26.  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  27.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  28.  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  29.  * POSSIBILITY OF SUCH DAMAGE.
  30.  */
  31. static char *rcsid = "$Id: ckconfig.c,v 1.4 1997/03/02 01:32:23 sob Exp $";
  32. #include "config.h"
  33. #ifndef HOST_ACCESS
  34. #define  HOST_ACCESS  1
  35. #endif
  36. #include <stdio.h>
  37. #include <sys/types.h>
  38. #include <sys/stat.h>
  39. #include "pathnames.h"
  40.  
  41. main()
  42. {
  43.   struct stat  sbuf;
  44.   char        *sp;
  45.   char         buf[1024];
  46.  
  47.   /* _PATH_FTPUSERS   */
  48.   fprintf(stdout, "Checking _PATH_FTPUSERS :: %s\n", _PATH_FTPUSERS);
  49.   if ( (stat(_PATH_FTPUSERS, &sbuf)) < 0 )
  50.     printf("I can't find it... look in doc/examples for an example.\n");
  51.   else
  52.     printf("ok.\n");
  53.  
  54.   /* _PATH_FTPACCESS  */
  55.   fprintf(stdout, "\nChecking _PATH_FTPACCESS :: %s\n", _PATH_FTPACCESS);
  56.   if ( (stat(_PATH_FTPACCESS, &sbuf)) < 0 )
  57.     printf("I can't find it... look in doc/examples for an example.\n");
  58.   else
  59.     printf("ok.\n");
  60.  
  61.   /* _PATH_PIDNAMES   */
  62.   fprintf(stdout, "\nChecking _PATH_PIDNAMES :: %s\n", _PATH_PIDNAMES);
  63.   strcpy(buf, _PATH_PIDNAMES);
  64.   sp = (char *)strrchr(buf, '/');
  65.   *sp = '\0';
  66.   if ( (stat(buf, &sbuf)) < 0 ) {
  67.     printf("I can't find it...\n");
  68.     printf("You need to make this directory [%s] in order for\n",buf);
  69.     printf("the limit and user count functions to work.\n");
  70.   } else
  71.     printf("ok.\n");
  72.  
  73.   /* _PATH_CVT        */
  74.   fprintf(stdout, "\nChecking _PATH_CVT :: %s\n", _PATH_CVT);
  75.   if ( (stat(_PATH_CVT, &sbuf)) < 0 )
  76.     printf("I can't find it... look in doc/examples for an example.\n");
  77.   else
  78.     printf("ok.\n");
  79.  
  80.   /* _PATH_XFERLOG    */
  81.   fprintf(stdout, "\nChecking _PATH_XFERLOG :: %s\n", _PATH_XFERLOG);
  82.   if ( (stat(_PATH_XFERLOG, &sbuf)) < 0 ) {
  83.     printf("I can't find it... \n");
  84.     printf("Don't worry, it will be created automatically by the\n");
  85.     printf("server if you do transfer logging.\n");
  86.   } else
  87.     printf("ok.\n");
  88.  
  89.   /* _PATH_PRIVATE    */
  90.   fprintf(stdout, "\nChecking _PATH_PRIVATE :: %s\n", _PATH_PRIVATE);
  91.   if ( (stat(_PATH_PRIVATE, &sbuf)) < 0 ) {
  92.     printf("I can't find it... look in doc/examples for an example.\n");
  93.     printf("You only need this if you want SITE GROUP and SITE GPASS\n");
  94.     printf("functionality. If you do, you will need to edit the example.\n");
  95.   } else
  96.     printf("ok.\n");
  97.  
  98.   /* _PATH_FTPHOSTS   */
  99.   fprintf(stdout, "\nChecking _PATH_FTPHOSTS :: %s\n", _PATH_FTPHOSTS);
  100.   if ( (stat(_PATH_FTPHOSTS, &sbuf)) < 0 ) {
  101.     printf("I can't find it... look in doc/examples for an example.\n");
  102.     printf("You only need this if you are using the HOST ACCESS features\n");
  103.     printf("of the server.\n");
  104.   } else
  105.     printf("ok.\n");
  106.     exit(0);
  107. }
  108.  
  109.  
  110.