diff options
author | Alexander Eremin <a.eremin@nexenta.com> | 2015-06-18 08:47:57 -0700 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2015-07-02 10:27:14 -0400 |
commit | 29a47e6ee6365b8ebcd68a3d59c0e1ef32f17ceb (patch) | |
tree | 689ec6c7b770a8e0fc9dda37b44f3b6e6ab41c13 | |
parent | 31c46cf23cd1cf4d66390a983dc5072d7d299ba2 (diff) | |
download | illumos-joyent-29a47e6ee6365b8ebcd68a3d59c0e1ef32f17ceb.tar.gz |
5172 tftpd service is not registered by default and its manual is giving misleading directions
Reviewed by: Eric Sproul <esproul@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile | 12 | ||||
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml | 82 | ||||
-rw-r--r-- | usr/src/man/man1m/in.tftpd.1m | 30 | ||||
-rw-r--r-- | usr/src/pkg/manifests/service-network-tftp.mf | 7 |
4 files changed, 100 insertions, 31 deletions
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 @@ +<?xml version='1.0'?> +<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> +<!-- + +This file and its contents are supplied under the terms of the +Common Development and Distribution License ("CDDL"), version 1.0. +You may only use this file in accordance with the terms of version +of the CDDL. + +A full copy of the text of the CDDL should have accompanied this +source. A copy of the CDDL is also available via the Internet at +http://www.illumos.org/license/CDDL. + +Copyright 2015 Nexenta Systems, Inc. All rights reserved. + +NOTE: This service manifest is not editable; its contents will +be overwritten by package or patch operations, including +operating system upgrade. + +--> + +<service_bundle type='manifest' name='network:tftp'> + +<service + name='network/tftp/udp6' + type='service' + version='1'> + + <create_default_instance enabled='false'/> + + <restarter> + <service_fmri value='svc:/network/inetd:default' /> + </restarter> + + <exec_method + type='method' + name='inetd_start' + exec='/usr/sbin/in.tftpd -s /tftpboot' + timeout_seconds='0'> + <method_context> + <method_credential user='root' group='root' /> + </method_context> + </exec_method> + + <exec_method + type='method' + name='inetd_disable' + exec=':kill' + timeout_seconds='0'> + </exec_method> + + <exec_method + type='method' + name='inetd_offline' + exec=':kill_process' + timeout_seconds='0'> + </exec_method> + + <property_group name='inetd' type='framework'> + <propval name='name' type='astring' value='tftp' /> + <propval name='endpoint_type' type='astring' value='dgram' /> + <propval name='proto' type='astring' value='udp6' /> + <propval name='wait' type='boolean' value='true' /> + <propval name='isrpc' type='boolean' value='false' /> + </property_group> + + <stability value='External' /> + + <template> + <common_name> + <loctext xml:lang='C'> + TFTP server + </loctext> + </common_name> + <documentation> + <manpage title='in.tftpd' section='1M' + manpath='/usr/share/man' /> + </documentation> + </template> +</service> + +</service_bundle> 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 |