From commits-return-7985-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Thu Oct 26 07:11:00 2006 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 50207 invoked from network); 26 Oct 2006 06:37:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 06:37:28 -0000 Received: (qmail 28891 invoked by uid 500); 25 Oct 2006 10:05:34 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 28854 invoked by uid 500); 25 Oct 2006 10:05:33 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 28843 invoked by uid 99); 25 Oct 2006 10:05:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2006 03:05:33 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2006 03:05:20 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C3F5D1A9846; Wed, 25 Oct 2006 03:05:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r467596 - /apr/apr/trunk/passwd/apr_getpass.c Date: Wed, 25 Oct 2006 10:05:00 -0000 To: commits@apr.apache.org From: jorton@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061025100500.C3F5D1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jorton Date: Wed Oct 25 03:04:59 2006 New Revision: 467596 URL: http://svn.apache.org/viewvc?view=rev&rev=467596 Log: * passwd/apr_getpass.c (get_password): Renamed from getpass() throughout to avoid any possible conflict with a system getpass() implementation which is not being used. (apr_password_get): Use get_password if not getpass() or getpassphrase(). Modified: apr/apr/trunk/passwd/apr_getpass.c Modified: apr/apr/trunk/passwd/apr_getpass.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/passwd/apr_getpass.c?view=diff&rev=467596&r1=467595&r2=467596 ============================================================================== --- apr/apr/trunk/passwd/apr_getpass.c (original) +++ apr/apr/trunk/passwd/apr_getpass.c Wed Oct 25 03:04:59 2006 @@ -80,7 +80,7 @@ * issue the prompt and read the results with echo. (Ugh). */ -static char *getpass(const char *prompt) +static char *get_password(const char *prompt) { static char password[MAX_STRING_LEN]; @@ -93,7 +93,7 @@ #elif defined (HAVE_TERMIOS_H) #include -static char *getpass(const char *prompt) +static char *get_password(const char *prompt) { struct termios attr; static char password[MAX_STRING_LEN]; @@ -135,7 +135,7 @@ * Windows lacks getpass(). So we'll re-implement it here. */ -static char *getpass(const char *prompt) +static char *get_password(const char *prompt) { /* WCE lacks console. So the getpass is unsuported * The only way is to use the GUI so the getpass should be implemented @@ -221,10 +221,12 @@ APR_DECLARE(apr_status_t) apr_password_get(const char *prompt, char *pwbuf, apr_size_t *bufsiz) { -#ifdef HAVE_GETPASSPHRASE +#if defined(HAVE_GETPASSPHRASE) char *pw_got = getpassphrase(prompt); -#else +#elif defined(HAVE_GETPASS) char *pw_got = getpass(prompt); +#else /* use the replacement implementation above */ + char *pw_got = get_password(prompt); #endif apr_status_t rv = APR_SUCCESS;