httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@apache.org
Subject cvs commit: httpd-2.0/modules/aaa mod_authn_dbm.c mod_authz_dbm.c mod_authz_host.c
Date Fri, 17 Jan 2003 04:42:43 GMT
fielding    2003/01/16 20:42:43

  Modified:    modules/aaa mod_authn_dbm.c mod_authz_dbm.c mod_authz_host.c
  Log:
  Use ap_strchr instead of strchr and get the constness right.
  
  Revision  Changes    Path
  1.12      +2 -2      httpd-2.0/modules/aaa/mod_authn_dbm.c
  
  Index: mod_authn_dbm.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authn_dbm.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_authn_dbm.c	5 Jan 2003 06:36:29 -0000	1.11
  +++ mod_authn_dbm.c	17 Jan 2003 04:42:43 -0000	1.12
  @@ -175,7 +175,7 @@
           return AUTH_USER_NOT_FOUND;
       }
   
  -    colon_pw = strchr(dbm_password, ':');
  +    colon_pw = ap_strchr(dbm_password, ':');
       if (colon_pw) {
           *colon_pw = '\0';
       }
  @@ -213,7 +213,7 @@
           return AUTH_USER_NOT_FOUND;
       }
   
  -    colon_hash = strchr(dbm_hash, ':');
  +    colon_hash = ap_strchr(dbm_hash, ':');
       if (colon_hash) {
           *colon_hash = '\0';
       }
  
  
  
  1.9       +8 -5      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_authz_dbm.c	15 Jan 2003 22:14:45 -0000	1.8
  +++ mod_authz_dbm.c	17 Jan 2003 04:42:43 -0000	1.9
  @@ -156,7 +156,7 @@
                                   char *dbmgrpfile, char *dbtype,
                                   const char ** out)
   {
  -    char *grp_colon;
  +    char *grp_colon, *val;
       apr_status_t retval;
       apr_dbm_t *f;
   
  @@ -168,19 +168,22 @@
       }
   
       /* Try key2 only if key1 failed */
  -    if (!(*out = get_dbm_entry_as_str(r->pool, f, key1))) {
  -        *out = get_dbm_entry_as_str(r->pool, f, key2);
  +    if (!(val = get_dbm_entry_as_str(r->pool, f, key1))) {
  +        val = get_dbm_entry_as_str(r->pool, f, key2);
       }
   
       apr_dbm_close(f);
   
  -    if (*out && (grp_colon = strchr(*out, ':')) != NULL) {
  -        char *grp_colon2 = strchr(++grp_colon, ':');
  +    if (val && (grp_colon = ap_strchr(val, ':')) != NULL) {
  +        char *grp_colon2 = ap_strchr(++grp_colon, ':');
   
           if (grp_colon2) {
               *grp_colon2 = '\0';
           }
           *out = grp_colon;
  +    }
  +    else {
  +        *out = val;
       }
   
       return retval;
  
  
  
  1.3       +1 -1      httpd-2.0/modules/aaa/mod_authz_host.c
  
  Index: mod_authz_host.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authz_host.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_authz_host.c	6 Jan 2003 07:12:56 -0000	1.2
  +++ mod_authz_host.c	17 Jan 2003 04:42:43 -0000	1.3
  @@ -173,7 +173,7 @@
       else if (!strcasecmp(where, "all")) {
           a->type = T_ALL;
       }
  -    else if ((s = strchr(where, '/'))) {
  +    else if ((s = ap_strchr(where, '/'))) {
           *s++ = '\0';
           rv = apr_ipsubnet_create(&a->x.ip, where, s, cmd->pool);
           if(APR_STATUS_IS_EINVAL(rv)) {
  
  
  

Mime
View raw message