[Midnightbsd-cvs] src [7186] trunk: syncup remaining fixes

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Jul 28 07:07:31 EDT 2015


Revision: 7186
          http://svnweb.midnightbsd.org/src/?rev=7186
Author:   laffer1
Date:     2015-07-28 07:07:30 -0400 (Tue, 28 Jul 2015)
Log Message:
-----------
syncup remaining fixes

Modified Paths:
--------------
    trunk/crypto/heimdal/appl/Makefile.am
    trunk/crypto/heimdal/appl/ftp/Makefile.am
    trunk/crypto/heimdal/appl/ftp/common/Makefile.am
    trunk/crypto/heimdal/appl/ftp/common/Makefile.in
    trunk/crypto/heimdal/appl/rcp/extern.h
    trunk/crypto/heimdal/appl/rcp/util.c
    trunk/crypto/heimdal/appl/telnet/libtelnet/Makefile.in
    trunk/crypto/heimdal/lib/gssapi/gssapi/gssapi_krb5.h
    trunk/crypto/heimdal/lib/gssapi/gssapi_mech.h
    trunk/crypto/heimdal/lib/ipc/Makefile.am
    trunk/crypto/heimdal/lib/ipc/server.c
    trunk/crypto/heimdal/lib/kadm5/ipropd_master.c
    trunk/crypto/heimdal/lib/sl/slc-gram.y
    trunk/crypto/heimdal/lib/sl/slc-lex.l

Added Paths:
-----------
    trunk/contrib/telnet/telnet/baud.h

Added: trunk/contrib/telnet/telnet/baud.h
===================================================================
--- trunk/contrib/telnet/telnet/baud.h	                        (rev 0)
+++ trunk/contrib/telnet/telnet/baud.h	2015-07-28 11:07:30 UTC (rev 7186)
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2014 EMC Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: stable/10/contrib/telnet/telnet/baud.h 275508 2014-12-05 12:23:29Z ngie $
+ */
+
+/*
+ * Try to guess whether speeds are "encoded" (4.2BSD) or just numeric (4.4BSD).
+ */
+#if B4800 != 4800
+#define	DECODE_BAUD
+#endif
+
+#ifdef	DECODE_BAUD
+#ifndef	B7200
+#define B7200   B4800
+#endif
+
+#ifndef	B14400
+#define B14400  B9600
+#endif
+
+#ifndef	B19200
+#define B19200  B14400
+#endif
+
+#ifndef	B28800
+#define B28800  B19200
+#endif
+
+#ifndef	B38400
+#define B38400  B28800
+#endif
+
+#ifndef B57600
+#define B57600  B38400
+#endif
+
+#ifndef B76800
+#define B76800  B57600
+#endif
+
+#ifndef B115200
+#define B115200 B76800
+#endif
+
+#ifndef B115200
+#define B115200 B76800
+#endif
+#endif
+
+#ifndef B230400
+#define B230400 B115200
+#endif
+
+/*
+ * A table of available terminal speeds
+ */
+struct termspeeds termspeeds[] = {
+	{ 0,      B0 },
+	{ 50,     B50 },
+	{ 75,     B75 },
+	{ 110,    B110 },
+	{ 134,    B134 },
+	{ 150,    B150 },
+	{ 200,    B200 },
+	{ 300,    B300 },
+	{ 600,    B600 },
+	{ 1200,   B1200 },
+	{ 1800,   B1800 },
+	{ 2400,   B2400 },
+	{ 4800,   B4800 },
+#ifdef	B7200
+	{ 7200,   B7200 },
+#endif
+	{ 9600,   B9600 },
+#ifdef	B14400
+	{ 14400,  B14400 },
+#endif
+#ifdef	B19200
+	{ 19200,  B19200 },
+#endif
+#ifdef	B28800
+	{ 28800,  B28800 },
+#endif
+#ifdef	B38400
+	{ 38400,  B38400 },
+#endif
+#ifdef	B57600
+	{ 57600,  B57600 },
+#endif
+#ifdef	B115200
+	{ 115200, B115200 },
+#endif
+#ifdef	B230400
+	{ 230400, B230400 },
+#endif
+	{ -1,     0 }
+};


