Package: krb5
Version: 1.10+dfsg~beta1-2
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

The tiny patch inlined below fixes the build of krb5 for GNU/Hurd, by
defining MAXHOSTNAMELEN also in function spnego_mech.c.

For this package there is not much idea to replace the MAXHOSTNAMELEN
and MAXPATHLEN definitions by using dynamic memory allocation of
strings, it is too cluttered. 

Definitions of MAXPATHLEN are found at:

(src/include/win-mac.h:#define MAXHOSTNAMELEN  512)

src/clients/ksu/main.c:#define MAXHOSTNAMELEN 64
src/lib/kadm5/logger.c:#define MAXHOSTNAMELEN  256
src/tests/resolve/resolve.c:# define MAXHOSTNAMELEN 256
build/include/gssrpc/types.h:#define        MAXHOSTNAMELEN  64
src/appl/simple/client/sim_client.c:#define MAXHOSTNAMELEN 64
src/appl/simple/server/sim_server.c:#define MAXHOSTNAMELEN 64
src/lib/gssapi/spnego/spnego_mech.c:#define MAXHOSTNAMELEN 64 (this
patch)
src/lib/krb5/os/def_realm.c:#define MAXHOSTNAMELEN 64

Furthermore we have the following definitions of MAXPATHLEN:
src/include/k5-int.h:# define MAXPATHLEN 4096
src/lib/krb5/os/kuserok.c:# define MAXPATHLEN 4096
src/kadmin/ktutil/ktutil_funcs.c:# define MAXPATHLEN 4096
src/clients/ksu/ksu.h:# define MAXPATHLEN 4096

and a few definitions for windows/mac, using MAXPATHLEN, _MAX_PATH and
PATH_MAX...

--- a/src/lib/gssapi/spnego/spnego_mech.c       2012-01-13
22:38:44.000000000 +0100
+++ b/src/lib/gssapi/spnego/spnego_mech.c       2012-01-23
10:36:53.000000000 +0100
@@ -1106,6 +1106,9 @@
 
 #define HOST_PREFIX    "host@"
 #define HOST_PREFIX_LEN        (sizeof(HOST_PREFIX) - 1)
+#ifndef MAXHOSTNEMELEN
+#define MAXHOSTNAMELEN 64
+#endif
 
 static int
 make_NegHints(OM_uint32 *minor_status,

This patch should preferably be Debian specific and not sent upstream,
maybe added to the already existing patch:
0004-Debian-HURD-compatibility.patch

Here I've used the Linux size of MAXHOSTNAMELEN of 64, but it seems that
there are other sizes used elsewhere, see above.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to