Package: krb5 / 1.12.1+dfsg-19+deb8u4

debian-local/0002-Debian-HURD-compatibility.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
From 8cc93ae31ee3fbf96f7911a8b41d05d96c9ea228 Mon Sep 17 00:00:00 2001
From: Sam Hartman <hartmans@debian.org>
Date: Mon, 26 Dec 2011 18:11:42 -0500
Subject: Debian: HURD compatibility

HURD has no MAXPATHLEN or MAXHOSTLEN.

Patch-Category: debian-local
---
 src/include/k5-int.h                        | 3 +++
 src/kadmin/ktutil/ktutil_funcs.c            | 4 ++++
 src/lib/gssapi/spnego/spnego_mech.c         | 3 +++
 src/lib/krb5/os/sn2princ.c                  | 4 ++++
 src/plugins/kdb/db2/libdb2/include/db-int.h | 4 ++++
 src/tests/resolve/resolve.c                 | 4 ++++
 6 files changed, 22 insertions(+)

diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 623f09e..ea3b7e3 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -549,6 +549,9 @@ extern char *strdup (const char *);
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>                  /* MAXPATHLEN */
 #endif
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
 
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>                   /* prototypes for file-related
diff --git a/src/kadmin/ktutil/ktutil_funcs.c b/src/kadmin/ktutil/ktutil_funcs.c
index 20a348c..b8b61ce 100644
--- a/src/kadmin/ktutil/ktutil_funcs.c
+++ b/src/kadmin/ktutil/ktutil_funcs.c
@@ -33,6 +33,10 @@
 #include <string.h>
 #include <ctype.h>
 
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
 /*
  * Free a kt_list
  */
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c
index 167e4c1..b084e51 100644
--- a/src/lib/gssapi/spnego/spnego_mech.c
+++ b/src/lib/gssapi/spnego/spnego_mech.c
@@ -69,6 +69,9 @@
 #include	"gssapiP_spnego.h"
 #include	<gssapi_err_generic.h>
 
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 64
+#endif
 
 #undef g_token_size
 #undef g_verify_token_header
diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c
index 86a0762..b3a1e98 100644
--- a/src/lib/krb5/os/sn2princ.c
+++ b/src/lib/krb5/os/sn2princ.c
@@ -60,6 +60,10 @@ maybe_use_reverse_dns (krb5_context context, int defalt)
 }
 
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
 krb5_error_code KRB5_CALLCONV
 krb5_sname_to_principal(krb5_context context, const char *hostname, const char *sname, krb5_int32 type, krb5_principal *ret_princ)
 {
diff --git a/src/plugins/kdb/db2/libdb2/include/db-int.h b/src/plugins/kdb/db2/libdb2/include/db-int.h
index 8329ee3..6efa363 100644
--- a/src/plugins/kdb/db2/libdb2/include/db-int.h
+++ b/src/plugins/kdb/db2/libdb2/include/db-int.h
@@ -280,4 +280,8 @@ void	 __dbpanic __P((DB *dbp));
 #ifndef O_BINARY
 #define O_BINARY	0		/* Needed for Win32 compiles */
 #endif
+
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
 #endif /* _DB_INT_H_ */
diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c
index 7339d21..38f7253 100644
--- a/src/tests/resolve/resolve.c
+++ b/src/tests/resolve/resolve.c
@@ -73,6 +73,10 @@ char *strchr();
 #include <netinet/in.h>
 #include <netdb.h>
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
 int
 main(argc, argv)
     int argc;