[Midnightbsd-cvs] src [11378] trunk/libexec/tftpd/tftpd.c: sync with freebsd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Jul 6 09:56:20 EDT 2018


Revision: 11378
          http://svnweb.midnightbsd.org/src/?rev=11378
Author:   laffer1
Date:     2018-07-06 09:56:20 -0400 (Fri, 06 Jul 2018)
Log Message:
-----------
sync with freebsd

Modified Paths:
--------------
    trunk/libexec/tftpd/Makefile
    trunk/libexec/tftpd/tftp-file.c
    trunk/libexec/tftpd/tftp-file.h
    trunk/libexec/tftpd/tftp-io.c
    trunk/libexec/tftpd/tftp-io.h
    trunk/libexec/tftpd/tftp-options.c
    trunk/libexec/tftpd/tftp-options.h
    trunk/libexec/tftpd/tftp-transfer.c
    trunk/libexec/tftpd/tftp-transfer.h
    trunk/libexec/tftpd/tftp-utils.c
    trunk/libexec/tftpd/tftp-utils.h
    trunk/libexec/tftpd/tftpd.8
    trunk/libexec/tftpd/tftpd.c

Property Changed:
----------------
    trunk/libexec/tftpd/tftpd.8

Modified: trunk/libexec/tftpd/Makefile
===================================================================
--- trunk/libexec/tftpd/Makefile	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/Makefile	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,6 +1,9 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
-# $FreeBSD$
+# $FreeBSD: stable/10/libexec/tftpd/Makefile 313226 2017-02-04 16:47:35Z ngie $
 
+.include <bsd.own.mk>
+
 PROG=	tftpd
 MAN=	tftpd.8
 SRCS=	tftp-file.c tftp-io.c tftp-options.c tftp-transfer.c tftp-utils.c
@@ -7,7 +10,10 @@
 SRCS+=	tftpd.c
 WFORMAT=0
 
-DPADD=	${LIBWRAP}
-LDADD=	-lwrap
+.if ${MK_TCP_WRAPPERS} != "no"
+CFLAGS+=	-DLIBWRAP
+DPADD+=		${LIBWRAP}
+LDADD+=		-lwrap
+.endif
 
 .include <bsd.prog.mk>

Modified: trunk/libexec/tftpd/tftp-file.c
===================================================================
--- trunk/libexec/tftpd/tftp-file.c	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-file.c	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-file.c 223487 2011-06-24 02:56:24Z rodrigc $");
 
 #include <sys/types.h>
 #include <sys/ioctl.h>

Modified: trunk/libexec/tftpd/tftp-file.h
===================================================================
--- trunk/libexec/tftpd/tftp-file.h	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-file.h	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-file.h 207614 2010-05-04 13:07:40Z imp $");
 
 int	write_init(int fd, FILE *f, const char *mode);
 size_t	write_file(char *buffer, int count);

Modified: trunk/libexec/tftpd/tftp-io.c
===================================================================
--- trunk/libexec/tftpd/tftp-io.c	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-io.c	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-io.c 246139 2013-01-31 00:02:36Z marius $");
 
 #include <sys/stat.h>
 #include <sys/types.h>

Modified: trunk/libexec/tftpd/tftp-io.h
===================================================================
--- trunk/libexec/tftpd/tftp-io.h	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-io.h	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-io.h 207614 2010-05-04 13:07:40Z imp $");
 
 #define RP_NONE		0
 #define	RP_RECVFROM	-1

Modified: trunk/libexec/tftpd/tftp-options.c
===================================================================
--- trunk/libexec/tftpd/tftp-options.c	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-options.c	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-options.c 246139 2013-01-31 00:02:36Z marius $");
 
 #include <sys/socket.h>
 #include <sys/types.h>

Modified: trunk/libexec/tftpd/tftp-options.h
===================================================================
--- trunk/libexec/tftpd/tftp-options.h	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-options.h	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-options.h 207614 2010-05-04 13:07:40Z imp $");
 
 /*
  * Options

Modified: trunk/libexec/tftpd/tftp-transfer.c
===================================================================
--- trunk/libexec/tftpd/tftp-transfer.c	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-transfer.c	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-transfer.c 224536 2011-07-31 03:12:20Z rodrigc $");
 
 #include <sys/types.h>
 #include <sys/param.h>

Modified: trunk/libexec/tftpd/tftp-transfer.h
===================================================================
--- trunk/libexec/tftpd/tftp-transfer.h	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-transfer.h	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-transfer.h 207614 2010-05-04 13:07:40Z imp $");
 
 void	tftp_send(int peer, uint16_t *block, struct tftp_stats *tp);
 void	tftp_receive(int peer, uint16_t *block, struct tftp_stats *tp,

Modified: trunk/libexec/tftpd/tftp-utils.c
===================================================================
--- trunk/libexec/tftpd/tftp-utils.c	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-utils.c	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-utils.c 241720 2012-10-19 05:43:38Z ed $");
 
 #include <sys/socket.h>
 #include <sys/stat.h>

Modified: trunk/libexec/tftpd/tftp-utils.h
===================================================================
--- trunk/libexec/tftpd/tftp-utils.h	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftp-utils.h	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (C) 2008 Edwin Groothuis. All rights reserved.
  * 
@@ -24,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftp-utils.h 246139 2013-01-31 00:02:36Z marius $");
 
 /*
  */

Modified: trunk/libexec/tftpd/tftpd.8
===================================================================
--- trunk/libexec/tftpd/tftpd.8	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftpd.8	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -9,11 +10,7 @@
 .\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"	This product includes software developed by the University of
-.\"	California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
 .\"
@@ -30,7 +27,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)tftpd.8	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD$
+.\" $FreeBSD: stable/10/libexec/tftpd/tftpd.8 262435 2014-02-24 08:21:49Z brueffer $
 .\"
 .Dd June 22, 2011
 .Dt TFTPD 8


Property changes on: trunk/libexec/tftpd/tftpd.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/libexec/tftpd/tftpd.c
===================================================================
--- trunk/libexec/tftpd/tftpd.c	2018-07-06 13:55:50 UTC (rev 11377)
+++ trunk/libexec/tftpd/tftpd.c	2018-07-06 13:56:20 UTC (rev 11378)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1983, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -10,11 +11,7 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -43,7 +40,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/libexec/tftpd/tftpd.c 313226 2017-02-04 16:47:35Z ngie $");
 
 /*
  * Trivial file transfer protocol server.
@@ -70,7 +67,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
-#include <tcpd.h>
 #include <unistd.h>
 
 #include "tftp-file.h"
@@ -79,6 +75,10 @@
 #include "tftp-transfer.h"
 #include "tftp-options.h"
 
+#ifdef	LIBWRAP
+#include <tcpd.h>
+#endif
+
 static void	tftp_wrq(int peer, char *, ssize_t);
 static void	tftp_rrq(int peer, char *, ssize_t);
 
@@ -285,6 +285,7 @@
 		}
 	}
 
+#ifdef	LIBWRAP
 	/*
 	 * See if the client is allowed to talk to me.
 	 * (This needs to be done before the chroot())
@@ -333,6 +334,7 @@
 				    "Full access allowed"
 				    "in /etc/hosts.allow");
 	}
+#endif
 
 	/*
 	 * Since we exit here, we should do that only after the above



More information about the Midnightbsd-cvs mailing list