Property changes on: trunk/contrib/telnet/telnet/baud.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/crypto/heimdal/appl/Makefile.am
===================================================================
--- trunk/crypto/heimdal/appl/Makefile.am	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/Makefile.am	2015-07-28 11:07:30 UTC (rev 7186)
@@ -26,4 +26,4 @@
 	  kf					\
 	  $(dir_dce)
 
-EXTRA_DIST = NTMakefile
\ No newline at end of file
+EXTRA_DIST = NTMakefile

Modified: trunk/crypto/heimdal/appl/ftp/Makefile.am
===================================================================
--- trunk/crypto/heimdal/appl/ftp/Makefile.am	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/ftp/Makefile.am	2015-07-28 11:07:30 UTC (rev 7186)
@@ -4,4 +4,4 @@
 
 SUBDIRS = common ftp ftpd
 
-EXTRA_DIST = NTMakefile
\ No newline at end of file
+EXTRA_DIST = NTMakefile

Modified: trunk/crypto/heimdal/appl/ftp/common/Makefile.am
===================================================================
--- trunk/crypto/heimdal/appl/ftp/common/Makefile.am	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/ftp/common/Makefile.am	2015-07-28 11:07:30 UTC (rev 7186)
@@ -11,4 +11,4 @@
 	buffer.c \
 	common.h
 
-EXTRA_DIST = NTMakefile
\ No newline at end of file
+EXTRA_DIST = NTMakefile

Modified: trunk/crypto/heimdal/appl/ftp/common/Makefile.in
===================================================================
--- trunk/crypto/heimdal/appl/ftp/common/Makefile.in	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/ftp/common/Makefile.in	2015-07-28 11:07:30 UTC (rev 7186)
@@ -96,7 +96,7 @@
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS ?= cru
 libcommon_a_AR = $(AR) $(ARFLAGS)
 libcommon_a_LIBADD =
 am_libcommon_a_OBJECTS = sockbuf.$(OBJEXT) buffer.$(OBJEXT)

Modified: trunk/crypto/heimdal/appl/rcp/extern.h
===================================================================
--- trunk/crypto/heimdal/appl/rcp/extern.h	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/rcp/extern.h	2015-07-28 11:07:30 UTC (rev 7186)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)extern.h	8.1 (Berkeley) 5/31/93
- * $FreeBSD: src/bin/rcp/extern.h,v 1.5 1999/08/27 23:14:57 peter Exp $
+ * $FreeBSD: stable/10/crypto/heimdal/appl/rcp/extern.h 233294 2012-03-22 08:48:42Z stas $
  */
 
 typedef struct {

Modified: trunk/crypto/heimdal/appl/rcp/util.c
===================================================================
--- trunk/crypto/heimdal/appl/rcp/util.c	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/rcp/util.c	2015-07-28 11:07:30 UTC (rev 7186)
@@ -37,7 +37,7 @@
 static char sccsid[] = "@(#)util.c	8.2 (Berkeley) 4/2/94";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/bin/rcp/util.c,v 1.9 1999/08/27 23:14:58 peter Exp $";
+  "$FreeBSD: stable/10/crypto/heimdal/appl/rcp/util.c 233294 2012-03-22 08:48:42Z stas $";
 #endif /* not lint */
 #endif
 

Modified: trunk/crypto/heimdal/appl/telnet/libtelnet/Makefile.in
===================================================================
--- trunk/crypto/heimdal/appl/telnet/libtelnet/Makefile.in	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/appl/telnet/libtelnet/Makefile.in	2015-07-28 11:07:30 UTC (rev 7186)
@@ -96,7 +96,7 @@
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
+ARFLAGS ?= cru
 libtelnet_a_AR = $(AR) $(ARFLAGS)
 libtelnet_a_LIBADD =
 am_libtelnet_a_OBJECTS = auth.$(OBJEXT) enc_des.$(OBJEXT) \

Modified: trunk/crypto/heimdal/lib/gssapi/gssapi/gssapi_krb5.h
===================================================================
--- trunk/crypto/heimdal/lib/gssapi/gssapi/gssapi_krb5.h	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/gssapi/gssapi/gssapi_krb5.h	2015-07-28 11:07:30 UTC (rev 7186)
@@ -36,7 +36,7 @@
 #ifndef GSSAPI_KRB5_H_
 #define GSSAPI_KRB5_H_
 
-#include <gssapi.h>
+#include <gssapi/gssapi.h>
 
 GSSAPI_CPP_START
 

Modified: trunk/crypto/heimdal/lib/gssapi/gssapi_mech.h
===================================================================
--- trunk/crypto/heimdal/lib/gssapi/gssapi_mech.h	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/gssapi/gssapi_mech.h	2015-07-28 11:07:30 UTC (rev 7186)
@@ -23,8 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $MidnightBSD$
- *	$FreeBSD: src/lib/libgssapi/mech_switch.h,v 1.1 2005/12/29 14:40:20 dfr Exp $
+ *	$FreeBSD: stable/10/crypto/heimdal/lib/gssapi/gssapi_mech.h 233294 2012-03-22 08:48:42Z stas $
  */
 
 #ifndef GSSAPI_MECH_H

Modified: trunk/crypto/heimdal/lib/ipc/Makefile.am
===================================================================
--- trunk/crypto/heimdal/lib/ipc/Makefile.am	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/ipc/Makefile.am	2015-07-28 11:07:30 UTC (rev 7186)
@@ -64,4 +64,4 @@
 $(srcdir)/client.c: $(built_ipcc)
 $(srcdir)/server.c: $(built_ipcs)
 
-endif
\ No newline at end of file
+endif

Modified: trunk/crypto/heimdal/lib/ipc/server.c
===================================================================
--- trunk/crypto/heimdal/lib/ipc/server.c	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/ipc/server.c	2015-07-28 11:07:30 UTC (rev 7186)
@@ -565,7 +565,7 @@
 	struct sockcred *sc;
 
 	memset(&msg, 0, sizeof(msg));
-	crmsgsize = CMSG_SPACE(SOCKCREDSIZE(NGROUPS));
+	crmsgsize = CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX));
 	if (crmsgsize == 0)
 	    return 1 ;
 

