| 88 |
{ |
{ |
| 89 |
apr_status_t rv; |
apr_status_t rv; |
| 90 |
const char *dbd_password = NULL; |
const char *dbd_password = NULL; |
|
char *colon_pw; |
|
| 91 |
apr_dbd_prepared_t *statement; |
apr_dbd_prepared_t *statement; |
| 92 |
apr_dbd_results_t *res = NULL; |
apr_dbd_results_t *res = NULL; |
| 93 |
apr_dbd_row_t *row = NULL; |
apr_dbd_row_t *row = NULL; |
| 135 |
return AUTH_USER_NOT_FOUND; |
return AUTH_USER_NOT_FOUND; |
| 136 |
} |
} |
| 137 |
|
|
|
colon_pw = ap_strchr(dbd_password, ':'); |
|
|
if (colon_pw) { |
|
|
*colon_pw = '\0'; |
|
|
} |
|
|
|
|
| 138 |
rv = apr_password_validate(password, dbd_password); |
rv = apr_password_validate(password, dbd_password); |
| 139 |
|
|
| 140 |
if (rv != APR_SUCCESS) { |
if (rv != APR_SUCCESS) { |
| 148 |
{ |
{ |
| 149 |
apr_status_t rv; |
apr_status_t rv; |
| 150 |
const char *dbd_hash = NULL; |
const char *dbd_hash = NULL; |
|
char *colon_hash; |
|
| 151 |
apr_dbd_prepared_t *statement; |
apr_dbd_prepared_t *statement; |
| 152 |
apr_dbd_results_t *res = NULL; |
apr_dbd_results_t *res = NULL; |
| 153 |
apr_dbd_row_t *row = NULL; |
apr_dbd_row_t *row = NULL; |
| 193 |
return AUTH_USER_NOT_FOUND; |
return AUTH_USER_NOT_FOUND; |
| 194 |
} |
} |
| 195 |
|
|
|
colon_hash = ap_strchr(dbd_hash, ':'); |
|
|
if (colon_hash) { |
|
|
*colon_hash = '\0'; |
|
|
} |
|
|
|
|
| 196 |
*rethash = apr_pstrdup(r->pool, dbd_hash); |
*rethash = apr_pstrdup(r->pool, dbd_hash); |
|
|
|
| 197 |
return AUTH_USER_FOUND; |
return AUTH_USER_FOUND; |
| 198 |
} |
} |
| 199 |
static void authn_dbd_hooks(apr_pool_t *p) |
static void authn_dbd_hooks(apr_pool_t *p) |