svn rev #3315: branches/krb5-appl-1-0/ bsd/ gssftp/ftp/ gssftp/ftpd/ libpty/ ...
ghudson@MIT.EDU
ghudson at MIT.EDU
Mon Jul 11 15:30:25 EDT 2011
Commit By: ghudson
Log Message:
Pull up r3306 from trunk.
------------------------------------------------------------------------
r3306 | hartmans | 2010-08-05 15:35:59 -0400 (Thu, 05 Aug 2010) | 8 lines
Portability fixes
HURD does not define MAXPATHNAMELEN nor MAXHOSTNAMELEN. After a long
discussion with the HURD maintainers they have convinced me this is
correct according to POSIX if no reasonable limit exists. So, assume
a value if one is not present.
Alpha Linux requires sys/ioctl.h to be included in a couple of files.
Changed Files:
U branches/krb5-appl-1-0/bsd/krlogin.c
U branches/krb5-appl-1-0/bsd/krlogind.c
U branches/krb5-appl-1-0/bsd/krshd.c
U branches/krb5-appl-1-0/bsd/login.c
U branches/krb5-appl-1-0/gssftp/ftp/ftp.c
U branches/krb5-appl-1-0/gssftp/ftp/ftp_var.h
U branches/krb5-appl-1-0/gssftp/ftpd/ftpd.c
U branches/krb5-appl-1-0/libpty/sane_hostname.c
U branches/krb5-appl-1-0/telnet/telnet/sys_bsd.c
U branches/krb5-appl-1-0/telnet/telnetd/defs.h
Modified: branches/krb5-appl-1-0/bsd/krlogin.c
===================================================================
--- branches/krb5-appl-1-0/bsd/krlogin.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/bsd/krlogin.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -139,6 +139,7 @@
#include <sys/ptyvar.h>
#endif
#endif
+#undef TIOCGLTC
#ifndef TIOCPKT_NOSTOP
/* These values are over-the-wire protocol, *not* local values */
Modified: branches/krb5-appl-1-0/bsd/krlogind.c
===================================================================
--- branches/krb5-appl-1-0/bsd/krlogind.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/bsd/krlogind.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -286,6 +286,10 @@
#define MAXDNAME 256 /*per the rfc*/
#endif
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
char lusername[UT_NAMESIZE+1];
char rusername[UT_NAMESIZE+1];
char *krusername = 0;
Modified: branches/krb5-appl-1-0/bsd/krshd.c
===================================================================
--- branches/krb5-appl-1-0/bsd/krshd.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/bsd/krshd.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -488,6 +488,11 @@
#define NCARGS 1024
#endif
+#if NCARGS == INT_MAX
+#undef NCARGS
+#define NCARGS 4096
+#endif
+
#define NMAX 16
int pid;
Modified: branches/krb5-appl-1-0/bsd/login.c
===================================================================
--- branches/krb5-appl-1-0/bsd/login.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/bsd/login.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -122,6 +122,14 @@
#define siglongjmp longjmp
#endif
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
#ifdef POSIX_SIGNALS
typedef struct sigaction handler;
#define handler_init(H,F) (sigemptyset(&(H).sa_mask), \
Modified: branches/krb5-appl-1-0/gssftp/ftp/ftp.c
===================================================================
--- branches/krb5-appl-1-0/gssftp/ftp/ftp.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/gssftp/ftp/ftp.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -150,6 +150,10 @@
#include "ftp_var.h"
#include "secure.h"
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
#ifdef GSSAPI
void user_gss_error (OM_uint32, OM_uint32, char *);
#endif
Modified: branches/krb5-appl-1-0/gssftp/ftp/ftp_var.h
===================================================================
--- branches/krb5-appl-1-0/gssftp/ftp/ftp_var.h 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/gssftp/ftp/ftp_var.h 2011-07-11 19:30:25 UTC (rev 3315)
@@ -70,6 +70,10 @@
#define extern
#endif
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
/*
* Options and other state info.
*/
Modified: branches/krb5-appl-1-0/gssftp/ftpd/ftpd.c
===================================================================
--- branches/krb5-appl-1-0/gssftp/ftpd/ftpd.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/gssftp/ftpd/ftpd.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -152,6 +152,14 @@
#include "ftpd_var.h"
#include "secure.h"
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
extern char *crypt();
extern char version[];
extern char *home; /* pointer to home directory for glob */
Modified: branches/krb5-appl-1-0/libpty/sane_hostname.c
===================================================================
--- branches/krb5-appl-1-0/libpty/sane_hostname.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/libpty/sane_hostname.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -27,6 +27,10 @@
#include "socket-utils.h"
#include "fake-addrinfo.h"
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
static void
downcase (char *s)
{
Modified: branches/krb5-appl-1-0/telnet/telnet/sys_bsd.c
===================================================================
--- branches/krb5-appl-1-0/telnet/telnet/sys_bsd.c 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/telnet/telnet/sys_bsd.c 2011-07-11 19:30:25 UTC (rev 3315)
@@ -44,6 +44,8 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
+#include <sys/ioctl.h>
+
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
Modified: branches/krb5-appl-1-0/telnet/telnetd/defs.h
===================================================================
--- branches/krb5-appl-1-0/telnet/telnetd/defs.h 2011-07-11 19:29:34 UTC (rev 3314)
+++ branches/krb5-appl-1-0/telnet/telnetd/defs.h 2011-07-11 19:30:25 UTC (rev 3315)
@@ -38,6 +38,7 @@
*/
#include <sys/types.h>
#include <sys/param.h>
+#include <sys/ioctl.h>
#ifndef BSD
# define BSD 43
More information about the Krb5-appl-commits
mailing list