You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2007/04/04 20:38:41 UTC
Re: PATCH: support utilities should enable crypt() , current htdbm checks broken
On 3/23/07, David Jones <os...@gmail.com> wrote:
> ok here's the simple patch at the 2.0.x level that just checks platforms for
> htdbm.c
Can you post a post to htdbm.c at trunk?
Re: PATCH: support utilities should enable crypt() , current htdbm checks broken
Posted by Jeff Trawick <tr...@gmail.com>.
On 4/9/07, David Jones <os...@gmail.com> wrote:
> patch for trunk:
thanks; committed
I'll propose for backport to 2.2.x shortly.
Re: PATCH: support utilities should enable crypt() , current htdbm checks broken
Posted by David Jones <os...@gmail.com>.
patch for trunk:
Index: htdbm.c
===================================================================
--- htdbm.c (revision 526861)
+++ htdbm.c (working copy)
@@ -69,7 +69,7 @@
#define ALG_APMD5 1
#define ALG_APSHA 2
-#if APR_HAVE_CRYPT_H
+#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
#define ALG_CRYPT 3
#endif
@@ -311,12 +311,12 @@
case ALG_PLAIN:
/* XXX this len limitation is not in sync with any HTTPd len.
*/
apr_cpystrn(cpw,htdbm->userpass,sizeof(cpw));
-#if APR_HAVE_CRYPT_H
+#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
fprintf(stderr, "Warning: Plain text passwords aren't supported
by the "
"server on this platform!\n");
#endif
break;
-#if APR_HAVE_CRYPT_H
+#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
case ALG_CRYPT:
(void) srand((int) time((time_t *) NULL));
to64(&salt[0], rand(), 8);
@@ -347,7 +347,7 @@
static void htdbm_usage(void)
{
-#if APR_HAVE_CRYPT_H
+#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
#define CRYPT_OPTION "d"
#else
#define CRYPT_OPTION ""
@@ -367,7 +367,7 @@
fprintf(stderr, " -c Create a new database.\n");
fprintf(stderr, " -n Don't update database; display results on
stdout.\n");
fprintf(stderr, " -m Force MD5 encryption of the password
(default).\n");
-#if APR_HAVE_CRYPT_H
+#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
fprintf(stderr, " -d Force CRYPT encryption of the password (now
deprecated).\n");
#endif
fprintf(stderr, " -p Do not encrypt the password (plaintext).\n");
@@ -474,7 +474,7 @@
case 's':
h->alg = ALG_APSHA;
break;
-#if APR_HAVE_CRYPT_H
+#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
case 'd':
h->alg = ALG_CRYPT;
break;
On 4/4/07, Jeff Trawick <tr...@gmail.com> wrote:
>
> On 4/4/07, Jeff Trawick <tr...@gmail.com> wrote:
> > On 3/23/07, David Jones <os...@gmail.com> wrote:
> > > ok here's the simple patch at the 2.0.x level that just checks
> platforms for
> > > htdbm.c
>
> > Can you post a post to htdbm.c at trunk?
>
> whoops, make that "Can you post a PATCH..."
>
Re: PATCH: support utilities should enable crypt() , current htdbm checks broken
Posted by Jeff Trawick <tr...@gmail.com>.
On 4/4/07, Jeff Trawick <tr...@gmail.com> wrote:
> On 3/23/07, David Jones <os...@gmail.com> wrote:
> > ok here's the simple patch at the 2.0.x level that just checks platforms for
> > htdbm.c
> Can you post a post to htdbm.c at trunk?
whoops, make that "Can you post a PATCH..."