tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /etc/services losses

Greg Troxel wrote in
 |Hauke Fath <hauke%Espresso.Rhein-Neckar.DE@localhost> writes:
 |> attached is a diff with services that for some reason or other got 
 |> dropped from /etc/services - in particular Amanda* and AppleTalk.
 |The really big question here is the relationship between our
 |/etc/services and
 |  s-port-numbers.txt
 |The format you don't like seems to be sort of similar to the one from
 |IANA.  But we are quite out of sync from that, so I wonder about the
 |other BSDs.
 |So I would talk to them and see what they did and why; it seems like
 |there must be a script from an iana file, and then there's supposed to
 |be the "local additions" section.  Probably the real bug is losing that
 |and it can be put back.  But editing without understanding that flow
 |seems unwise.

Anything amanda like but amanda itself is missing from IANA, at
least it is not here either, and we also have a script.  (I once
posted it, as below.)

 |Files generated like this usually have a Big Scary Warning, and this
 |doesn't; probably someone(tm) should fix that.
 |On the substance:
 |The use of mail for port 465 was apparently assigned briefly and then
 |not (we have STARTTLS now), and how is assigned to urd.  I never thought
 |it was for submission.  It is not in the current IANA file.  So it's a
 |good question why it remains at all.  I am therefore not ok with adding \

submissions is a standard, RFC 8314:

  3.3.  Implicit TLS for SMTP Submission

     When a TCP connection is established for the "submissions" service
     (default port 465), a TLS handshake begins immediately.  Clients MUST
     implement the certificate validation mechanism described in
     [RFC7817].  Once the TLS session is established, Message Submission
     protocol data [RFC6409] is exchanged as TLS application data for the
     remainder of the TCP connection.  (Note: The "submissions" service
     name is defined in Section 7.3 of this document and follows the usual
     convention that the name of a service layered on top of Implicit TLS
     consists of the name of the service as used without TLS, with an "s"


#!/bin/sh -
#@ Update protocols and services from IANA.
#@ Taken from ArchLinux script written by Gaetan Bisson.  Adjusted for CRUX.


download() {
	datetime=`date +'%FT%T%z'`
	echo 'Downloading protocols'
	${curl} -o protocols.xml ${url_pn}
	[ ${?} -eq 0 ] || exit 20
	echo 'Downloading services'
	${curl} -o services.xml ${url_snpn}
	[ ${?} -eq 0 ] || exit 21

process() {
	echo 'Processing protocols'
	${awk} -F "[<>]" -v URL="${url_pn}" -v DT="${datetime}" '
			print "# /etc/protocols, created " DT
			print "# Source: " URL
		/<record/ {v = n = ""}
		/<value/ {v = $3}
		/<name/ && $3!~/ / {n = $3}
		/<\/record/ && n && v != ""{
			printf "%-12s %3i %s\n", tolower(n), v, n
	' < protocols.xml >
	[ ${?} -eq 0 ] || exit 30

	echo 'Processing services'
	${awk} -F "[<>]" -v URL="${url_snpn}" -v DT="${datetime}" '
			print "# /etc/services, created " DT
			print "# Source: " URL
		/<record/ {n = u = p = c = ""}
		/<name/ && !/\(/ {n = $3}
		/<number/ {u = $3}
		/<protocol/ {p = $3}
		/Unassigned/ || /Reserved/ || /historic/ {c = 1}
		/<\/record/ && n && u && p && !c{
			printf "%-15s %5i/%s\n", n, u, p
	' < services.xml >
	[ ${?} -eq 0 ] || exit 31

update() {
	mv protocols
	[ ${?} -eq 0 ] || exit 40
	mv services
	[ ${?} -eq 0 ] || exit 41
	rm -f protocols.xml services.xml
	[ ${?} -eq 0 ] || exit 42


|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Home | Main Index | Thread Index | Old Index