httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: [PATCH] give a good error message for "htpasswd -c filename"
Date Tue, 25 Aug 1998 09:50:07 GMT

In article <199808192039.NAA18957@gabber.c2.net> you wrote:
> Index: htpasswd.c
> ===================================================================
> RCS file: /export/home/cvs/apache-1.3/src/support/htpasswd.c,v
> retrieving revision 1.17
> diff -c -u -r1.17 htpasswd.c
> --- htpasswd.c  1998/07/13 11:32:58     1.17
> +++ htpasswd.c  1998/08/19 20:38:15
> @@ -175,6 +175,9 @@
>      else if (argc != 3)
>         usage();
>  
> +    if(!strcmp(argv[1], "-c"))
> +       usage();
> +
>      tn = tmpnam(NULL);
>      if (!(tfp = fopen(tn, "w+"))) {
>         fprintf(stderr, "Could not open temp file.\n");

It's ok this way, so +1, although I would like to cleanup htpasswd.c a little
bit by using getopt() where those special cases do not occur.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message