Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 52749 invoked by uid 500); 20 Jul 2001 19:21:23 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 52738 invoked by uid 500); 20 Jul 2001 19:21:23 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 20 Jul 2001 19:19:39 -0000 Message-ID: <20010720191939.47032.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/support htpasswd.c X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N wrowe 01/07/20 12:19:39 Modified: support htpasswd.c Log: APR_FINFO_TYPE is all we really needed here. Revision Changes Path 1.38 +6 -4 httpd-2.0/support/htpasswd.c Index: htpasswd.c =================================================================== RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- htpasswd.c 2001/07/20 19:13:44 1.37 +++ htpasswd.c 2001/07/20 19:19:39 1.38 @@ -355,8 +355,8 @@ apr_finfo_t sbuf; apr_status_t check; - check = apr_stat(&sbuf, fname, APR_FINFO_NORM, pool); - return (check ? 0 : 1); + check = apr_stat(&sbuf, fname, APR_FINFO_TYPE, pool); + return ((check || sbuf.filetype != APR_REG) ? 0 : 1); } /* @@ -393,15 +393,17 @@ int noninteractive = 0; int i; int args_left = 2; -#if APR_CHARSET_EBCDIC apr_pool_t *pool; +#if APR_CHARSET_EBCDIC apr_status_t rv; apr_xlate_t *to_ascii; +#endif apr_initialize(); atexit(apr_terminate); apr_pool_create(&pool, NULL); +#if APR_CHARSET_EBCDIC rv = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, pool); if (rv) { fprintf(stderr, "apr_xlate_open(to ASCII)->%d\n", rv); @@ -553,7 +555,7 @@ * Now check to see if we can preserve an existing file in case * of password verification errors on a -c operation. */ - if (newfile && exists(pwfilename) && (! readable(pwfilename))) { + if (newfile && exists(pwfilename, pool) && (! readable(pwfilename))) { fprintf(stderr, "%s: cannot open file %s for read access\n" "%s: existing auth data would be lost on " "password mismatch",