tags 113317 +patch
thanks

Hi,

here is a more conservative patch for Debian.  The
hostname[MAXHOSTNAMELEN] -> hostname[MaxHostNameLen] changes are
probably alright to get integrated upstream, whereas the "#define
MAXPATHLEN 4096" are a hack which should stay in the Debian package for
now, in case somebody wants to fix those properly later on.

This patch makes the non-AFS related build failures on hurd-i386 go
away, I will send a patch for the AFS stuff in due short.

cheers,

Michael

-- 
Michael Banck
Debian Developer
[EMAIL PROTECTED]
http://www.advogato.org/person/mbanck/diary.html
diff -Naur heimdal-0.7.1/appl/kf/kf_locl.h heimdal-0.6.3.new/appl/kf/kf_locl.h
--- heimdal-0.7.1/appl/kf/kf_locl.h     2002-09-04 22:29:04.000000000 +0200
+++ heimdal-0.7.1.new/appl/kf/kf_locl.h 2005-11-01 23:37:15.000000000 +0100
@@ -79,3 +79,7 @@
 #define KF_PORT_NAME           "kf"
 #define KF_PORT_NUM            2110
 #define KF_VERSION_1           "KFWDV0.1"
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
diff -Naur heimdal-0.7.1/appl/kf/kfd.c heimdal-0.6.3.new/appl/kf/kfd.c
--- heimdal-0.7.1/appl/kf/kfd.c 2003-04-16 17:40:24.000000000 +0200
+++ heimdal-0.7.1.new/appl/kf/kfd.c     2005-11-01 23:24:17.000000000 +0100
@@ -128,7 +128,7 @@
     krb5_ticket *ticket;
     char *name;
     char ret_string[10];
-    char hostname[MAXHOSTNAMELEN];
+    char hostname[MaxHostNameLen];
     krb5_data data;
     krb5_data remotename;
     krb5_data tk_file;
diff -Naur heimdal-0.7.1/appl/kx/kx.h heimdal-0.6.3.new/appl/kx/kx.h
--- heimdal-0.7.1/appl/kx/kx.h  2003-04-16 18:45:43.000000000 +0200
+++ heimdal-0.7.1.new/appl/kx/kx.h      2005-11-01 23:41:38.000000000 +0100
@@ -107,6 +107,10 @@
 #include <sys/stropts.h>
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 /* defined by aix's sys/stream.h and again by arpa/nameser.h */
 
 #undef NOERROR
diff -Naur heimdal-0.7.1/appl/login/login_access.c 
heimdal-0.6.3.new/appl/login/login_access.c
--- heimdal-0.7.1/appl/login/login_access.c     2001-06-04 16:09:45.000000000 
+0200
+++ heimdal-0.7.1.new/appl/login/login_access.c 2005-11-01 23:24:23.000000000 
+0100
@@ -163,11 +163,11 @@
 
 static char *myhostname(void)
 {
-    static char name[MAXHOSTNAMELEN + 1] = "";
+    static char name[MaxHostNameLen + 1] = "";
 
     if (name[0] == 0) {
        gethostname(name, sizeof(name));
-       name[MAXHOSTNAMELEN] = 0;
+       name[MaxHostNameLen] = 0;
     }
     return (name);
 }
diff -Naur heimdal-0.7.1/appl/login/login_locl.h 
heimdal-0.6.3.new/appl/login/login_locl.h
--- heimdal-0.7.1/appl/login/login_locl.h       2002-08-12 17:09:15.000000000 
+0200
+++ heimdal-0.7.1.new/appl/login/login_locl.h   2005-11-01 23:37:58.000000000 
+0100
@@ -145,6 +145,10 @@
 #define _PATH_DEFPATH "/usr/bin:/bin"
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 struct spwd;
 
 extern char **env;
