You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2003/01/03 03:45:30 UTC
cvs commit: httpd-2.0/modules/aaa mod_authz_dbm.c
nd 2003/01/02 18:45:30
Modified: modules/aaa mod_authz_dbm.c
Log:
some cleanup.
- use already existing apr functionality
- remove unused variable
Revision Changes Path
1.4 +1 -8 httpd-2.0/modules/aaa/mod_authz_dbm.c
Index: mod_authz_dbm.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authz_dbm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mod_authz_dbm.c 8 Dec 2002 21:16:05 -0000 1.3
+++ mod_authz_dbm.c 3 Jan 2003 02:45:30 -0000 1.4
@@ -120,9 +120,7 @@
*str = NULL;
if (apr_dbm_fetch(f, q, &d) == APR_SUCCESS && d.dptr) {
- *str = apr_palloc(r->pool, d.dsize + 1);
- strncpy(pw, d.dptr, d.dsize);
- *str[d.dsize] = '\0'; /* Terminate the string */
+ *str = apr_pstrmemdup(r->pool, d.dptr, d.dsize);
}
apr_dbm_close(f);
@@ -209,7 +207,6 @@
&authz_dbm_module);
char *user = r->user;
int m = r->method_number;
- int required = 0;
const apr_array_header_t *reqs_arr = ap_requires(r);
require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
register int x;
@@ -227,8 +224,6 @@
for (x = 0; x < reqs_arr->nelts; x++) {
- required |= 1;
-
if (!(reqs[x].method_mask & (AP_METHOD_BIT << m))) {
continue;
}
@@ -239,8 +234,6 @@
if (!strcmp(w, "group")) {
const char *orig_groups, *groups;
char *v;
-
- required |= 2;
status = get_dbm_grp(r, user, conf->grpfile, conf->dbmtype,
&groups);