This should go into APR; perhaps with some nice * caching/locking/flocking of the open dbm file. */
| 46 | * caching/locking/flocking of the open dbm file. |
| 47 | */ |
| 48 | static char *get_dbm_entry_as_str(apr_pool_t *pool, apr_dbm_t *f, char *key) |
| 49 | { |
| 50 | apr_datum_t d, q; |
| 51 | q.dptr = key; |
| 52 | |
| 53 | #ifndef NETSCAPE_DBM_COMPAT |
| 54 | q.dsize = strlen(q.dptr); |
| 55 | #else |
| 56 | q.dsize = strlen(q.dptr) + 1; |
| 57 | #endif |
| 58 | |
| 59 | if (apr_dbm_fetch(f, q, &d) == APR_SUCCESS && d.dptr) { |
| 60 | return apr_pstrmemdup(pool, d.dptr, d.dsize); |
| 61 | } |
| 62 | |
| 63 | return NULL; |
| 64 | } |
| 65 | |
| 66 | static void *create_authz_dbm_dir_config(apr_pool_t *p, char *d) |
| 67 | { |