httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/aaa mod_authn_anon.c
Date Sun, 09 Nov 2003 18:21:51 GMT
nd          2003/11/09 10:21:51

  Modified:    modules/aaa mod_authn_anon.c
  Log:
  allow any user id when configured with 'anonymous *'
  
  PR: 11428
  
  Revision  Changes    Path
  1.5       +16 -4     httpd-2.0/modules/aaa/mod_authn_anon.c
  
  Index: mod_authn_anon.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_authn_anon.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- mod_authn_anon.c	9 Nov 2003 18:02:26 -0000	1.4
  +++ mod_authn_anon.c	9 Nov 2003 18:21:51 -0000	1.5
  @@ -119,6 +119,7 @@
       int logemail;
       int verifyemail;
       int mustemail;
  +    int anyuserid;
   } authn_anon_config_rec;
   
   static void *create_authn_anon_dir_config(apr_pool_t *p, char *d)
  @@ -129,6 +130,7 @@
       conf->users = NULL;
   
       conf->nouserid = 0;
  +    conf->anyuserid = 0;
       conf->logemail = 1;
       conf->verifyemail = 0;
       conf->mustemail = 1;
  @@ -146,10 +148,17 @@
       }
   
       /* squeeze in a record */
  -    first = conf->users;
  -    conf->users = apr_palloc(cmd->pool, sizeof(*conf->users));
  -    conf->users->user = apr_pstrdup(cmd->pool, arg);
  -    conf->users->next = first;
  +    if (!conf->anyuserid) {
  +        if (!strcmp(arg, "*")) {
  +            conf->anyuserid = 1;
  +        }
  +        else {
  +            first = conf->users;
  +            conf->users = apr_palloc(cmd->pool, sizeof(*conf->users));
  +            conf->users->user = apr_pstrdup(cmd->pool, arg);
  +            conf->users->next = first;
  +        }
  +    }
   
       return NULL;
   }
  @@ -193,6 +202,9 @@
           if (conf->nouserid) {
               res = AUTH_USER_FOUND;
           }
  +    }
  +    else if (conf->anyuserid) {
  +        res = AUTH_USER_FOUND;
       }
       else {
           anon_auth_user *p = conf->users;
  
  
  

Mime
View raw message