manoj       99/08/31 21:12:27

  Modified:    src/support htpasswd.c
  Log:
  Require the batch (-b) option and default to MD5 on TPF.
  
  Submitted by: David McCreedy <[EMAIL PROTECTED]> and others at IBM
  
  Revision  Changes    Path
  1.36      +10 -0     apache-1.3/src/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/support/htpasswd.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -d -u -r1.35 -r1.36
  --- htpasswd.c        1999/08/12 14:15:22     1.35
  +++ htpasswd.c        1999/09/01 04:12:22     1.36
  @@ -170,6 +170,10 @@
        pw = passwd;
       }
       else {
  +#ifdef TPF
  +        fprintf(stderr, "Invalid entry. The -b option is required on 
TPF.\n");
  +        return usage();
  +#else
        if (ap_getpass("New password: ", pwin, sizeof(pwin)) != 0) {
            ap_snprintf(record, (rlen - 1), "password too long (>%d)",
                        sizeof(pwin) - 1);
  @@ -182,6 +186,7 @@
        }
        pw = pwin;
           memset(pwv, '\0', sizeof(pwin));
  +#endif /* TPF */
       }
       switch (alg) {
   
  @@ -436,6 +441,11 @@
        alg = ALG_APMD5;
        fprintf(stderr, "Automatically using MD5 format on Windows.\n");
       }
  +#elif defined(TPF)
  +    if (alg == ALG_CRYPT) {
  +        alg = ALG_APMD5;
  +        fprintf(stderr, "Automatically using MD5 format.\n");
  +     }
   #endif
   
   #if (!(defined(WIN32) || defined(TPF)))
  
  
  

Reply via email to