Files
MSYS2-packages/heimdal/1.5.3-base64-avoid-name-clash.patch
Ray Donnelly 0e6f50189b heimdal: Rename base64_{en,de}code
.. to heimdal_base64_{en,de}code to avoid duplicate symbols
when we link pacman.
2016-01-13 07:09:05 +00:00

371 lines
13 KiB
Diff

diff -urN heimdal-1.5.3.orig/appl/ftp/ftp/gssapi.c heimdal-1.5.3/appl/ftp/ftp/gssapi.c
--- heimdal-1.5.3.orig/appl/ftp/ftp/gssapi.c 2016-01-12 20:03:58.106459900 +0000
+++ heimdal-1.5.3/appl/ftp/ftp/gssapi.c 2016-01-12 21:09:46.569454800 +0000
@@ -212,7 +212,7 @@
free(bindings);
if(output_token.length) {
- if(base64_encode(output_token.value, output_token.length, &p) < 0) {
+ if(heimdal_base64_encode(output_token.value, output_token.length, &p) < 0) {
reply(535, "Out of memory base64-encoding.");
return -1;
}
@@ -420,7 +420,7 @@
input.length = 0;
}
if (output_token.length != 0) {
- base64_encode(output_token.value, output_token.length, &p);
+ heimdal_base64_encode(output_token.value, output_token.length, &p);
gss_release_buffer(&min_stat, &output_token);
n = command("ADAT %s", p);
free(p);
@@ -443,7 +443,7 @@
} else {
p+=5;
input.value = malloc(strlen(p));
- input.length = base64_decode(p, input.value);
+ input.length = heimdal_base64_decode(p, input.value);
}
} else {
if(code != 235) {
diff -urN heimdal-1.5.3.orig/appl/ftp/ftp/security.c heimdal-1.5.3/appl/ftp/ftp/security.c
--- heimdal-1.5.3.orig/appl/ftp/ftp/security.c 2016-01-12 20:03:58.178459900 +0000
+++ heimdal-1.5.3/appl/ftp/ftp/security.c 2016-01-12 21:09:46.510454800 +0000
@@ -348,7 +348,7 @@
int return_code;
buf = malloc(strlen(s));
- len = base64_decode(s + 4, buf); /* XXX */
+ len = heimdal_base64_decode(s + 4, buf); /* XXX */
len = (*mech->decode)(app_data, buf, len, level);
if(len < 0)
@@ -386,7 +386,7 @@
printf("Failed to encode command.\n");
return -1;
}
- if(base64_encode(enc, len, &buf) < 0){
+ if(heimdal_base64_encode(enc, len, &buf) < 0){
free(enc);
printf("Out of memory base64-encoding.\n");
return -1;
@@ -469,7 +469,7 @@
if(mech && !sec_complete) {
void *buf = malloc(strlen(auth_data));
size_t len;
- len = base64_decode(auth_data, buf);
+ len = heimdal_base64_decode(auth_data, buf);
(*mech->adat)(app_data, buf, len);
free(buf);
} else
@@ -554,7 +554,7 @@
reply(501, "Failed to allocate %lu", (unsigned long)buf_size);
return;
}
- len = base64_decode(msg, buf);
+ len = heimdal_base64_decode(msg, buf);
command_prot = level;
if(len == (size_t)-1) {
free(buf);
diff -urN heimdal-1.5.3.orig/appl/ftp/ftpd/gssapi.c heimdal-1.5.3/appl/ftp/ftpd/gssapi.c
--- heimdal-1.5.3.orig/appl/ftp/ftpd/gssapi.c 2016-01-12 20:03:58.201459900 +0000
+++ heimdal-1.5.3/appl/ftp/ftpd/gssapi.c 2016-01-12 21:09:46.521454800 +0000
@@ -212,7 +212,7 @@
free(bindings);
if(output_token.length) {
- if(base64_encode(output_token.value, output_token.length, &p) < 0) {
+ if(heimdal_base64_encode(output_token.value, output_token.length, &p) < 0) {
reply(535, "Out of memory base64-encoding.");
return -1;
}
@@ -420,7 +420,7 @@
input.length = 0;
}
if (output_token.length != 0) {
- base64_encode(output_token.value, output_token.length, &p);
+ heimdal_base64_encode(output_token.value, output_token.length, &p);
gss_release_buffer(&min_stat, &output_token);
n = command("ADAT %s", p);
free(p);
@@ -443,7 +443,7 @@
} else {
p+=5;
input.value = malloc(strlen(p));
- input.length = base64_decode(p, input.value);
+ input.length = heimdal_base64_decode(p, input.value);
}
} else {
if(code != 235) {
diff -urN heimdal-1.5.3.orig/appl/ftp/ftpd/security.c heimdal-1.5.3/appl/ftp/ftpd/security.c
--- heimdal-1.5.3.orig/appl/ftp/ftpd/security.c 2016-01-12 20:03:58.219459900 +0000
+++ heimdal-1.5.3/appl/ftp/ftpd/security.c 2016-01-12 21:09:46.606454800 +0000
@@ -348,7 +348,7 @@
int return_code;
buf = malloc(strlen(s));
- len = base64_decode(s + 4, buf); /* XXX */
+ len = heimdal_base64_decode(s + 4, buf); /* XXX */
len = (*mech->decode)(app_data, buf, len, level);
if(len < 0)
@@ -386,7 +386,7 @@
printf("Failed to encode command.\n");
return -1;
}
- if(base64_encode(enc, len, &buf) < 0){
+ if(heimdal_base64_encode(enc, len, &buf) < 0){
free(enc);
printf("Out of memory base64-encoding.\n");
return -1;
@@ -469,7 +469,7 @@
if(mech && !sec_complete) {
void *buf = malloc(strlen(auth_data));
size_t len;
- len = base64_decode(auth_data, buf);
+ len = heimdal_base64_decode(auth_data, buf);
(*mech->adat)(app_data, buf, len);
free(buf);
} else
@@ -554,7 +554,7 @@
reply(501, "Failed to allocate %lu", (unsigned long)buf_size);
return;
}
- len = base64_decode(msg, buf);
+ len = heimdal_base64_decode(msg, buf);
command_prot = level;
if(len == (size_t)-1) {
free(buf);
diff -urN heimdal-1.5.3.orig/appl/popper/pop_auth.c heimdal-1.5.3/appl/popper/pop_auth.c
--- heimdal-1.5.3.orig/appl/popper/pop_auth.c 2016-01-12 20:03:59.799459900 +0000
+++ heimdal-1.5.3/appl/popper/pop_auth.c 2016-01-12 21:09:46.624454800 +0000
@@ -100,7 +100,7 @@
pop_auth_set_error("out of memory");
return POP_AUTH_FAILURE;
}
- input_length = base64_decode(line, input);
+ input_length = heimdal_base64_decode(line, input);
if(input_length == (size_t)-1) {
pop_auth_set_error("base64 decode error");
return POP_AUTH_FAILURE;
@@ -110,7 +110,7 @@
status = (*m->loop)(p, state, input, input_length, &output, &output_length);
if(output_length > 0) {
char *s;
- base64_encode(output, output_length, &s);
+ heimdal_base64_encode(output, output_length, &s);
fprintf(p->output, "+ %s\r\n", s);
fflush(p->output);
free(output);
diff -urN heimdal-1.5.3.orig/appl/test/http_client.c heimdal-1.5.3/appl/test/http_client.c
--- heimdal-1.5.3.orig/appl/test/http_client.c 2016-01-12 20:03:59.881459900 +0000
+++ heimdal-1.5.3/appl/test/http_client.c 2016-01-12 21:09:46.598454800 +0000
@@ -388,7 +388,7 @@
if (len == 0)
errx(1, "invalid Negotiate token");
input_token.value = emalloc(len);
- len = base64_decode(&h[i], input_token.value);
+ len = heimdal_base64_decode(&h[i], input_token.value);
if (len < 0)
errx(1, "invalid base64 Negotiate token %s", &h[i]);
input_token.length = len;
@@ -471,7 +471,7 @@
if (output_token.length) {
char *neg_token;
- base64_encode(output_token.value,
+ heimdal_base64_encode(output_token.value,
output_token.length,
&neg_token);
diff -urN heimdal-1.5.3.orig/kdc/connect.c heimdal-1.5.3/kdc/connect.c
--- heimdal-1.5.3.orig/kdc/connect.c 2016-01-12 20:04:00.162459900 +0000
+++ heimdal-1.5.3/kdc/connect.c 2016-01-12 21:09:25.507454800 +0000
@@ -695,7 +695,7 @@
free(data);
return -1;
}
- len = base64_decode(t, data);
+ len = heimdal_base64_decode(t, data);
if(len <= 0){
const char *msg =
" 404 Not found\r\n"
diff -urN heimdal-1.5.3.orig/kuser/kdigest.c heimdal-1.5.3/kuser/kdigest.c
--- heimdal-1.5.3.orig/kuser/kdigest.c 2016-01-12 20:03:57.883459900 +0000
+++ heimdal-1.5.3/kuser/kdigest.c 2016-01-12 21:09:46.531454800 +0000
@@ -485,7 +485,7 @@
*
*/
- base64_encode(data.data, data.length, &s);
+ heimdal_base64_encode(data.data, data.length, &s);
free(data.data);
printf("type2=%s\n", s);
free(s);
@@ -498,7 +498,7 @@
if (ret)
krb5_err(context, 1, ret, "krb5_ntlm_init_get_opaque");
- base64_encode(opaque.data, opaque.length, &s);
+ heimdal_base64_encode(opaque.data, opaque.length, &s);
krb5_data_free(&opaque);
printf("opaque=%s\n", s);
free(s);
diff -urN heimdal-1.5.3.orig/lib/hdb/test_hdbkeys.c heimdal-1.5.3/lib/hdb/test_hdbkeys.c
--- heimdal-1.5.3.orig/lib/hdb/test_hdbkeys.c 2016-01-12 20:04:04.291459900 +0000
+++ heimdal-1.5.3/lib/hdb/test_hdbkeys.c 2016-01-12 21:09:46.577454800 +0000
@@ -108,9 +108,9 @@
krb5_free_context(context);
- ret = base64_encode(data, length, &str);
+ ret = heimdal_base64_encode(data, length, &str);
if (ret < 0)
- errx(1, "base64_encode");
+ errx(1, "heimdal_base64_encode");
printf("keyset: %s\n", str);
diff -urN heimdal-1.5.3.orig/lib/hx509/file.c heimdal-1.5.3/lib/hx509/file.c
--- heimdal-1.5.3.orig/lib/hx509/file.c 2016-01-12 20:04:04.713459900 +0000
+++ heimdal-1.5.3/lib/hx509/file.c 2016-01-12 21:09:46.631454800 +0000
@@ -98,7 +98,7 @@
if (length > ENCODE_LINE_LENGTH)
length = ENCODE_LINE_LENGTH;
- l = base64_encode(p, length, &line);
+ l = heimdal_base64_encode(p, length, &line);
if (l < 0) {
hx509_set_error_string(context, 0, ENOMEM,
"malloc - out of memory");
@@ -255,7 +255,7 @@
}
p = emalloc(i);
- i = base64_decode(buf, p);
+ i = heimdal_base64_decode(buf, p);
if (i < 0) {
free(p);
goto out;
diff -urN heimdal-1.5.3.orig/lib/kadm5/ad.c heimdal-1.5.3/lib/kadm5/ad.c
--- heimdal-1.5.3.orig/lib/kadm5/ad.c 2016-01-12 20:04:04.915459900 +0000
+++ heimdal-1.5.3/lib/kadm5/ad.c 2016-01-12 21:09:46.554454800 +0000
@@ -1248,7 +1248,7 @@
{
char p[64];
krb5_generate_random_block(p, sizeof(p));
- plen = base64_encode(p, sizeof(p), &password);
+ plen = heimdal_base64_encode(p, sizeof(p), &password);
if (plen < 0)
return ENOMEM;
}
diff -urN heimdal-1.5.3.orig/lib/krb5/send_to_kdc.c heimdal-1.5.3/lib/krb5/send_to_kdc.c
--- heimdal-1.5.3.orig/lib/krb5/send_to_kdc.c 2016-01-12 20:04:02.126459900 +0000
+++ heimdal-1.5.3/lib/krb5/send_to_kdc.c 2016-01-12 21:09:46.542454800 +0000
@@ -241,7 +241,7 @@
char *request = NULL;
char *str;
int ret;
- int len = base64_encode(req->data, req->length, &str);
+ int len = heimdal_base64_encode(req->data, req->length, &str);
if(len < 0)
return -1;
diff -urN heimdal-1.5.3.orig/lib/roken/base64.c heimdal-1.5.3/lib/roken/base64.c
--- heimdal-1.5.3.orig/lib/roken/base64.c 2016-01-12 20:04:05.790459900 +0000
+++ heimdal-1.5.3/lib/roken/base64.c 2016-01-12 21:09:46.590454800 +0000
@@ -52,7 +52,7 @@
}
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-base64_encode(const void *data, int size, char **str)
+heimdal_base64_encode(const void *data, int size, char **str)
{
char *s, *p;
int i;
@@ -121,7 +121,7 @@
}
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-base64_decode(const char *str, void *data)
+heimdal_base64_decode(const char *str, void *data)
{
const char *p;
unsigned char *q;
diff -urN heimdal-1.5.3.orig/lib/roken/base64.h heimdal-1.5.3/lib/roken/base64.h
--- heimdal-1.5.3.orig/lib/roken/base64.h 2016-01-12 20:04:05.502459900 +0000
+++ heimdal-1.5.3/lib/roken/base64.h 2016-01-12 21:09:46.561454800 +0000
@@ -47,9 +47,9 @@
#endif
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-base64_encode(const void *, int, char **);
+heimdal_base64_encode(const void *, int, char **);
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-base64_decode(const char *, void *);
+heimdal_base64_decode(const char *, void *);
#endif
diff -urN heimdal-1.5.3.orig/lib/roken/base64-test.c heimdal-1.5.3/lib/roken/base64-test.c
--- heimdal-1.5.3.orig/lib/roken/base64-test.c 2016-01-12 20:04:05.499459900 +0000
+++ heimdal-1.5.3/lib/roken/base64-test.c 2016-01-12 21:09:46.583454800 +0000
@@ -58,7 +58,7 @@
for(t = tests; t->data; t++) {
char *str;
int len;
- len = base64_encode(t->data, t->len, &str);
+ len = heimdal_base64_encode(t->data, t->len, &str);
if(strcmp(str, t->result) != 0) {
fprintf(stderr, "failed test %d: %s != %s\n", numtest,
str, t->result);
@@ -66,7 +66,7 @@
}
free(str);
str = strdup(t->result);
- len = base64_decode(t->result, str);
+ len = heimdal_base64_decode(t->result, str);
if(len != t->len) {
fprintf(stderr, "failed test %d: len %lu != %lu\n", numtest,
(unsigned long)len, (unsigned long)t->len);
@@ -81,12 +81,12 @@
{
char str[32];
- if(base64_decode("M=M=", str) != -1) {
+ if(heimdal_base64_decode("M=M=", str) != -1) {
fprintf(stderr, "failed test %d: successful decode of `M=M='\n",
numtest++);
numerr++;
}
- if(base64_decode("MQ===", str) != -1) {
+ if(heimdal_base64_decode("MQ===", str) != -1) {
fprintf(stderr, "failed test %d: successful decode of `MQ==='\n",
numtest++);
numerr++;
diff -urN heimdal-1.5.3.orig/lib/roken/version-script.map heimdal-1.5.3/lib/roken/version-script.map
--- heimdal-1.5.3.orig/lib/roken/version-script.map 2016-01-12 20:04:06.009459900 +0000
+++ heimdal-1.5.3/lib/roken/version-script.map 2016-01-12 21:09:46.613454800 +0000
@@ -2,8 +2,8 @@
global:
arg_printusage;
arg_printusage_i18n;
- base64_decode;
- base64_encode;
+ heimdal_base64_decode;
+ heimdal_base64_encode;
cgetcap;
cgetclose;
cgetmatch;
--- heimdal-1.5.3/lib/ipc/server.c.orig 2016-01-12 23:46:14.918870500 +0000
+++ heimdal-1.5.3/lib/ipc/server.c 2016-01-12 23:46:35.312506600 +0000
@@ -822,7 +822,7 @@
free(data);
return NULL;
}
- len = base64_decode(t, data);
+ len = heimdal_base64_decode(t, data);
if(len <= 0){
const char *msg =
" 404 Not found\r\n"