cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_status.c mod_cern_meta.c
rse 00/02/05 04:33:17 Modified:src CHANGES src/modules/standard mod_auth.c mod_status.c mod_cern_meta.c Log: Make implementation/descriptions of the FLAG directives AuthAuthoritative, MetaFiles and ExtendedStatus consistent with documentation and the standard way of implementation those directives. Submitted by: David MacKenzie <[EMAIL PROTECTED]>, Ralf S. Engelschall Reviewed by: Ralf S. Engelschall PR: 5642 Revision ChangesPath 1.1509+5 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1508 retrieving revision 1.1509 diff -u -r1.1508 -r1.1509 --- CHANGES 2000/02/05 12:01:48 1.1508 +++ CHANGES 2000/02/05 12:33:13 1.1509 @@ -1,5 +1,10 @@ Changes with Apache 1.3.12 + *) Make implementation/descriptions of the FLAG directives + AuthAuthoritative, MetaFiles and ExtendedStatus consistent with + documentation and the standard way of implementation those directives. + [David MacKenzie <[EMAIL PROTECTED]>, Ralf S. Engelschall] PR#5642 + *) Cast integer ap_wait_t values in http_main.c to get rid of compile time errors on platforms where "ap_wait_t" is not defined as "int" (currently only the NEXT and UTS21 platforms). 1.48 +1 -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.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- mod_auth.c1999/08/02 20:50:22 1.47 +++ mod_auth.c2000/02/05 12:33:15 1.48 @@ -110,7 +110,7 @@ {"AuthAuthoritative", ap_set_flag_slot, (void *) XtOffsetOf(auth_config_rec, auth_authoritative), OR_AUTHCFG, FLAG, - "Set to 'no' to allow access control to be passed along to lower modules if the UserID is not known to this module"}, + "Set to 'off' to allow access control to be passed along to lower modules if the UserID is not known to this module"}, {NULL} }; 1.112 +3 -8 apache-1.3/src/modules/standard/mod_status.c Index: mod_status.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_status.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- mod_status.c 2000/02/02 20:44:06 1.111 +++ mod_status.c 2000/02/05 12:33:16 1.112 @@ -135,24 +135,19 @@ *command-related code. This is here to prevent use of ExtendedStatus * without status_module included. */ -static const char *set_extended_status(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_extended_status(cmd_parms *cmd, void *dummy, int arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { return err; } -if (!strcasecmp(arg, "off") || !strcmp(arg, "0")) { - ap_extended_status = 0; -} -else { - ap_extended_status = 1; -} +ap_extended_status = arg; return NULL; } static const command_rec status_module_cmds[] = { -{ "ExtendedStatus", set_extended_status, NULL, RSRC_CONF, TAKE1, +{ "ExtendedStatus", set_extended_status, NULL, RSRC_CONF, FLAG, "\"On\" to enable extended status information, \"Off\" to disable" }, {NULL} }; 1.38 +2 -2 apache-1.3/src/modules/standard/mod_cern_meta.c Index: mod_cern_meta.c === RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_cern_meta.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- mod_cern_meta.c 1999/10/21 20:45:17 1.37 +++ mod_cern_meta.c 2000/02/05 12:33:16 1.38 @@ -169,7 +169,7 @@ typedef struct { char *metadir; char *metasuffix; -char *metafiles; +int metafiles; } cern_meta_dir_config; static void *create_cern_meta_dir_config(pool *p, char *dummy) @@ -210,7 +210,7 @@ return NULL; } -static 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, int arg) { dconf->metafiles = arg; return NULL;
Re: cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c
On 2 Aug 1999 [EMAIL PROTECTED] wrote: >src/include ap.h ap_md5.h ap_sha1.h >src/main http_main.c >src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c > Removed: src/include ap_checkpass.h I am struggling with the same now; moving a few base64 encoders into one ap_base64.c file. What is the cut-off point for moving all declarations into ap.h as opposed to adding a few individual ap_*.h file ? Or was the current ap_md5.h simply wrong to begin with ? And caused by its legacy start; as an import from elsewhere ? Seeing your change I kind of prefer the ap.h collation; but I wonder a bit, as the base64 and validate_passwd functions are only used in just one or two files. ap.h is not getting any smaller. Or is that a needless worry ? Dw. > RCS file: /home/cvs/apache-1.3/src/include/ap.h,v > retrieving revision 1.21 > retrieving revision 1.22 > diff -u -r1.21 -r1.22 > --- ap.h1999/05/31 17:09:31 1.21 > +++ ap.h1999/08/02 20:50:14 1.22 > @@ -159,6 +159,7 @@ > __attribute__((format(printf,3,4))); >API_EXPORT(int) ap_vsnprintf(char *buf, size_t len, const char *format, >va_list ap); > +API_EXPORT(char *) ap_validate_password(const char *passwd, const char > *hash); > >#ifdef __cplusplus >} >
cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c
coar99/08/02 13:50:23 Modified:src/ap ap_sha1.c src/include ap.h ap_md5.h ap_sha1.h src/main http_main.c src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c Removed: src/include ap_checkpass.h Log: Fix some spacing issues in the SHA1 and ap_validate_password changes. ap_validate_password() isn't called by anything in the core, so the link may well omit it -- causing DSO mod_auth* modules to fail to load. Force a reference to it into the core server so that won't happen. As soon as ap_checkpass.c includes any other symbols routinely referenced by the core, the kludge at the bottom of http_main.c can go away. Or earlier, if someone finds a better solution. Revision ChangesPath 1.2 +100 -91 apache-1.3/src/ap/ap_sha1.c Index: ap_sha1.c === RCS file: /home/cvs/apache-1.3/src/ap/ap_sha1.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ap_sha1.c 1999/08/02 10:13:44 1.1 +++ ap_sha1.c 1999/08/02 20:50:12 1.2 @@ -55,7 +55,7 @@ * * The only exported function: * - *ap_sha1_base64(char *clear, int len, char *out); + *ap_sha1_base64(const char *clear, int len, char *out); * * provides a means to SHA1 crypt/encode a plaintext password in * a way which makes password files compatible with those commonly @@ -140,19 +140,19 @@ #define SHA_DIGESTSIZE 20 typedef struct { - LONG digest[5]; /* message digest */ - LONG count_lo, count_hi;/* 64-bit bit count */ - LONG data[16]; /* SHA data buffer */ - int local; /* unprocessed amount in data */ - } SHA_INFO; - -void sha_init(SHA_INFO *); -void sha_update(SHA_INFO *, BYTE *, int); -void sha_final(SHA_INFO *); -void sha_raw_swap(SHA_INFO *); -void output64chunk(unsigned char, unsigned char, unsigned char, - int, unsigned char **); -void encode_mime64(unsigned char *, unsigned char *, int); +LONG digest[5]; /* message digest */ +LONG count_lo, count_hi;/* 64-bit bit count */ +LONG data[16]; /* SHA data buffer */ +int local; /* unprocessed amount in data */ +} SHA_INFO; + +static void sha_init(SHA_INFO *); +static void sha_update(SHA_INFO *, const BYTE *, int); +static void sha_final(SHA_INFO *); +static void sha_raw_swap(SHA_INFO *); +static void output64chunk(unsigned char, unsigned char, unsigned char, + int, unsigned char **); +static void encode_mime64(unsigned char *, unsigned char *, int); void sha1_base64(char *, int, char *); /* do SHA transformation */ @@ -217,14 +217,15 @@ } union endianTest { - long Long; - char Char[sizeof(long)]; +long Long; +char Char[sizeof(long)]; }; -char isLittleEndian() { - static union endianTest u; - u.Long = 1; - return(u.Char[0]==1); +static char isLittleEndian(void) +{ +static union endianTest u; +u.Long = 1; +return (u.Char[0] == 1); } /* change endianness of data */ @@ -236,25 +237,25 @@ BYTE ct[4], *cp; if (isLittleEndian()) {/* do the swap only if it is little endian */ - count /= sizeof(LONG); - cp = (BYTE *) buffer; - for (i = 0; i < count; ++i) { - ct[0] = cp[0]; - ct[1] = cp[1]; - ct[2] = cp[2]; - ct[3] = cp[3]; - cp[0] = ct[3]; - cp[1] = ct[2]; - cp[2] = ct[1]; - cp[3] = ct[0]; - cp += sizeof(LONG); - } + count /= sizeof(LONG); + cp = (BYTE *) buffer; + for (i = 0; i < count; ++i) { + ct[0] = cp[0]; + ct[1] = cp[1]; + ct[2] = cp[2]; + ct[3] = cp[3]; + cp[0] = ct[3]; + cp[1] = ct[2]; + cp[2] = ct[1]; + cp[3] = ct[0]; + cp += sizeof(LONG); + } } } /* initialize the SHA digest */ -void sha_init(SHA_INFO *sha_info) +static void sha_init(SHA_INFO *sha_info) { sha_info->digest[0] = 0x67452301L; sha_info->digest[1] = 0xefcdab89L; @@ -268,7 +269,7 @@ /* update the SHA digest */ -void sha_update(SHA_INFO *sha_info, BYTE *buffer, int count) +static void sha_update(SHA_INFO *sha_info, const BYTE *buffer, int count) { int i; @@ -289,7 +290,8 @@ if (sha_info->local == SHA_BLOCKSIZE) { maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE); sha_transform(sha_info); - } else { + } + else { return; } } @@ -306,7 +308,7 @@ /* finish computing the SHA digest */ -void sha_final(SHA_INFO *sha_info) +static void sha_final(SHA_I
cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c
marc99/01/31 14:01:36 Modified:src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c Log: We have found the prototype for crypt. Since people actually once in a while are "nice enough" to write in telling me that they know where the prototype is on their system based on that comment, plus we don't do the casting associated with the comment any more, it can go away. Revision ChangesPath 1.44 +0 -1 apache-1.3/src/modules/standard/mod_auth.c Index: mod_auth.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- mod_auth.c1999/01/25 22:55:38 1.43 +++ mod_auth.c1999/01/31 22:01:34 1.44 @@ -220,7 +220,6 @@ ap_note_basic_auth_failure(r); return AUTH_REQUIRED; } -/* anyone know where the prototype for crypt is? */ if (real_pw[0] == '$' && real_pw[1] == '1') { const char *salt = real_pw + 3; salt = ap_getword(r->pool, &salt, '$'); 1.39 +0 -1 apache-1.3/src/modules/standard/mod_auth_db.c Index: mod_auth_db.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth_db.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- mod_auth_db.c 1999/01/26 00:15:21 1.38 +++ mod_auth_db.c 1999/01/31 22:01:34 1.39 @@ -251,7 +251,6 @@ if (colon_pw) { *colon_pw = '\0'; } -/* anyone know where the prototype for crypt is? */ if (real_pw[0] == '$' && real_pw[1] == '1') { char *salt = real_pw + 3; salt = ap_getword(r->pool, &salt, '$'); 1.44 +0 -1 apache-1.3/src/modules/standard/mod_auth_dbm.c Index: mod_auth_dbm.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth_dbm.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- mod_auth_dbm.c1999/01/26 00:15:21 1.43 +++ mod_auth_dbm.c1999/01/31 22:01:34 1.44 @@ -232,7 +232,6 @@ colon_pw = strchr(real_pw, ':'); if (colon_pw) *colon_pw = '\0'; -/* anyone know where the prototype for crypt is? */ if (real_pw[0] == '$' && real_pw[1] == '1') { char *salt = real_pw + 3; salt = ap_getword(r->pool, &salt, '$');
cvs commit: apache-1.3/src/modules/standard mod_auth.c
marc98/10/18 22:43:35 Modified:src CHANGES src/modules/standard mod_auth.c Log: Log an error if we encounter a malformed "require" directive in mod_auth if we know that we know that no other module can deal with it. Revision ChangesPath 1.1112+4 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1. retrieving revision 1.1112 diff -u -r1. -r1.1112 --- CHANGES 1998/10/19 02:16:25 1. +++ CHANGES 1998/10/19 05:43:33 1.1112 @@ -1,5 +1,9 @@ Changes with Apache 1.3.4 + *) Log an error if we encounter a malformed "require" directive + in mod_auth if we know that we know that no other module can + deal with it. [Marc Slemko] + *) Remove ap_private_extern method of hiding conflicting symbols on the NEXT platform because it is not correct for all versions, and the versions for which it is correct are unknown. 1.41 +10 -0 apache-1.3/src/modules/standard/mod_auth.c Index: mod_auth.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- mod_auth.c1998/10/03 15:11:52 1.40 +++ mod_auth.c1998/10/19 05:43:34 1.41 @@ -283,6 +283,16 @@ if (ap_table_get(grpstatus, w)) return OK; } + } else if (sec->auth_authoritative) { + /* if we aren't authoritative, any require directive could be + * valid even if we don't grok it. However, if we are + * authoritative, we can warn the user they did something wrong. + * That something could be a missing "AuthAuthoritative off", but + * more likely is a typo in the require directive. + */ + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, + "access to %s failed, reason: unknown require directive:" + "\"%s\"", r->uri, reqs[x].requirement); } }
cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c
rse 98/10/03 08:11:54 Modified:src CHANGES src/modules/standard mod_auth.c mod_auth_db.c mod_auth_dbm.c Log: Fix `require ...' directive parsing in mod_auth, mod_auth_dbm and mod_auth_db by using ap_getword_white() (which uses ap_isspace()) instead of ap_getword(..., ' ') (which parses only according to spaces but not tabs). Submitted by: James Morris <[EMAIL PROTECTED]> Reviewed and extended to other mods: Ralf S. Engelschall PR: 3105 Revision ChangesPath 1.1094+5 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1093 retrieving revision 1.1094 diff -u -r1.1093 -r1.1094 --- CHANGES 1998/10/03 14:42:23 1.1093 +++ CHANGES 1998/10/03 15:11:50 1.1094 @@ -1,5 +1,10 @@ Changes with Apache 1.3.3 + *) Fix `require ...' directive parsing in mod_auth, mod_auth_dbm and + mod_auth_db by using ap_getword_white() (which uses ap_isspace()) instead of + ap_getword(..., ' ') (which parses only according to spaces but not tabs). + [James Morris <[EMAIL PROTECTED]>, Ralf S. Engelschall] PR#3105 + *) Fix the SERVER_NAME variable under sub-request situations (where `UseCanonicalName off' is used) like CGI's called from SSI pages or RewriteCond variables by adopting r->hostname to sub-requests. 1.40 +1 -1 apache-1.3/src/modules/standard/mod_auth.c Index: mod_auth.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- mod_auth.c1998/08/06 17:30:54 1.39 +++ mod_auth.c1998/10/03 15:11:52 1.40 @@ -264,7 +264,7 @@ method_restricted = 1; t = reqs[x].requirement; - w = ap_getword(r->pool, &t, ' '); + w = ap_getword_white(r->pool, &t); if (!strcmp(w, "valid-user")) return OK; if (!strcmp(w, "user")) { 1.34 +2 -2 apache-1.3/src/modules/standard/mod_auth_db.c Index: mod_auth_db.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth_db.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- mod_auth_db.c 1998/09/19 12:12:36 1.33 +++ mod_auth_db.c 1998/10/03 15:11:52 1.34 @@ -281,7 +281,7 @@ continue; t = reqs[x].requirement; - w = ap_getword(r->pool, &t, ' '); + w = ap_getword_white(r->pool, &t); if (!strcmp(w, "group") && sec->auth_dbgrpfile) { const char *orig_groups, *groups; @@ -298,7 +298,7 @@ } orig_groups = groups; while (t[0]) { - w = ap_getword(r->pool, &t, ' '); + w = ap_getword_white(r->pool, &t); groups = orig_groups; while (groups[0]) { v = ap_getword(r->pool, &groups, ','); 1.40 +2 -2 apache-1.3/src/modules/standard/mod_auth_dbm.c Index: mod_auth_dbm.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth_dbm.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- mod_auth_dbm.c1998/08/06 17:30:55 1.39 +++ mod_auth_dbm.c1998/10/03 15:11:53 1.40 @@ -266,7 +266,7 @@ continue; t = reqs[x].requirement; - w = ap_getword(r->pool, &t, ' '); + w = ap_getword_white(r->pool, &t); if (!strcmp(w, "group") && sec->auth_dbmgrpfile) { const char *orig_groups, *groups; @@ -283,7 +283,7 @@ } orig_groups = groups; while (t[0]) { - w = ap_getword(r->pool, &t, ' '); + w = ap_getword_white(r->pool, &t); groups = orig_groups; while (groups[0]) { v = ap_getword(r->pool, &groups, ',');
cvs commit: apache-1.3/src/modules/standard mod_auth.c
marc98/07/09 23:33:25 Modified:src/modules/standard mod_auth.c Log: Add a warning if a valid user that enters a proper password fails to get access to a directory because they aren't in the list of those allowed access. Revision ChangesPath 1.38 +6 -0 apache-1.3/src/modules/standard/mod_auth.c Index: mod_auth.c === RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- mod_auth.c1998/07/03 22:08:49 1.37 +++ mod_auth.c1998/07/10 06:33:24 1.38 @@ -292,6 +292,12 @@ if (!(sec->auth_authoritative)) return DECLINED; +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, + "access to %s failed for %s, reason: user %s not allowed access", + r->uri, + ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME), + user); + ap_note_basic_auth_failure(r); return AUTH_REQUIRED; }
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 ChangesPath 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.c1998/07/01 21:19:58 1.36 +++ mod_auth.c1998/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.c1998/04/11 12:00:44 1.37 +++ mod_auth_dbm.c1998/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_mod
cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_digest.c mod_rewrite.c
ben 98/07/01 14:20:01 Modified:src/include http_core.h http_protocol.h src/main http_core.c http_protocol.c http_request.c src/modules/standard mod_auth.c mod_digest.c mod_rewrite.c Log: Yet more constification. Revision ChangesPath 1.44 +5 -5 apache-1.3/src/include/http_core.h Index: http_core.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- http_core.h 1998/05/03 17:31:08 1.43 +++ http_core.h 1998/07/01 21:19:51 1.44 @@ -97,8 +97,8 @@ API_EXPORT(int) ap_allow_options (request_rec *); API_EXPORT(int) ap_allow_overrides (request_rec *); -API_EXPORT(char *) ap_default_type (request_rec *); -API_EXPORT(char *) ap_document_root (request_rec *); /* Don't use this! If your request went +API_EXPORT(const char *) ap_default_type (request_rec *); +API_EXPORT(const char *) ap_document_root (request_rec *); /* Don't use this! If your request went * through a Userdir, or something like * that, it'll screw you. But it's * back-compatible... @@ -125,10 +125,10 @@ char *requirement; } require_line; -API_EXPORT(char *) ap_auth_type (request_rec *); -API_EXPORT(char *) ap_auth_name (request_rec *); +API_EXPORT(const char *) ap_auth_type (request_rec *); +API_EXPORT(const char *) ap_auth_name (request_rec *); API_EXPORT(int) ap_satisfies (request_rec *r); -API_EXPORT(array_header *) ap_requires (request_rec *); +API_EXPORT(const array_header *) ap_requires (request_rec *); #ifdef CORE_PRIVATE 1.44 +1 -1 apache-1.3/src/include/http_protocol.h Index: http_protocol.h === RCS file: /export/home/cvs/apache-1.3/src/include/http_protocol.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- http_protocol.h 1998/05/06 15:04:11 1.43 +++ http_protocol.h 1998/07/01 21:19:51 1.44 @@ -195,7 +195,7 @@ API_EXPORT(void) ap_note_auth_failure(request_rec *r); API_EXPORT(void) ap_note_basic_auth_failure(request_rec *r); API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r); -API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, char **pw); +API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw); /* * Setting up the protocol fields for subsidiary requests... 1.205 +5 -5 apache-1.3/src/main/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.204 retrieving revision 1.205 diff -u -r1.204 -r1.205 --- http_core.c 1998/06/16 03:37:28 1.204 +++ http_core.c 1998/07/01 21:19:53 1.205 @@ -400,7 +400,7 @@ return conf->override; } -API_EXPORT(char *) ap_auth_type (request_rec *r) +API_EXPORT(const char *) ap_auth_type (request_rec *r) { core_dir_config *conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); @@ -408,7 +408,7 @@ return conf->ap_auth_type; } -API_EXPORT(char *) ap_auth_name (request_rec *r) +API_EXPORT(const char *) ap_auth_name (request_rec *r) { core_dir_config *conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); @@ -416,7 +416,7 @@ return conf->ap_auth_name; } -API_EXPORT(char *) ap_default_type (request_rec *r) +API_EXPORT(const char *) ap_default_type (request_rec *r) { core_dir_config *conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); @@ -424,7 +424,7 @@ return conf->ap_default_type ? conf->ap_default_type : DEFAULT_CONTENT_TYPE; } -API_EXPORT(char *) ap_document_root (request_rec *r) /* Don't use this!!! */ +API_EXPORT(const char *) ap_document_root (request_rec *r) /* Don't use this!!! */ { core_server_config *conf = (core_server_config *)ap_get_module_config(r->server->module_config, @@ -433,7 +433,7 @@ return conf->ap_document_root; } -API_EXPORT(array_header *) ap_requires (request_rec *r) +API_EXPORT(const array_header *) ap_requires (request_rec *r) { core_dir_config *conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); 1.222 +3 -3 apache-1.3/src/main/http_protocol.c Index: http_protocol.c === RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v retrieving