summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest1
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/tftp/Makefile12
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/tftp/tftp-udp6.xml82
-rw-r--r--usr/src/lib/libidmap/Makefile.com4
-rw-r--r--usr/src/lib/librpcsvc/Makefile44
-rw-r--r--usr/src/lib/librpcsvc/Makefile.com4
-rw-r--r--usr/src/man/man1m/in.tftpd.1m30
-rw-r--r--usr/src/pkg/manifests/service-network-tftp.mf7
8 files changed, 131 insertions, 53 deletions
diff --git a/manifest b/manifest
index 1c6e3a09c8..0df6aabd84 100644
--- a/manifest
+++ b/manifest
@@ -1553,6 +1553,7 @@ f lib/svc/manifest/network/smb/client.xml 0444 root sys
f lib/svc/manifest/network/smb/server.xml 0444 root sys
f lib/svc/manifest/network/smtp-sendmail.xml 0444 root sys
f lib/svc/manifest/network/ssh.xml 0444 root sys
+f lib/svc/manifest/network/tftp-udp6.xml 0444 root sys
f lib/svc/manifest/network/time.xml 0444 root sys
f lib/svc/manifest/network/varpd.xml 0444 root sys
f lib/svc/manifest/network/vrrp.xml 0444 root sys
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/lib/libidmap/Makefile.com b/usr/src/lib/libidmap/Makefile.com
index 39f2ccd957..2a5e5484de 100644
--- a/usr/src/lib/libidmap/Makefile.com
+++ b/usr/src/lib/libidmap/Makefile.com
@@ -19,6 +19,7 @@
# CDDL HEADER END
#
#
+# Copyright 2015 Gary Mills
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -48,7 +49,8 @@ LDLIBS += -lc -lavl -lnsl -lnvpair -luutil
SRCDIR = ../common
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
-IDMAP_PROT_X = $(SRC)/uts/common/rpcsvc/idmap_prot.x
+# Relative path to ensure path to idmap_prot.h is also relative
+IDMAP_PROT_X = ../../../uts/common/rpcsvc/idmap_prot.x
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I$(SRCDIR)
diff --git a/usr/src/lib/librpcsvc/Makefile b/usr/src/lib/librpcsvc/Makefile
index 4e61f7a7e2..1209096b72 100644
--- a/usr/src/lib/librpcsvc/Makefile
+++ b/usr/src/lib/librpcsvc/Makefile
@@ -19,15 +19,17 @@
# CDDL HEADER END
#
#
+# Copyright 2015 Gary Mills
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include ../../Makefile.master
-PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc
+# Relative path to ensure path to header file is also relative
+HEAD_DIR= ../../head/rpcsvc
+UTS_DIR= ../../uts/common/rpcsvc
+RPC_DIR= ../../uts/common/rpc
SUBDIRS= $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
@@ -81,32 +83,32 @@ clean clobber lint: $(SUBDIRS)
#
# Derived files
#
-common/bootparam_prot_xdr.c: $(PROTOCOL_DIR)/bootparam_prot.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/bootparam_prot.x > $@
+common/bootparam_prot_xdr.c: $(HEAD_DIR)/bootparam_prot.x
+ $(RPCGEN) -c $(HEAD_DIR)/bootparam_prot.x > $@
-common/rstat_xdr.c: $(PROTOCOL_DIR)/rstat.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/rstat.x > $@
+common/rstat_xdr.c: $(HEAD_DIR)/rstat.x
+ $(RPCGEN) -c $(HEAD_DIR)/rstat.x > $@
-common/rusers_xdr.c: $(PROTOCOL_DIR)/rusers.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/rusers.x > $@
+common/rusers_xdr.c: $(HEAD_DIR)/rusers.x
+ $(RPCGEN) -c $(HEAD_DIR)/rusers.x > $@
-common/sm_inter_xdr.c: $(PROTOCOL_DIR)/sm_inter.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/sm_inter.x > $@
+common/sm_inter_xdr.c: $(UTS_DIR)/sm_inter.x
+ $(RPCGEN) -c $(UTS_DIR)/sm_inter.x > $@
-common/spray_xdr.c: $(PROTOCOL_DIR)/spray.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/spray.x > $@
+common/spray_xdr.c: $(HEAD_DIR)/spray.x
+ $(RPCGEN) -c $(HEAD_DIR)/spray.x > $@
-common/nlm_prot.c: $(PROTOCOL_DIR)/nlm_prot.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/nlm_prot.x > $@
+common/nlm_prot.c: $(UTS_DIR)/nlm_prot.x
+ $(RPCGEN) -c $(UTS_DIR)/nlm_prot.x > $@
-common/mount_xdr.c: $(PROTOCOL_DIR)/mount.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/mount.x > $@
+common/mount_xdr.c: $(HEAD_DIR)/mount.x
+ $(RPCGEN) -c $(HEAD_DIR)/mount.x > $@
-common/nsm_addr_xdr.c: $(PROTOCOL_DIR)/nsm_addr.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/nsm_addr.x > $@
+common/nsm_addr_xdr.c: $(UTS_DIR)/nsm_addr.x
+ $(RPCGEN) -c $(UTS_DIR)/nsm_addr.x > $@
-common/rpc_sztypes.c: $(PROTOCOL_DIR)/rpc_sztypes.x
- $(RPCGEN) -c $(PROTOCOL_DIR)/rpc_sztypes.x > $@
+common/rpc_sztypes.c: $(RPC_DIR)/rpc_sztypes.x
+ $(RPCGEN) -c $(RPC_DIR)/rpc_sztypes.x > $@
# include library targets
include ../Makefile.targ
diff --git a/usr/src/lib/librpcsvc/Makefile.com b/usr/src/lib/librpcsvc/Makefile.com
index 64a77e161e..15b6c6cb48 100644
--- a/usr/src/lib/librpcsvc/Makefile.com
+++ b/usr/src/lib/librpcsvc/Makefile.com
@@ -20,6 +20,7 @@
#
#
+# Copyright 2015 Gary Mills
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -57,6 +58,9 @@ $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
LDLIBS += -lnsl -lc
+# Needed so header files with relative paths will work
+CPPFLAGS += -I..
+
.KEEP_STATE:
lint: lintcheck
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