From 365f757cec995caa109358da81d9b269f974c9b9 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Sun, 21 Dec 2008 08:43:21 +0000 Subject: new constant MAX_PRINCIPAL_SIZE: what it says on the tin define REALM_SZ based on maximum dns name when it's not; this needs to be split from the krb4 REALM_SZ and rethought in context of MAX_PRINCIPAL_SIZE remove prototype macro from Z_WaitForNotice. Need to come back and do more of that. --- h/internal.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'h') diff --git a/h/internal.h b/h/internal.h index ac07099..3782a12 100644 --- a/h/internal.h +++ b/h/internal.h @@ -20,12 +20,15 @@ #endif #ifndef HAVE_KRB4 -#define REALM_SZ MAXHOSTNAMELEN -#define INST_SZ 0 /* no instances w/o Kerberos */ -#define ANAME_SZ 9 /* size of a username + null */ #define CLOCK_SKEW 300 /* max time to cache packet ids */ #endif +#ifndef REALM_SZ /* XXX */ +#include +#define REALM_SZ NS_MAXDNAME +#endif +#define MAX_PRINCIPAL_SIZE 1024 + #define SERVER_SVC_FALLBACK htons((unsigned short) 2103) #define HM_SVC_FALLBACK htons((unsigned short) 2104) #define HM_SRV_SVC_FALLBACK htons((unsigned short) 2105) @@ -109,9 +112,9 @@ Code_t Z_SendFragmentedNotice __P((ZNotice_t *notice, int len, Z_AuthProc cert_func, Z_SendProc send_func)); Code_t Z_WaitForComplete __P((void)); -Code_t Z_WaitForNotice __P((ZNotice_t *notice, - int (*pred) __P((ZNotice_t *, void *)), void *arg, - int timeout)); +Code_t Z_WaitForNotice (ZNotice_t *notice, + int (*pred)(ZNotice_t *, void *), void *arg, + int timeout); Code_t Z_NewFormatHeader __P((ZNotice_t *, char *, int, int *, Z_AuthProc)); -- cgit v1.2.3