You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dg...@hyperreal.org on 1998/01/03 01:16:40 UTC

cvs commit: apachen/src/modules/standard mod_alias.c mod_auth_anon.c mod_cern_meta.c mod_digest.c mod_log_agent.c mod_log_referer.c mod_usertrack.c

dgaudet     98/01/02 16:16:39

  Modified:    src/modules/standard mod_alias.c mod_auth_anon.c
                        mod_cern_meta.c mod_digest.c mod_log_agent.c
                        mod_log_referer.c mod_usertrack.c
  Log:
  Somehow I missed a whole boatload of modules when adding static.  I'm not
  sure how that was.  There's a few other changes in here, nothing that affects
  functionality, they're essentially documentation fixes.
  
  Revision  Changes    Path
  1.28      +3 -3      apachen/src/modules/standard/mod_alias.c
  
  Index: mod_alias.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_alias.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_alias.c	1997/12/14 20:48:55	1.27
  +++ mod_alias.c	1998/01/03 00:16:35	1.28
  @@ -246,10 +246,10 @@
       {NULL}
   };
   
  -static int alias_matches(char *uri, char *alias_fakename)
  +static int alias_matches(const char *uri, const char *alias_fakename)
   {
  -    char *end_fakename = alias_fakename + strlen(alias_fakename);
  -    char *aliasp = alias_fakename, *urip = uri;
  +    const char *end_fakename = alias_fakename + strlen(alias_fakename);
  +    const char *aliasp = alias_fakename, *urip = uri;
   
       while (aliasp < end_fakename) {
   	if (*aliasp == '/') {
  
  
  
  1.28      +10 -10    apachen/src/modules/standard/mod_auth_anon.c
  
  Index: mod_auth_anon.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_anon.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_auth_anon.c	1997/10/22 20:30:15	1.27
  +++ mod_auth_anon.c	1998/01/03 00:16:35	1.28
  @@ -112,7 +112,7 @@
   
   } anon_auth_config_rec;
   
  -void *create_anon_auth_dir_config(pool *p, char *d)
  +static void *create_anon_auth_dir_config(pool *p, char *d)
   {
       anon_auth_config_rec *sec = (anon_auth_config_rec *)
       pcalloc(p, sizeof(anon_auth_config_rec));
  @@ -131,39 +131,39 @@
       return sec;
   }
   
  -const char *anon_set_passwd_flag(cmd_parms *cmd,
  +static const char *anon_set_passwd_flag(cmd_parms *cmd,
   				 anon_auth_config_rec * sec, int arg)
   {
       sec->auth_anon_mustemail = arg;
       return NULL;
   }
   
  -const char *anon_set_userid_flag(cmd_parms *cmd,
  +static const char *anon_set_userid_flag(cmd_parms *cmd,
   				 anon_auth_config_rec * sec, int arg)
   {
       sec->auth_anon_nouserid = arg;
       return NULL;
   }
  -const char *anon_set_logemail_flag(cmd_parms *cmd,
  +static const char *anon_set_logemail_flag(cmd_parms *cmd,
   				   anon_auth_config_rec * sec, int arg)
   {
       sec->auth_anon_logemail = arg;
       return NULL;
   }
  -const char *anon_set_verifyemail_flag(cmd_parms *cmd,
  +static const char *anon_set_verifyemail_flag(cmd_parms *cmd,
   				      anon_auth_config_rec * sec, int arg)
   {
       sec->auth_anon_verifyemail = arg;
       return NULL;
   }
  -const char *anon_set_authoritative_flag(cmd_parms *cmd,
  +static const char *anon_set_authoritative_flag(cmd_parms *cmd,
   					anon_auth_config_rec * sec, int arg)
   {
       sec->auth_anon_authoritative = arg;
       return NULL;
   }
   
  -const char *anon_set_string_slots(cmd_parms *cmd,
  +static const char *anon_set_string_slots(cmd_parms *cmd,
   				  anon_auth_config_rec * sec, char *arg)
   {
   
  @@ -187,7 +187,7 @@
       return NULL;
   }
   
  -command_rec anon_auth_cmds[] =
  +static command_rec anon_auth_cmds[] =
   {
       {"Anonymous", anon_set_string_slots, NULL, OR_AUTHCFG, ITERATE,
        "a space-separated list of user IDs"},
  @@ -207,7 +207,7 @@
   
   module MODULE_VAR_EXPORT anon_auth_module;
   
  -int anon_authenticate_basic_user(request_rec *r)
  +static int anon_authenticate_basic_user(request_rec *r)
   {
       anon_auth_config_rec *sec =
       (anon_auth_config_rec *) get_module_config(r->per_dir_config,
  @@ -267,7 +267,7 @@
       return DECLINED;
   }
   
  -int check_anon_access(request_rec *r)
  +static int check_anon_access(request_rec *r)
   {
   #ifdef NOTYET
       conn_rec *c = r->connection;
  
  
  
  1.23      +8 -8      apachen/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_cern_meta.c	1997/10/22 20:30:17	1.22
  +++ mod_cern_meta.c	1998/01/03 00:16:36	1.23
  @@ -166,7 +166,7 @@
       char *metafiles;
   } cern_meta_dir_config;
   
  -void *create_cern_meta_dir_config(pool *p, char *dummy)
  +static void *create_cern_meta_dir_config(pool *p, char *dummy)
   {
       cern_meta_dir_config *new =
       (cern_meta_dir_config *) palloc(p, sizeof(cern_meta_dir_config));
  @@ -178,7 +178,7 @@
       return new;
   }
   
  -void *merge_cern_meta_dir_configs(pool *p, void *basev, void *addv)
  +static void *merge_cern_meta_dir_configs(pool *p, void *basev, void *addv)
   {
       cern_meta_dir_config *base = (cern_meta_dir_config *) basev;
       cern_meta_dir_config *add = (cern_meta_dir_config *) addv;
  @@ -192,26 +192,26 @@
       return new;
   }
   
  -const char *set_metadir(cmd_parms *parms, cern_meta_dir_config * dconf, char *arg)
  +static const char *set_metadir(cmd_parms *parms, cern_meta_dir_config * dconf, char *arg)
   {
       dconf->metadir = arg;
       return NULL;
   }
   
  -const char *set_metasuffix(cmd_parms *parms, cern_meta_dir_config * dconf, char *arg)
  +static const char *set_metasuffix(cmd_parms *parms, cern_meta_dir_config * dconf, char *arg)
   {
       dconf->metasuffix = arg;
       return NULL;
   }
   
  -const char *set_metafiles(cmd_parms *parms, cern_meta_dir_config * dconf, char *arg)
  +static const char *set_metafiles(cmd_parms *parms, cern_meta_dir_config * dconf, char *arg)
   {
       dconf->metafiles = arg;
       return NULL;
   }
   
   
  -command_rec cern_meta_cmds[] =
  +static command_rec cern_meta_cmds[] =
   {
       {"MetaFiles", set_metafiles, NULL, DIR_CMD_PERMS, FLAG, NULL},
       {"MetaDir", set_metadir, NULL, DIR_CMD_PERMS, TAKE1,
  @@ -221,7 +221,7 @@
       {NULL}
   };
   
  -int scan_meta_file(request_rec *r, FILE *f)
  +static int scan_meta_file(request_rec *r, FILE *f)
   {
       char w[MAX_STRING_LEN];
       char *l;
  @@ -276,7 +276,7 @@
       return OK;
   }
   
  -int add_cern_meta_data(request_rec *r)
  +static int add_cern_meta_data(request_rec *r)
   {
       char *metafilename;
       char *last_slash;
  
  
  
  1.29      +14 -9     apachen/src/modules/standard/mod_digest.c
  
  Index: mod_digest.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_digest.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_digest.c	1998/01/02 23:58:28	1.28
  +++ mod_digest.c	1998/01/03 00:16:36	1.29
  @@ -78,12 +78,12 @@
       char *digest;
   } digest_header_rec;
   
  -void *create_digest_dir_config(pool *p, char *d)
  +static void *create_digest_dir_config(pool *p, char *d)
   {
       return pcalloc(p, sizeof(digest_config_rec));
   }
   
  -const char *set_digest_slot(cmd_parms *cmd, void *offset, char *f, char *t)
  +static const char *set_digest_slot(cmd_parms *cmd, void *offset, char *f, char *t)
   {
       if (t && strcmp(t, "standard"))
   	return pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
  @@ -91,7 +91,7 @@
       return set_string_slot(cmd, offset, f);
   }
   
  -command_rec digest_cmds[] =
  +static command_rec digest_cmds[] =
   {
       {"AuthDigestFile", set_digest_slot,
     (void *) XtOffsetOf(digest_config_rec, pwfile), OR_AUTHCFG, TAKE12, NULL},
  @@ -100,7 +100,7 @@
   
   module MODULE_VAR_EXPORT digest_module;
   
  -char *get_hash(request_rec *r, char *user, char *auth_pwfile)
  +static char *get_hash(request_rec *r, char *user, char *auth_pwfile)
   {
       configfile_t *f;
       char l[MAX_STRING_LEN];
  @@ -130,13 +130,13 @@
   
   /* Parse the Authorization header, if it exists */
   
  -int get_digest_rec(request_rec *r, digest_header_rec * response)
  +static int get_digest_rec(request_rec *r, digest_header_rec * response)
   {
       const char *auth_line = table_get(r->headers_in,
                                       r->proxyreq ? "Proxy-Authorization"
                                       : "Authorization");
       int l;
  -    int s = 0, vk = 0, vv = 0;
  +    int s, vk = 0, vv = 0;
       char *t, *key, *value;
   
       if (!(t = auth_type(r)) || strcasecmp(t, "Digest"))
  @@ -163,6 +163,10 @@
   
       l = strlen(auth_line);
   
  +    /* Note we don't allocate l + 1 bytes for these deliberately, because
  +     * there has to be at least one '=' character for either of these two
  +     * new strings to be terminated.  That takes care of the need for +1.
  +     */
       key = palloc(r->pool, l);
       value = palloc(r->pool, l);
   
  @@ -173,6 +177,7 @@
   #define D_STRING 2
   #define D_EXIT -1
   
  +    s = D_KEY;
       while (s != D_EXIT) {
   	switch (s) {
   	case D_STRING:
  @@ -246,7 +251,7 @@
   
   /* The actual MD5 code... whee */
   
  -char *find_digest(request_rec *r, digest_header_rec * h, char *a1)
  +static char *find_digest(request_rec *r, digest_header_rec * h, char *a1)
   {
       return ap_md5(r->pool,
   		  (unsigned char *)pstrcat(r->pool, a1, ":", h->nonce, ":",
  @@ -270,7 +275,7 @@
    * basic authentication...
    */
   
  -int authenticate_digest_user(request_rec *r)
  +static int authenticate_digest_user(request_rec *r)
   {
       digest_config_rec *sec =
       (digest_config_rec *) get_module_config(r->per_dir_config,
  @@ -304,7 +309,7 @@
   
   /* Checking ID */
   
  -int digest_check_auth(request_rec *r)
  +static int digest_check_auth(request_rec *r)
   {
       char *user = r->connection->user;
       int m = r->method_number;
  
  
  
  1.19      +6 -7      apachen/src/modules/standard/mod_log_agent.c
  
  Index: mod_log_agent.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_log_agent.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_log_agent.c	1997/10/22 20:30:23	1.18
  +++ mod_log_agent.c	1998/01/03 00:16:37	1.19
  @@ -70,7 +70,7 @@
       int agent_fd;
   } agent_log_state;
   
  -void *make_agent_log_state(pool *p, server_rec *s)
  +static void *make_agent_log_state(pool *p, server_rec *s)
   {
       agent_log_state *cls =
       (agent_log_state *) palloc(p, sizeof(agent_log_state));
  @@ -78,11 +78,10 @@
       cls->fname = "";
       cls->agent_fd = -1;
   
  -
       return (void *) cls;
   }
   
  -const char *set_agent_log(cmd_parms *parms, void *dummy, char *arg)
  +static const char *set_agent_log(cmd_parms *parms, void *dummy, char *arg)
   {
       agent_log_state *cls = get_module_config(parms->server->module_config,
                                                &agent_log_module);
  @@ -91,7 +90,7 @@
       return NULL;
   }
   
  -command_rec agent_log_cmds[] =
  +static command_rec agent_log_cmds[] =
   {
       {"AgentLog", set_agent_log, NULL, RSRC_CONF, TAKE1,
        "the filename of the agent log"},
  @@ -122,7 +121,7 @@
       return (child_pid);
   }
   
  -void open_agent_log(server_rec *s, pool *p)
  +static void open_agent_log(server_rec *s, pool *p)
   {
       agent_log_state *cls = get_module_config(s->module_config,
                                                &agent_log_module);
  @@ -153,13 +152,13 @@
       }
   }
   
  -void init_agent_log(server_rec *s, pool *p)
  +static void init_agent_log(server_rec *s, pool *p)
   {
       for (; s; s = s->next)
           open_agent_log(s, p);
   }
   
  -int agent_log_transaction(request_rec *orig)
  +static int agent_log_transaction(request_rec *orig)
   {
       agent_log_state *cls = get_module_config(orig->server->module_config,
                                                &agent_log_module);
  
  
  
  1.19      +7 -7      apachen/src/modules/standard/mod_log_referer.c
  
  Index: mod_log_referer.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_log_referer.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_log_referer.c	1997/10/22 20:30:24	1.18
  +++ mod_log_referer.c	1998/01/03 00:16:37	1.19
  @@ -72,7 +72,7 @@
       array_header *referer_ignore_list;
   } referer_log_state;
   
  -void *make_referer_log_state(pool *p, server_rec *s)
  +static void *make_referer_log_state(pool *p, server_rec *s)
   {
       referer_log_state *cls =
       (referer_log_state *) palloc(p, sizeof(referer_log_state));
  @@ -83,7 +83,7 @@
       return (void *) cls;
   }
   
  -const char *set_referer_log(cmd_parms *parms, void *dummy, char *arg)
  +static const char *set_referer_log(cmd_parms *parms, void *dummy, char *arg)
   {
       referer_log_state *cls = get_module_config(parms->server->module_config,
                                                  &referer_log_module);
  @@ -92,7 +92,7 @@
       return NULL;
   }
   
  -const char *add_referer_ignore(cmd_parms *parms, void *dummy, char *arg)
  +static const char *add_referer_ignore(cmd_parms *parms, void *dummy, char *arg)
   {
       char **addme;
       referer_log_state *cls = get_module_config(parms->server->module_config,
  @@ -103,7 +103,7 @@
       return NULL;
   }
   
  -command_rec referer_log_cmds[] =
  +static command_rec referer_log_cmds[] =
   {
       {"RefererLog", set_referer_log, NULL, RSRC_CONF, TAKE1,
        "the filename of the referer log"},
  @@ -137,7 +137,7 @@
       return (child_pid);
   }
   
  -void open_referer_log(server_rec *s, pool *p)
  +static void open_referer_log(server_rec *s, pool *p)
   {
       referer_log_state *cls = get_module_config(s->module_config,
                                                  &referer_log_module);
  @@ -168,13 +168,13 @@
       }
   }
   
  -void init_referer_log(server_rec *s, pool *p)
  +static void init_referer_log(server_rec *s, pool *p)
   {
       for (; s; s = s->next)
           open_referer_log(s, p);
   }
   
  -int referer_log_transaction(request_rec *orig)
  +static int referer_log_transaction(request_rec *orig)
   {
       char **ptrptr, **ptrptr2;
       referer_log_state *cls = get_module_config(orig->server->module_config,
  
  
  
  1.23      +7 -7      apachen/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_usertrack.c	1997/12/21 01:58:57	1.22
  +++ mod_usertrack.c	1998/01/03 00:16:38	1.23
  @@ -123,7 +123,7 @@
   
   #define COOKIE_NAME "Apache="
   
  -void make_cookie(request_rec *r)
  +static void make_cookie(request_rec *r)
   {
       cookie_log_state *cls = get_module_config(r->server->module_config,
                                                 &usertrack_module);
  @@ -205,7 +205,7 @@
       return;
   }
   
  -int spot_cookie(request_rec *r)
  +static int spot_cookie(request_rec *r)
   {
       int *enable = (int *) get_module_config(r->per_dir_config,
                                               &usertrack_module);
  @@ -234,7 +234,7 @@
       return OK;                  /* We set our cookie */
   }
   
  -void *make_cookie_log_state(pool *p, server_rec *s)
  +static void *make_cookie_log_state(pool *p, server_rec *s)
   {
       cookie_log_state *cls =
       (cookie_log_state *) palloc(p, sizeof(cookie_log_state));
  @@ -244,18 +244,18 @@
       return (void *) cls;
   }
   
  -void *make_cookie_dir(pool *p, char *d)
  +static void *make_cookie_dir(pool *p, char *d)
   {
       return (void *) pcalloc(p, sizeof(int));
   }
   
  -const char *set_cookie_enable(cmd_parms *cmd, int *c, int arg)
  +static const char *set_cookie_enable(cmd_parms *cmd, int *c, int arg)
   {
       *c = arg;
       return NULL;
   }
   
  -const char *set_cookie_exp(cmd_parms *parms, void *dummy, const char *arg)
  +static const char *set_cookie_exp(cmd_parms *parms, void *dummy, const char *arg)
   {
       cookie_log_state *cls = get_module_config(parms->server->module_config,
                                                 &usertrack_module);
  @@ -322,7 +322,7 @@
       return NULL;
   }
   
  -command_rec cookie_log_cmds[] = {
  +static command_rec cookie_log_cmds[] = {
       {"CookieExpires", set_cookie_exp, NULL, RSRC_CONF, TAKE1,
       "an expiry date code"},
       {"CookieTracking", set_cookie_enable, NULL, OR_FILEINFO, FLAG,