diff -Naur heimdal-0.7.1/appl/popper/popper.h 
heimdal-0.6.3.new/appl/popper/popper.h
--- heimdal-0.7.1/appl/popper/popper.h  2002-07-04 15:56:12.000000000 +0200
+++ heimdal-0.7.1.new/appl/popper/popper.h      2005-11-01 23:41:18.000000000 
+0100
@@ -154,6 +154,10 @@
 #define POP_MAILDIR    "/usr/spool/mail"
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 #define POP_DROP        POP_MAILDIR "/.%s.pop"
        /* POP_TMPSIZE needs to be big enough to hold the string
         * defined by POP_TMPDROP.  POP_DROP and POP_TMPDROP
--- heimdal-0.7.1/appl/rcp/rcp_locl.h.orig      2005-11-02 00:54:30.000000000 
+0100
+++ heimdal-0.7.1/appl/rcp/rcp_locl.h   2005-11-02 00:54:34.000000000 +0100
@@ -65,3 +65,7 @@
 #endif
 #undef _PATH_RSH
 #define        _PATH_RSH       BINDIR "/rsh"
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
diff -Naur heimdal-0.7.1/appl/rsh/rsh_locl.h 
heimdal-0.6.3.new/appl/rsh/rsh_locl.h
--- heimdal-0.7.1/appl/rsh/rsh_locl.h   2003-04-16 22:05:39.000000000 +0200
+++ heimdal-0.7.1.new/appl/rsh/rsh_locl.h       2005-11-01 23:39:00.000000000 
+0100
@@ -163,3 +163,7 @@
 #define do_write(F, B, L, I) write((F), (B), (L))
 #define do_read(F, B, L, I) read((F), (B), (L))
 #endif
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
diff -Naur heimdal-0.7.1/appl/test/tcp_server.c 
heimdal-0.6.3.new/appl/test/tcp_server.c
--- heimdal-0.7.1/appl/test/tcp_server.c        1999-12-16 11:31:08.000000000 
+0100
+++ heimdal-0.7.1.new/appl/test/tcp_server.c    2005-11-01 23:24:26.000000000 
+0100
@@ -44,7 +44,7 @@
     krb5_principal server;
     krb5_ticket *ticket;
     char *name;
-    char hostname[MAXHOSTNAMELEN];
+    char hostname[MaxHostNameLen];
     krb5_data packet;
     krb5_data data;
     u_int32_t len, net_len;
diff -Naur heimdal-0.7.1/lib/gssapi/gssapi_locl.h 
heimdal-0.6.3.new/lib/gssapi/gssapi_locl.h
--- heimdal-0.7.1/lib/gssapi/gssapi_locl.h      2003-09-19 00:01:52.000000000 
+0200
+++ heimdal-0.7.1.new/lib/gssapi/gssapi_locl.h  2005-11-01 23:42:21.000000000 
+0100
@@ -46,6 +46,10 @@
 
 #include "arcfour.h"
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
 extern krb5_context gssapi_krb5_context;
 
 extern krb5_keytab gssapi_krb5_keytab;
diff -Naur heimdal-0.7.1/lib/gssapi/import_name.c 
heimdal-0.6.3.new/lib/gssapi/import_name.c
--- heimdal-0.7.1/lib/gssapi/import_name.c      2003-03-16 18:33:31.000000000 
+0100
+++ heimdal-0.7.1.new/lib/gssapi/import_name.c  2005-11-01 23:24:36.000000000 
+0100
@@ -90,7 +90,7 @@
     char *tmp;
     char *p;
     char *host;
-    char local_hostname[MAXHOSTNAMELEN];
+    char local_hostname[MaxHostNameLen];
 
     *output_name = NULL;
 
diff -Naur heimdal-0.7.1/lib/kdfs/k5dfspag.c 
heimdal-0.6.3.new/lib/kdfs/k5dfspag.c
--- heimdal-0.7.1/lib/kdfs/k5dfspag.c   2002-08-12 17:11:58.000000000 +0200
+++ heimdal-0.7.1.new/lib/kdfs/k5dfspag.c       2005-11-01 23:44:07.000000000 
+0100
@@ -78,6 +78,9 @@
 #define WAIT_USES_INT
 typedef krb5_sigtype sigtype;
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
 
 /* 
  * Need some syscall numbers based on different systems. 
diff -Naur heimdal-0.7.1/lib/krb5/get_addrs.c 
heimdal-0.6.3.new/lib/krb5/get_addrs.c
--- heimdal-0.7.1/lib/krb5/get_addrs.c  2003-01-25 16:19:49.000000000 +0100
+++ heimdal-0.7.1.new/lib/krb5/get_addrs.c      2005-11-01 23:24:39.000000000 
+0100
@@ -49,7 +49,7 @@
 gethostname_fallback (krb5_context context, krb5_addresses *res)
 {
     krb5_error_code ret;
-    char hostname[MAXHOSTNAMELEN];
+    char hostname[MaxHostNameLen];
     struct hostent *hostent;
 
     if (gethostname (hostname, sizeof(hostname))) {
diff -Naur heimdal-0.7.1/lib/krb5/get_host_realm.c 
heimdal-0.6.3.new/lib/krb5/get_host_realm.c
--- heimdal-0.7.1/lib/krb5/get_host_realm.c     2002-08-28 15:36:57.000000000 
+0200
+++ heimdal-0.7.1.new/lib/krb5/get_host_realm.c 2005-11-01 23:24:44.000000000 
+0100
@@ -95,7 +95,7 @@
               krb5_realm **realms)
 {
     static char *default_labels[] = { "_kerberos", NULL };
-    char dom[MAXHOSTNAMELEN];
+    char dom[MaxHostNameLen];
     struct dns_reply *r;
     char **labels;
     int i, ret;
@@ -208,7 +208,7 @@
                    const char *host,
                    krb5_realm **realms)
 {
-    char hostname[MAXHOSTNAMELEN];
+    char hostname[MaxHostNameLen];
 
     if (host == NULL) {
        if (gethostname (hostname, sizeof(hostname)))
diff -Naur heimdal-0.7.1/lib/krb5/krbhst-test.c 
heimdal-0.6.3.new/lib/krb5/krbhst-test.c
--- heimdal-0.7.1/lib/krb5/krbhst-test.c        2002-08-23 05:43:18.000000000 
+0200
+++ heimdal-0.7.1.new/lib/krb5/krbhst-test.c    2005-11-01 23:24:49.000000000 
+0100
@@ -87,7 +87,7 @@
     krb5_init_context (&context);
     for(i = 0; i < argc; i++) {
        krb5_krbhst_handle handle;
-       char host[MAXHOSTNAMELEN];
+       char host[MaxHostNameLen];
 
        for (j = 0; j < sizeof(types)/sizeof(*types); ++j) {
            printf ("%s for %s:\n", type_str[j], argv[i]);
diff -Naur heimdal-0.7.1/lib/krb5/krbhst.c heimdal-0.6.3.new/lib/krb5/krbhst.c
--- heimdal-0.7.1/lib/krb5/krbhst.c     2003-04-22 17:00:38.000000000 +0200
+++ heimdal-0.7.1.new/lib/krb5/krbhst.c 2005-11-01 23:24:52.000000000 +0100
@@ -725,7 +725,7 @@
     krb5_error_code ret;
     int nhost = 0;
     krb5_krbhst_handle handle;
-    char host[MAXHOSTNAMELEN];
+    char host[MaxHostNameLen];
     krb5_krbhst_info *hostinfo;
 
     ret = krb5_krbhst_init(context, realm, type, &handle);
diff -Naur heimdal-0.7.1/lib/krb5/principal.c 
heimdal-0.6.3.new/lib/krb5/principal.c
--- heimdal-0.7.1/lib/krb5/principal.c  2003-08-15 16:30:07.000000000 +0200
+++ heimdal-0.7.1.new/lib/krb5/principal.c      2005-11-01 23:25:04.000000000 
+0100
@@ -698,8 +698,8 @@
     const char *p;
     krb5_error_code ret;
     krb5_principal pr;
-    char host[MAXHOSTNAMELEN];
-    char local_hostname[MAXHOSTNAMELEN];
+    char host[MaxHostNameLen];
+    char local_hostname[MaxHostNameLen];
 
     /* do the following: if the name is found in the
        `v4_name_convert:host' part, is is assumed to be a `host' type
@@ -1051,7 +1051,7 @@
                         krb5_principal *ret_princ)
 {
     krb5_error_code ret;
-    char localhost[MAXHOSTNAMELEN];
+    char localhost[MaxHostNameLen];
     char **realms, *host = NULL;
        
     if(type != KRB5_NT_SRV_HST && type != KRB5_NT_UNKNOWN) {
diff -Naur heimdal-0.7.1/lib/krb5/verify_init.c 
heimdal-0.6.3.new/lib/krb5/verify_init.c
--- heimdal-0.7.1/lib/krb5/verify_init.c        2002-08-20 16:47:59.000000000 
+0200
+++ heimdal-0.7.1.new/lib/krb5/verify_init.c    2005-11-01 23:25:11.000000000 
+0100
@@ -90,7 +90,7 @@
     memset (&entry, 0, sizeof(entry));
 
     if (ap_req_server == NULL) {
-       char local_hostname[MAXHOSTNAMELEN];
+       char local_hostname[MaxHostNameLen];
 
        if (gethostname (local_hostname, sizeof(local_hostname)) < 0) {
            ret = errno;
diff -Naur heimdal-0.7.1/lib/roken/getaddrinfo_hostspec.c 
heimdal-0.6.3.new/lib/roken/getaddrinfo_hostspec.c
--- heimdal-0.7.1/lib/roken/getaddrinfo_hostspec.c      2000-07-15 
14:50:32.000000000 +0200
+++ heimdal-0.7.1.new/lib/roken/getaddrinfo_hostspec.c  2005-11-01 
23:25:20.000000000 +0100
@@ -48,7 +48,7 @@
 {
     const char *p;
     char portstr[NI_MAXSERV];
-    char host[MAXHOSTNAMELEN];
+    char host[MaxHostNameLen];
     struct addrinfo hints;
     int hostspec_len;
 
--- heimdal-0.7.1/lib/sl/slc-gram.y.orig        2005-11-02 23:51:51.000000000 
+0100
+++ heimdal-0.7.1/lib/sl/slc-gram.y     2005-11-02 23:52:07.000000000 +0100
@@ -46,6 +46,10 @@
 #include <vers.h>
 #include <roken.h>
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 #include "slc.h"
 extern FILE *yyin;
 extern struct assignment *a;

Reply via email to