You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by di...@hyperreal.org on 1998/07/04 00:08:51 UTC

cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_auth_anon.c mod_auth_db.c mod_auth_dbm.c

dirkx       98/07/03 15:08:51

  Modified:    src/modules/standard mod_auth.c mod_auth_anon.c
                        mod_auth_db.c mod_auth_dbm.c
  Log:
  added 'const' in a couple of causes because Ben fixed this in the include file. This fixes the compiler warning for all the sent_pw pointers
  
  Revision  Changes    Path
  1.37      +2 -1      apache-1.3/src/modules/standard/mod_auth.c
  
  Index: mod_auth.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -u -r1.36 -r1.37
  --- mod_auth.c	1998/07/01 21:19:58	1.36
  +++ mod_auth.c	1998/07/03 22:08:49	1.37
  @@ -201,7 +201,8 @@
       auth_config_rec *sec =
       (auth_config_rec *) ap_get_module_config(r->per_dir_config, &auth_module);
       conn_rec *c = r->connection;
  -    char *sent_pw, *real_pw;
  +    const char *sent_pw;
  +    char *real_pw;
       int res;
   
       if ((res = ap_get_basic_auth_pw(r, &sent_pw)))
  
  
  
  1.34      +7 -7      apache-1.3/src/modules/standard/mod_auth_anon.c
  
  Index: mod_auth_anon.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_auth_anon.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -u -r1.33 -r1.34
  --- mod_auth_anon.c	1998/04/11 12:00:44	1.33
  +++ mod_auth_anon.c	1998/07/03 22:08:49	1.34
  @@ -217,10 +217,10 @@
       (anon_auth_config_rec *) ap_get_module_config(r->per_dir_config,
   					       &anon_auth_module);
       conn_rec *c = r->connection;
  -    char *send_pw;
  +    const char *sent_pw;
       int res = DECLINED;
   
  -    if ((res = ap_get_basic_auth_pw(r, &send_pw)))
  +    if ((res = ap_get_basic_auth_pw(r, &sent_pw)))
   	return res;
   
       /* Ignore if we are not configured */
  @@ -246,15 +246,15 @@
       /* username is OK */
   	   (res == OK)
       /* password been filled out ? */
  -	   && ((!sec->auth_anon_mustemail) || strlen(send_pw))
  +	   && ((!sec->auth_anon_mustemail) || strlen(sent_pw))
       /* does the password look like an email address ? */
   	   && ((!sec->auth_anon_verifyemail)
  -	       || ((strpbrk("@", send_pw) != NULL)
  -		   && (strpbrk(".", send_pw) != NULL)))) {
  +	       || ((strpbrk("@", sent_pw) != NULL)
  +		   && (strpbrk(".", sent_pw) != NULL)))) {
   	if (sec->auth_anon_logemail && ap_is_initial_req(r)) {
   	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r->server,
   			"Anonymous: Passwd <%s> Accepted",
  -			send_pw ? send_pw : "\'none\'");
  +			sent_pw ? sent_pw : "\'none\'");
   	}
   	return OK;
       }
  @@ -262,7 +262,7 @@
   	if (sec->auth_anon_authoritative) {
   	    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server,
   			"Anonymous: Authoritative, Passwd <%s> not accepted",
  -			send_pw ? send_pw : "\'none\'");
  +			sent_pw ? sent_pw : "\'none\'");
   	    return AUTH_REQUIRED;
   	}
   	/* Drop out the bottom to return DECLINED */
  
  
  
  1.31      +3 -2      apache-1.3/src/modules/standard/mod_auth_db.c
  
  Index: mod_auth_db.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_auth_db.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -u -r1.30 -r1.31
  --- mod_auth_db.c	1998/04/11 12:00:44	1.30
  +++ mod_auth_db.c	1998/07/03 22:08:50	1.31
  @@ -205,7 +205,8 @@
       (db_auth_config_rec *) ap_get_module_config(r->per_dir_config,
   					     &db_auth_module);
       conn_rec *c = r->connection;
  -    char *sent_pw, *real_pw, *colon_pw;
  +    const char *sent_pw;
  +    char *real_pw, *colon_pw;
       int res;
   
       if ((res = ap_get_basic_auth_pw(r, &sent_pw)))
  @@ -246,7 +247,7 @@
       char *user = r->connection->user;
       int m = r->method_number;
   
  -    array_header *reqs_arr = ap_requires(r);
  +    const array_header *reqs_arr = ap_requires(r);
       require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
   
       register int x;
  
  
  
  1.38      +3 -2      apache-1.3/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -u -r1.37 -r1.38
  --- mod_auth_dbm.c	1998/04/11 12:00:44	1.37
  +++ mod_auth_dbm.c	1998/07/03 22:08:50	1.38
  @@ -206,7 +206,8 @@
       (dbm_auth_config_rec *) ap_get_module_config(r->per_dir_config,
   					      &dbm_auth_module);
       conn_rec *c = r->connection;
  -    char *sent_pw, *real_pw, *colon_pw;
  +    const char *sent_pw;
  +    char *real_pw, *colon_pw;
       int res;
   
       if ((res = ap_get_basic_auth_pw(r, &sent_pw)))
  @@ -247,7 +248,7 @@
       char *user = r->connection->user;
       int m = r->method_number;
   
  -    array_header *reqs_arr = ap_requires(r);
  +    const array_header *reqs_arr = ap_requires(r);
       require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
   
       register int x;