httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/support utilitiesnw.def htpasswd.c htdigest.c
Date Fri, 18 Jan 2002 23:28:20 GMT
bnicholes    02/01/18 15:28:20

  Modified:    support  htpasswd.c htdigest.c
  Added:       support  utilitiesnw.def
  Log:
  Updates to allow the utilities to run on NetWare
  
  Revision  Changes    Path
  1.39      +20 -8     httpd-2.0/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- htpasswd.c	20 Jul 2001 19:19:39 -0000	1.38
  +++ htpasswd.c	18 Jan 2002 23:28:20 -0000	1.39
  @@ -249,7 +249,7 @@
   	apr_cpystrn(cpw,pw,sizeof(cpw));
   	break;
   
  -#ifndef WIN32
  +#if !(defined(WIN32) || defined(NETWARE))
       case ALG_CRYPT:
       default:
           (void) srand((int) time((time_t *) NULL));
  @@ -286,12 +286,12 @@
       fprintf(stderr, " -c  Create a new file.\n");
       fprintf(stderr, " -n  Don't update file; display results on stdout.\n");
       fprintf(stderr, " -m  Force MD5 encryption of the password"
  -#if defined(WIN32) || defined(TPF)
  +#if defined(WIN32) || defined(TPF) || defined(NETWARE)
   	" (default)"
   #endif
   	".\n");
       fprintf(stderr, " -d  Force CRYPT encryption of the password"
  -#if (!(defined(WIN32) || defined(TPF)))
  +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
   	    " (default)"
   #endif
   	    ".\n");
  @@ -300,7 +300,7 @@
       fprintf(stderr, " -b  Use the password from the command line rather "
   	    "than prompting for it.\n");
       fprintf(stderr,
  -	    "On Windows and TPF systems the '-m' flag is used by default.\n");
  +	    "On Windows, NetWare and TPF systems the '-m' flag is used by default.\n");
       fprintf(stderr,
   	    "On all other systems, the '-p' flag will probably not work.\n");
       return ERR_SYNTAX;
  @@ -372,6 +372,14 @@
       }
   }
   
  +#ifdef NETWARE
  +void nwTerminate()
  +{
  +    pressanykey();
  +    apr_terminate();
  +}
  +#endif
  +
   /*
    * Let's do it.  We end up doing a lot of file opening and closing,
    * but what do we care?  This application isn't run constantly.
  @@ -400,7 +408,11 @@
   #endif
   
       apr_initialize();
  +#ifdef NETWARE
  +    atexit(nwTerminate);
  +#else
       atexit(apr_terminate);
  +#endif
       apr_pool_create(&pool, NULL);
   
   #if APR_CHARSET_EBCDIC
  @@ -430,7 +442,7 @@
        * we parse the command line.
        */
       if (argc < 3) {
  -	return usage();
  +        return usage();
       }
   
       /*
  @@ -514,14 +526,14 @@
   	strcpy(password, argv[i + 2]);
       }
   
  -#ifdef WIN32
  +#if defined(WIN32) || defined(NETWARE)
       if (alg == ALG_CRYPT) {
   	alg = ALG_APMD5;
  -	fprintf(stderr, "Automatically using MD5 format on Windows.\n");
  +	fprintf(stderr, "Automatically using MD5 format.\n");
       }
   #endif
   
  -#if (!(defined(WIN32) || defined(TPF)))
  +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
       if (alg == ALG_PLAIN) {
   	fprintf(stderr,"Warning: storing passwords as plain text might "
   		"just not work on this platform.\n");
  
  
  
  1.29      +3 -0      httpd-2.0/support/htdigest.c
  
  Index: htdigest.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htdigest.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- htdigest.c	8 Jan 2002 06:26:10 -0000	1.28
  +++ htdigest.c	18 Jan 2002 23:28:20 -0000	1.29
  @@ -208,6 +208,9 @@
   
   static void terminate(void)
   {
  +#ifdef NETWARE
  +    pressanykey();
  +#endif
       apr_terminate();
   }
   
  
  
  
  1.1                  httpd-2.0/support/utilitiesnw.def
  
  Index: utilitiesnw.def
  ===================================================================
  MODULE  APRLIB.NLM
  MODULE  LIBC.NLM
  
  
  
  

Mime
View raw message