From 29a47e6ee6365b8ebcd68a3d59c0e1ef32f17ceb Mon Sep 17 00:00:00 2001 From: Alexander Eremin Date: Thu, 18 Jun 2015 08:47:57 -0700 Subject: [PATCH] 5172 tftpd service is not registered by default and its manual is giving misleading directions Reviewed by: Eric Sproul Approved by: Richard Lowe --- usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile | 12 +++- usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml | 82 +++++++++++++++++++++++++ usr/src/man/man1m/in.tftpd.1m | 30 +-------- usr/src/pkg/manifests/service-network-tftp.mf | 7 ++- 4 files changed, 100 insertions(+), 31 deletions(-) create mode 100644 usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml diff --git a/usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile b/usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile index d2b5c4d87c..0f5e48ff1b 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile @@ -22,7 +22,7 @@ # # Copyright (c) 1989,2001 by Sun Microsystems, Inc. # All rights reserved. -# +# Copyright 2015 Nexenta Systems, Inc. All rights reserved. PROG= tftp OBJS= main.o tftp.o tftpsubs.o @@ -31,6 +31,12 @@ SRCS= $(OBJS:%.o=%.c) include ../../../Makefile.cmd include ../../Makefile.cmd-inet +MANIFEST= tftp-udp6.xml + +ROOTMANIFESTDIR = $(ROOTSVCNETWORK) + +$(ROOTMANIFEST):= FILEMODE = 0444 + CPPFLAGS += -DSYSV -DSTRNET -DBSD_COMP -I$(CMDINETCOMMONDIR) CERRWARN += -_gcc=-Wno-clobbered CERRWARN += -_gcc=-Wno-parentheses @@ -44,11 +50,13 @@ $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) -install: all $(ROOTPROG) +install: all $(ROOTPROG) $(ROOTMANIFEST) clean: $(RM) $(OBJS) lint: lint_SRCS +check: $(CHKMANIFEST) + include ../../../Makefile.targ diff --git a/usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml b/usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml new file mode 100644 index 0000000000..d5368753d4 --- /dev/null +++ b/usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/usr/src/man/man1m/in.tftpd.1m b/usr/src/man/man1m/in.tftpd.1m index dd0cce6db6..e67bb435d4 100644 --- a/usr/src/man/man1m/in.tftpd.1m +++ b/usr/src/man/man1m/in.tftpd.1m @@ -1,10 +1,11 @@ '\" te .\" Copyright 1989 AT&T .\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved +.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH IN.TFTPD 1M "Nov 5, 2008" +.TH IN.TFTPD 1M "Jun 17, 2015" .SH NAME in.tftpd, tftpd \- Internet Trivial File Transfer Protocol server .SH SYNOPSIS @@ -14,7 +15,6 @@ in.tftpd, tftpd \- Internet Trivial File Transfer Protocol server .fi .SH DESCRIPTION -.sp .LP \fBtftpd\fR is a server that supports the Internet Trivial File Transfer Protocol (TFTP). @@ -37,7 +37,6 @@ implications should be considered before enabling this service. \fB[GU]ID_NOBODY\fR under the assumption that no files exist with that owner or group. However, nothing checks this assumption or enforces this restriction. .SH OPTIONS -.sp .ne 2 .na \fB\fB-d\fR\fR @@ -68,19 +67,15 @@ retransmission timeout value. .RE .SH USAGE -.sp .LP The \fBin.tftpd\fR server is IPv6-enabled. See \fBip6\fR(7P). -.sp .LP \fBin.tftpd\fR supports transfers of greater than 32 MB, per RFC 2348. .SH SEE ALSO -.sp .LP \fBsvcs\fR(1), \fBtftp\fR(1), \fBinetadm\fR(1M), \fBinetd\fR(1M), \fBsvcadm\fR(1M), \fBnetconfig\fR(4), \fBattributes\fR(5), \fBsmf\fR(5), \fBip6\fR(7P) -.sp .LP Malkin, G. and Harkin, A. \fIRFC 2347, TFTP Option Extension\fR. The Internet Society. May 1998 @@ -97,11 +92,9 @@ Options\fR. The Internet Society. May 1998 Sollins, K.R. \fIRFC 1350, The TFTP Protocol (Revision 2)\fR. Network Working Group. July 1992. .SH NOTES -.sp .LP The \fBtftpd\fR server only acknowledges the transfer size option that is sent with a \fBread\fR request when the octet transfer mode is specified. -.sp .LP The \fBin.tftpd.1m\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: @@ -121,22 +114,3 @@ initiating and restarting this service is delegated to \fBinetd\fR(1M). Use \fBinetadm\fR(1M) to make configuration changes and to view configuration information for this service. The service's status can be queried using the \fBsvcs\fR(1) command. -.sp -.LP -Unlike most \fBsmf\fR(5) services, a manifest for the \fBtftp\fR service is not -included in the system. To create one and enable this service, the -administrator should: -.RS +4 -.TP -1. -Edit \fB/etc/inet/inetd.conf\fR and uncomment the \fBtftp\fR entry. -.RE -.RS +4 -.TP -2. -Run \fB/usr/sbin/inetconv\fR. -.RE -.sp -.LP -After you run \fBinetconv\fR, the \fBsvc:/network/tftp/udp6:default\fR service -is created and enabled. diff --git a/usr/src/pkg/manifests/service-network-tftp.mf b/usr/src/pkg/manifests/service-network-tftp.mf index c0704369f4..6653caf7b1 100644 --- a/usr/src/pkg/manifests/service-network-tftp.mf +++ b/usr/src/pkg/manifests/service-network-tftp.mf @@ -21,7 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2012 Nexenta Systems, Inc. All rights reserved. +# Copyright 2015 Nexenta Systems, Inc. All rights reserved. # set name=pkg.fmri value=pkg:/service/network/tftp@$(PKGVERS) @@ -30,11 +30,16 @@ set name=pkg.summary value="Trivial File Transfer Server" set name=info.classification \ value="org.opensolaris.category.2008:Applications/System Utilities" set name=variant.arch value=$(ARCH) +dir path=lib +dir path=lib/svc +dir path=lib/svc/manifest group=sys +dir path=lib/svc/manifest/network group=sys dir path=usr group=sys dir path=usr/bin dir path=usr/sbin dir path=usr/share/man/man1 dir path=usr/share/man/man1m +file path=lib/svc/manifest/network/tftp-udp6.xml group=sys mode=0444 file path=usr/bin/tftp mode=0555 file path=usr/sbin/in.tftpd mode=0555 file path=usr/share/man/man1/tftp.1 -- 2.11.4.GIT