home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / tcpip / wu-ftpd-.000 / wu-ftpd- / wu-ftpd-2.4 / src / ckconfig.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-01  |  4.1 KB  |  105 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.  
  32. #define  HOST_ACCESS  1
  33.  
  34. #include <stdio.h>
  35. #include <sys/types.h>
  36. #include <sys/stat.h>
  37. #include "pathnames.h"
  38.  
  39. main()
  40. {
  41.   struct stat  sbuf;
  42.   char        *sp;
  43.   char         buf[1024];
  44.  
  45.   /* _PATH_FTPUSERS   */
  46.   fprintf(stdout, "Checking _PATH_FTPUSERS :: %s\n", _PATH_FTPUSERS);
  47.   if ( (stat(_PATH_FTPUSERS, &sbuf)) < 0 )
  48.     printf("I can't find it... look in doc/examples for an example.\n");
  49.   else
  50.     printf("ok.\n");
  51.  
  52.   /* _PATH_FTPACCESS  */
  53.   fprintf(stdout, "\nChecking _PATH_FTPACCESS :: %s\n", _PATH_FTPACCESS);
  54.   if ( (stat(_PATH_FTPACCESS, &sbuf)) < 0 )
  55.     printf("I can't find it... look in doc/examples for an example.\n");
  56.   else
  57.     printf("ok.\n");
  58.  
  59.   /* _PATH_PIDNAMES   */
  60.   fprintf(stdout, "\nChecking _PATH_PIDNAMES :: %s\n", _PATH_PIDNAMES);
  61.   strcpy(buf, _PATH_PIDNAMES);
  62.   sp = (char *)strrchr(buf, '/');
  63.   *sp = '\0';
  64.   if ( (stat(buf, &sbuf)) < 0 ) {
  65.     printf("I can't find it...\n");
  66.     printf("You need to make this directory [%s] in order for\n",buf);
  67.     printf("the limit and user count functions to work.\n");
  68.   } else
  69.     printf("ok.\n");
  70.  
  71.   /* _PATH_CVT        */
  72.   fprintf(stdout, "\nChecking _PATH_CVT :: %s\n", _PATH_CVT);
  73.   if ( (stat(_PATH_CVT, &sbuf)) < 0 )
  74.     printf("I can't find it... look in doc/examples for an example.\n");
  75.   else
  76.     printf("ok.\n");
  77.  
  78.   /* _PATH_XFERLOG    */
  79.   fprintf(stdout, "\nChecking _PATH_XFERLOG :: %s\n", _PATH_XFERLOG);
  80.   if ( (stat(_PATH_XFERLOG, &sbuf)) < 0 ) {
  81.     printf("I can't find it... \n");
  82.     printf("Don't worry, it will be created automatically by the\n");
  83.     printf("server if you do transfer logging.\n");
  84.   } else
  85.     printf("ok.\n");
  86.  
  87.   /* _PATH_PRIVATE    */
  88.   fprintf(stdout, "\nChecking _PATH_PRIVATE :: %s\n", _PATH_PRIVATE);
  89.   if ( (stat(_PATH_PRIVATE, &sbuf)) < 0 ) {
  90.     printf("I can't find it... look in doc/examples for an example.\n");
  91.     printf("You only need this if you want SITE GROUP and SITE GPASS\n");
  92.     printf("functionality. If you do, you will need to edit the example.\n");
  93.   } else
  94.     printf("ok.\n");
  95.  
  96.   /* _PATH_FTPHOSTS   */
  97.   fprintf(stdout, "\nChecking _PATH_FTPHOSTS :: %s\n", _PATH_FTPHOSTS);
  98.   if ( (stat(_PATH_FTPHOSTS, &sbuf)) < 0 ) {
  99.     printf("I can't find it... look in doc/examples for an example.\n");
  100.     printf("You only need this if you are using the HOST ACCESS features\n");
  101.     printf("of the server.\n");
  102.   } else
  103.     printf("ok.\n");
  104. }
  105.