httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: httpd-2.0/modules/aaa mod_auth_dbm.c
Date Thu, 27 Dec 2001 06:12:44 GMT
ianh        01/12/26 22:12:44

  Modified:    modules/aaa mod_auth_dbm.c
  Log:
  remove the tabs
  no justin, I didn't add them in the last commit ;)
  
  Revision  Changes    Path
  1.40      +61 -61    httpd-2.0/modules/aaa/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_auth_dbm.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- mod_auth_dbm.c	2001/12/27 06:03:13	1.39
  +++ mod_auth_dbm.c	2001/12/27 06:12:44	1.40
  @@ -133,7 +133,7 @@
                                   const char *f, const char *t)
   {
       if (!t || strcmp(t, "dbm"))
  -	return DECLINE_CMD;
  +        return DECLINE_CMD;
   
       return ap_set_file_slot(cmd, offset, f);
   }
  @@ -217,9 +217,9 @@
   #endif
   
       if (d.dptr) {
  -	pw = apr_palloc(r->pool, d.dsize + 1);
  -	strncpy(pw, d.dptr, d.dsize);
  -	pw[d.dsize] = '\0';	/* Terminate the string */
  +        pw = apr_palloc(r->pool, d.dsize + 1);
  +        strncpy(pw, d.dptr, d.dsize);
  +        pw[d.dsize] = '\0'; /* Terminate the string */
       }
   
       dbm_close(f);
  @@ -244,13 +244,13 @@
       char *grp_colon2;
   
       if (grp_data == NULL)
  -	return NULL;
  +        return NULL;
   
       if ((grp_colon = strchr(grp_data, ':')) != NULL) {
  -	grp_colon2 = strchr(++grp_colon, ':');
  -	if (grp_colon2)
  -	    *grp_colon2 = '\0';
  -	return grp_colon;
  +        grp_colon2 = strchr(++grp_colon, ':');
  +        if (grp_colon2)
  +            *grp_colon2 = '\0';
  +        return grp_colon;
       }
       return grp_data;
   }
  @@ -265,32 +265,32 @@
       int res;
   
       if ((res = ap_get_basic_auth_pw(r, &sent_pw)))
  -	return res;
  +        return res;
   
       if (!conf->auth_dbmpwfile)
  -	return DECLINED;
  +        return DECLINED;
   
       if (!(real_pw = get_dbm_pw(r, r->user, conf->auth_dbmpwfile,conf->auth_dbmtype)))
{
  -	if (!(conf->auth_dbmauthoritative))
  -	    return DECLINED;
  -	ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  -		    "DBM user %s not found: %s", r->user, r->filename);
  -	ap_note_basic_auth_failure(r);
  -	return HTTP_UNAUTHORIZED;
  +        if (!(conf->auth_dbmauthoritative))
  +            return DECLINED;
  +        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +                    "DBM user %s not found: %s", r->user, r->filename);
  +        ap_note_basic_auth_failure(r);
  +        return HTTP_UNAUTHORIZED;
       }
       /* Password is up to first : if exists */
       colon_pw = strchr(real_pw, ':');
       if (colon_pw) {
  -	*colon_pw = '\0';
  +        *colon_pw = '\0';
       }
       invalid_pw = apr_password_validate(sent_pw, real_pw);
       if (invalid_pw != APR_SUCCESS) {
  -	ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  -		      "DBM user %s: authentication failure for \"%s\": "
  +        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +                      "DBM user %s: authentication failure for \"%s\": "
                         "Password Mismatch",
  -		      r->user, r->uri);
  -	ap_note_basic_auth_failure(r);
  -	return HTTP_UNAUTHORIZED;
  +                      r->user, r->uri);
  +        ap_note_basic_auth_failure(r);
  +        return HTTP_UNAUTHORIZED;
       }
       return OK;
   }
  @@ -312,47 +312,47 @@
       char *w;
   
       if (!conf->auth_dbmgrpfile)
  -	return DECLINED;
  +        return DECLINED;
       if (!reqs_arr)
  -	return DECLINED;
  +        return DECLINED;
   
       for (x = 0; x < reqs_arr->nelts; x++) {
   
  -	if (!(reqs[x].method_mask & (AP_METHOD_BIT << m)))
  -	    continue;
  +        if (!(reqs[x].method_mask & (AP_METHOD_BIT << m)))
  +            continue;
   
  -	t = reqs[x].requirement;
  -	w = ap_getword_white(r->pool, &t);
  +        t = reqs[x].requirement;
  +        w = ap_getword_white(r->pool, &t);
   
  -	if (!strcmp(w, "group") && conf->auth_dbmgrpfile) {
  -	    const char *orig_groups, *groups;
  -	    char *v;
  +        if (!strcmp(w, "group") && conf->auth_dbmgrpfile) {
  +            const char *orig_groups, *groups;
  +            char *v;
   
           if (!(groups = get_dbm_grp(r, user, conf->auth_dbmgrpfile,conf->auth_dbmtype)))
{
  -		if (!(conf->auth_dbmauthoritative))
  -		    return DECLINED;
  -		ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  -			    "user %s not in DBM group file %s: %s",
  -			    user, conf->auth_dbmgrpfile, r->filename);
  -		ap_note_basic_auth_failure(r);
  -		return HTTP_UNAUTHORIZED;
  -	    }
  -	    orig_groups = groups;
  -	    while (t[0]) {
  -		w = ap_getword_white(r->pool, &t);
  -		groups = orig_groups;
  -		while (groups[0]) {
  -		    v = ap_getword(r->pool, &groups, ',');
  -		    if (!strcmp(v, w))
  -			return OK;
  -		}
  -	    }
  -	    ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  -			"user %s not in right group: %s",
  -			user, r->filename);
  -	    ap_note_basic_auth_failure(r);
  -	    return HTTP_UNAUTHORIZED;
  -	}
  +                if (!(conf->auth_dbmauthoritative))
  +                    return DECLINED;
  +                ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +                            "user %s not in DBM group file %s: %s",
  +                            user, conf->auth_dbmgrpfile, r->filename);
  +                ap_note_basic_auth_failure(r);
  +                return HTTP_UNAUTHORIZED;
  +            }
  +            orig_groups = groups;
  +            while (t[0]) {
  +                w = ap_getword_white(r->pool, &t);
  +                groups = orig_groups;
  +                while (groups[0]) {
  +                    v = ap_getword(r->pool, &groups, ',');
  +                    if (!strcmp(v, w))
  +                        return OK;
  +                }
  +            }
  +            ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +                        "user %s not in right group: %s",
  +                        user, r->filename);
  +            ap_note_basic_auth_failure(r);
  +            return HTTP_UNAUTHORIZED;
  +        }
       }
   
       return DECLINED;
  @@ -368,10 +368,10 @@
   module AP_MODULE_DECLARE_DATA auth_dbm_module =
   {
       STANDARD20_MODULE_STUFF,
  -    create_dbm_auth_dir_config,	/* dir config creater */
  -    NULL,			/* dir merger --- default is to override */
  -    NULL,			/* server config */
  -    NULL,			/* merge server config */
  -    dbm_auth_cmds,		/* command apr_table_t */
  +    create_dbm_auth_dir_config, /* dir config creater */
  +    NULL,                       /* dir merger --- default is to override */
  +    NULL,                       /* server config */
  +    NULL,                       /* merge server config */
  +    dbm_auth_cmds,              /* command apr_table_t */
       register_hooks              /* register hooks */
   };
  
  
  

Mime
View raw message