Modified: trunk/crypto/heimdal/lib/kadm5/ipropd_master.c
===================================================================
--- trunk/crypto/heimdal/lib/kadm5/ipropd_master.c	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/kadm5/ipropd_master.c	2015-07-28 11:07:30 UTC (rev 7186)
@@ -119,9 +119,56 @@
     return fd;
 }
 
+static krb5_socket_t
+make_listen6_socket (krb5_context context, const char *port_str)
+{
+    krb5_socket_t fd;
+    int one = 1;
+    struct sockaddr_in6 addr;
+
+    fd = socket (AF_INET6, SOCK_STREAM, 0);
+    if (rk_IS_BAD_SOCKET(fd))
+	krb5_err (context, 1, rk_SOCK_ERRNO, "socket AF_INET6");
+    setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, (void *)&one, sizeof(one));
+    memset (&addr, 0, sizeof(addr));
+    addr.sin6_family = AF_INET6;
+
+    if (port_str) {
+	addr.sin6_port = krb5_getportbyname (context,
+					      port_str, "tcp",
+					      0);
+	if (addr.sin6_port == 0) {
+	    char *ptr;
+	    long port;
+
+	    port = strtol (port_str, &ptr, 10);
+	    if (port == 0 && ptr == port_str)
+		krb5_errx (context, 1, "bad port `%s'", port_str);
+	    addr.sin6_port = htons(port);
+	}
+    } else {
+	addr.sin6_port = krb5_getportbyname (context, IPROP_SERVICE,
+					    "tcp", IPROP_PORT);
+    }
+    if(bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
+	krb5_err (context, 1, errno, "bind6");
+    if (listen(fd, SOMAXCONN) < 0)
+	krb5_err (context, 1, errno, "listen6");
+    return fd;
+}
+
+#ifndef _SOCKADDR_UNION
+#define _SOCKADDR_UNION
+union sockaddr_union {
+	struct sockaddr		sa;
+	struct sockaddr_in	sin;
+	struct sockaddr_in6     sin6;
+};
+#endif /* _SOCKADDR_UNION */
+
 struct slave {
     krb5_socket_t fd;
-    struct sockaddr_in addr;
+    union sockaddr_union addr;
     char *name;
     krb5_auth_context ac;
     uint32_t version;
@@ -244,8 +291,8 @@
     s->name = NULL;
     s->ac = NULL;
 
-    addr_len = sizeof(s->addr);
-    s->fd = accept (fd, (struct sockaddr *)&s->addr, &addr_len);
+    addr_len = sizeof(s->addr.sin6);
+    s->fd = accept (fd, (struct sockaddr *)&s->addr.sa, &addr_len);
     if (rk_IS_BAD_SOCKET(s->fd)) {
 	krb5_warn (context, rk_SOCK_ERRNO, "accept");
 	goto error;
@@ -691,7 +738,7 @@
 	krb5_error_code ret;
 	rtbl_add_column_entry(tbl, SLAVE_NAME, slaves->name);
 	ret = krb5_sockaddr2address (context,
-				     (struct sockaddr*)&slaves->addr, &addr);
+				     (struct sockaddr*)&slaves->addr.sa, &addr);
 	if(ret == 0) {
 	    krb5_print_address(&addr, str, sizeof(str), NULL);
 	    krb5_free_address(context, &addr);
@@ -765,7 +812,7 @@
     void *kadm_handle;
     kadm5_server_context *server_context;
     kadm5_config_params conf;
-    krb5_socket_t signal_fd, listen_fd;
+    krb5_socket_t signal_fd, listen_fd, listen6_fd;
     int log_fd;
     slave *slaves = NULL;
     uint32_t current_version = 0, old_version = 0;
@@ -845,6 +892,7 @@
 
     signal_fd = make_signal_socket (context);
     listen_fd = make_listen_socket (context, port_str);
+    listen6_fd = make_listen6_socket (context, port_str);
 
     kadm5_log_get_version_fd (log_fd, &current_version);
 
@@ -859,7 +907,8 @@
 	uint32_t vers;
 
 #ifndef NO_LIMIT_FD_SETSIZE
-	if (signal_fd >= FD_SETSIZE || listen_fd >= FD_SETSIZE)
+	if (signal_fd >= FD_SETSIZE || listen_fd >= FD_SETSIZE ||
+	    listen6_fd >= FD_SETSIZE)
 	    krb5_errx (context, 1, "fd too large");
 #endif
 
@@ -868,6 +917,8 @@
 	max_fd = max(max_fd, signal_fd);
 	FD_SET(listen_fd, &readset);
 	max_fd = max(max_fd, listen_fd);
+	FD_SET(listen6_fd, &readset);
+	max_fd = max(max_fd, listen6_fd);
 
 	for (p = slaves; p != NULL; p = p->next) {
 	    if (p->flags & SLAVE_F_DEAD)
@@ -950,6 +1001,11 @@
 		send_are_you_there (context, p);
 	}
 
+	if (ret && FD_ISSET(listen6_fd, &readset)) {
+	    add_slave (context, keytab, &slaves, listen6_fd);
+	    --ret;
+	    assert(ret >= 0);
+	}
 	if (ret && FD_ISSET(listen_fd, &readset)) {
 	    add_slave (context, keytab, &slaves, listen_fd);
 	    --ret;

Modified: trunk/crypto/heimdal/lib/sl/slc-gram.y
===================================================================
--- trunk/crypto/heimdal/lib/sl/slc-gram.y	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/sl/slc-gram.y	2015-07-28 11:07:30 UTC (rev 7186)
@@ -46,6 +46,7 @@
 #include "slc.h"
 extern FILE *yyin;
 extern struct assignment *assignment;
+extern int yyparse(void);
 
 /* Declarations for Bison:
  */

Modified: trunk/crypto/heimdal/lib/sl/slc-lex.l
===================================================================
--- trunk/crypto/heimdal/lib/sl/slc-lex.l	2015-07-28 11:03:45 UTC (rev 7185)
+++ trunk/crypto/heimdal/lib/sl/slc-lex.l	2015-07-28 11:07:30 UTC (rev 7186)
@@ -47,8 +47,6 @@
 static void handle_comment(void);
 static char * handle_string(void);
 
-#define YY_NO_UNPUT
-
 #undef ECHO
 
 %}



More information about the Midnightbsd-cvs mailing list