]> git.pld-linux.org Git - packages/apache-mod_auth_kerb.git/blame - apache-mod_auth_kerb-aprfix.patch
- restart apache in %postun rather in %preun as the config file, loading module
[packages/apache-mod_auth_kerb.git] / apache-mod_auth_kerb-aprfix.patch
CommitLineData
ecaaacce 1--- mod_auth_kerb-5.0-rc6.orig/src/mod_auth_kerb.c 2004-08-10 14:01:01.000000000 +0200
2+++ mod_auth_kerb-5.0-rc6/src/mod_auth_kerb.c 2005-02-18 13:54:13.560145408 +0100
3@@ -105,7 +105,7 @@
4 #define MK_AUTH_TYPE r->ap_auth_type
5 #else
6 #define MK_POOL pool
7-#define MK_TABLE_GET ap_table_get
8+#define MK_TABLE_GET apr_table_get
9 #define MK_USER r->connection->user
10 #define MK_AUTH_TYPE r->connection->ap_auth_type
11 #define PROXYREQ_PROXY STD_PROXY
12@@ -142,7 +142,7 @@
13 #ifdef STANDARD20_MODULE_STUFF
14 #define command(name, func, var, type, usage) \
15 AP_INIT_ ## type (name, func, \
16- (void*)APR_XtOffsetOf(kerb_auth_config, var), \
17+ (void*)APR_OFFSETOF(kerb_auth_config, var), \
18 OR_AUTHCFG | RSRC_CONF, usage)
19 #else
20 #define command(name, func, var, type, usage) \
21@@ -231,7 +231,7 @@
22 {
23 kerb_auth_config *rec;
24
25- rec = (kerb_auth_config *) ap_pcalloc(p, sizeof(kerb_auth_config));
26+ rec = (kerb_auth_config *) apr_pcalloc(p, sizeof(kerb_auth_config));
27 ((kerb_auth_config *)rec)->krb_verify_kdc = 1;
28 ((kerb_auth_config *)rec)->krb_service_name = "HTTP";
29 ((kerb_auth_config *)rec)->krb_authoritative = 1;
30@@ -249,7 +249,7 @@
31 static const char*
32 krb5_save_realms(cmd_parms *cmd, kerb_auth_config *sec, char *arg)
33 {
34- sec->krb_auth_realms= ap_pstrdup(cmd->pool, arg);
35+ sec->krb_auth_realms= apr_pstrdup(cmd->pool, arg);
36 return NULL;
37 }
38
39@@ -387,9 +387,13 @@
40 return HTTP_INTERNAL_SERVER_ERROR;
41 }
42
43- tkt_file_p = ap_pstrdup(r->pool, tkt_file);
44+ tkt_file_p = apr_pstrdup(r->pool, tkt_file);
45+#ifndef STANDARD20_MODULE_STUFF
46 ap_register_cleanup(r->pool, tkt_file_p,
47 krb4_cache_cleanup, ap_null_cleanup);
48+#else
49+ apr_pool_cleanup_register(r->pool,tkt_file_p,krb4_cache_cleanup,apr_pool_cleanup_null);
50+#endif
51
52 krb_set_tkt_string(tkt_file);
53
54@@ -432,14 +436,14 @@
55 goto end;
56 }
57
58- user = ap_pstrdup(r->pool, sent_name);
59+ user = apr_pstrdup(r->pool, sent_name);
60 if (sent_instance)
61- user = ap_pstrcat(r->pool, user, ".", sent_instance, NULL);
62- user = ap_pstrcat(r->pool, user, "@", realm, NULL);
63+ user = apr_pstrcat(r->pool, user, ".", sent_instance, NULL);
64+ user = apr_pstrcat(r->pool, user, "@", realm, NULL);
65
66 MK_USER = user;
67 MK_AUTH_TYPE = "Basic";
68- ap_table_setn(r->subprocess_env, "KRBTKFILE", tkt_file_p);
69+ apr_table_setn(r->subprocess_env, "KRBTKFILE", tkt_file_p);
70
71 if (!conf->krb_save_credentials)
72 krb4_cache_cleanup(tkt_file);
73@@ -677,7 +681,7 @@
74 int ret;
75 krb5_ccache tmp_ccache = NULL;
76
77- ccname = ap_psprintf(r->pool, "FILE:%s/krb5cc_apache_XXXXXX", P_tmpdir);
78+ ccname = apr_psprintf(r->pool, "FILE:%s/krb5cc_apache_XXXXXX", P_tmpdir);
79 fd = mkstemp(ccname + strlen("FILE:"));
80 if (fd < 0) {
81 log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
82@@ -706,9 +710,13 @@
83 goto end;
84 }
85
86- ap_table_setn(r->subprocess_env, "KRB5CCNAME", ccname);
87+ apr_table_setn(r->subprocess_env, "KRB5CCNAME", ccname);
88+#ifndef STANDARD20_MODULE_STUFF
89 ap_register_cleanup(r->pool, ccname,
90 krb5_cache_cleanup, ap_null_cleanup);
91+#else
92+ apr_pool_cleanup_register(r->pool,ccname,krb5_cache_cleanup,apr_pool_cleanup_null);
93+#endif
94
95 *ccache = tmp_ccache;
96 tmp_ccache = NULL;
97@@ -866,7 +874,7 @@
98 ret = HTTP_UNAUTHORIZED;
99 goto end;
100 }
101- MK_USER = ap_pstrdup (r->pool, name);
102+ MK_USER = apr_pstrdup (r->pool, name);
103 MK_AUTH_TYPE = "Basic";
104 free(name);
105
106@@ -902,7 +910,7 @@
107 gss_buffer_desc status_string;
108 char *err_msg;
109
110- err_msg = ap_pstrdup(p, prefix);
111+ err_msg = apr_pstrdup(p, prefix);
112 do {
113 maj_stat = gss_display_status (&min_stat,
114 err_maj,
115@@ -912,7 +920,7 @@
116 &status_string);
117 if (GSS_ERROR(maj_stat))
118 break;
119- err_msg = ap_pstrcat(p, err_msg, ": ", (char*) status_string.value, NULL);
120+ err_msg = apr_pstrcat(p, err_msg, ": ", (char*) status_string.value, NULL);
121 gss_release_buffer(&min_stat, &status_string);
122
123 maj_stat = gss_display_status (&min_stat,
124@@ -922,7 +930,7 @@
125 &msg_ctx,
126 &status_string);
127 if (!GSS_ERROR(maj_stat)) {
128- err_msg = ap_pstrcat(p, err_msg,
129+ err_msg = apr_pstrcat(p, err_msg,
130 " (", (char*) status_string.value, ")", NULL);
131 gss_release_buffer(&min_stat, &status_string);
132 }
133@@ -1135,15 +1143,15 @@
134 goto end;
135 }
136
137- input_token.length = ap_base64decode_len(auth_param) + 1;
138- input_token.value = ap_pcalloc(r->connection->pool, input_token.length);
139+ input_token.length = apr_base64_decode_len(auth_param) + 1;
140+ input_token.value = apr_pcalloc(r->connection->pool, input_token.length);
141 if (input_token.value == NULL) {
142 log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
143- "ap_pcalloc() failed (not enough memory)");
144+ "apr_pcalloc() failed (not enough memory)");
145 ret = HTTP_INTERNAL_SERVER_ERROR;
146 goto end;
147 }
148- input_token.length = ap_base64decode(input_token.value, auth_param);
149+ input_token.length = apr_base64_decode(input_token.value, auth_param);
150
151 accept_sec_token = (cmp_gss_type(&input_token, &spnego_oid) == 0) ?
152 gss_accept_sec_context_spnego : gss_accept_sec_context;
153@@ -1171,16 +1179,16 @@
154 char *token = NULL;
155 size_t len;
156
157- len = ap_base64encode_len(output_token.length) + 1;
158- token = ap_pcalloc(r->connection->pool, len + 1);
159+ len = apr_base64_encode_len(output_token.length) + 1;
160+ token = apr_pcalloc(r->connection->pool, len + 1);
161 if (token == NULL) {
162 log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
163- "ap_pcalloc() failed (not enough memory)");
164+ "apr_pcalloc() failed (not enough memory)");
165 ret = HTTP_INTERNAL_SERVER_ERROR;
166 gss_release_buffer(&minor_status2, &output_token);
167 goto end;
168 }
169- ap_base64encode(token, output_token.value, output_token.length);
170+ apr_base64_encode(token, output_token.value, output_token.length);
171 token[len] = '\0';
172 *negotiate_ret_value = token;
173 log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
174@@ -1224,7 +1232,7 @@
175 }
176
177 MK_AUTH_TYPE = "Negotiate";
178- MK_USER = ap_pstrdup(r->pool, output_token.value);
179+ MK_USER = apr_pstrdup(r->pool, output_token.value);
180
181 if (conf->krb_save_credentials && delegated_cred != GSS_C_NO_CREDENTIAL)
182 store_gss_creds(r, conf, (char *)output_token.value, delegated_cred);
183@@ -1285,12 +1293,12 @@
184 #ifdef KRB5
185 if (negotiate_ret_value != NULL && conf->krb_method_gssapi) {
186 negoauth_param = (*negotiate_ret_value == '\0') ? "Negotiate" :
187- ap_pstrcat(r->pool, "Negotiate ", negotiate_ret_value, NULL);
188- ap_table_add(r->err_headers_out, header_name, negoauth_param);
189+ apr_pstrcat(r->pool, "Negotiate ", negotiate_ret_value, NULL);
190+ apr_table_add(r->err_headers_out, header_name, negoauth_param);
191 }
192 if ((use_krb5pwd && conf->krb_method_k5pass) || conf->krb_delegate_basic) {
193- ap_table_add(r->err_headers_out, header_name,
194- ap_pstrcat(r->pool, "Basic realm=\"", auth_name, "\"", NULL));
195+ apr_table_add(r->err_headers_out, header_name,
196+ apr_pstrcat(r->pool, "Basic realm=\"", auth_name, "\"", NULL));
197 set_basic = 1;
198 }
199 #endif
200@@ -1298,8 +1306,8 @@
201 #ifdef KRB4
202 if (!set_basic &&
203 ((use_krb4 && conf->krb_method_k4pass) || conf->krb_delegate_basic))
204- ap_table_add(r->err_headers_out, header_name,
205- ap_pstrcat(r->pool, "Basic realm=\"", auth_name, "\"", NULL));
206+ apr_table_add(r->err_headers_out, header_name,
207+ apr_pstrcat(r->pool, "Basic realm=\"", auth_name, "\"", NULL));
208 #endif
209 }
210
This page took 0.074177 seconds and 4 git commands to generate.