X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/ac40fd9eb9d1980c90dc009d526a23ead1ec0f76..8d138742ae268344f406cb75d79aa6bf853f9d87:/authoption.c diff --git a/authoption.c b/authoption.c index e2687b5..2ed6296 100644 --- a/authoption.c +++ b/authoption.c @@ -1,5 +1,5 @@ /* -** Copyright 2002 Double Precision, Inc. See COPYING for +** Copyright 2002-2009 Double Precision, Inc. See COPYING for ** distribution information. */ @@ -17,7 +17,7 @@ #include "auth.h" -static const char rcsid[]="$Id: authoption.c,v 1.3 2004/11/10 00:42:04 mrsam Exp $"; +static const char rcsid[]="$Id: authoption.c,v 1.4 2009/11/22 03:42:48 mrsam Exp $"; int auth_getoptionenvint(const char *keyword) @@ -28,6 +28,9 @@ int auth_getoptionenvint(const char *keyword) if (!p) return 0; i = atoi(p); + + if (i == 0 && strchr("tTyY", *p)) + i=1; /* Convert 'true', 'TRUE', 'yes', 'YES' to 1 */ free(p); return i; }