1
From 230b222e62166df16f21aff3859dafab3cd3cae7 Mon Sep 17 00:00:00 2001
2
From: Pierre Habouzit <madcoder@debian.org>
3
Date: Mon, 26 Nov 2007 16:01:43 +0100
4
Subject: [PATCH] xconv.pl updates
7
xinetd/xconv.pl | 37 ++++++++++++++++++++++++++++++++++++-
8
1 files changed, 36 insertions(+), 1 deletions(-)
10
diff --git a/xinetd/xconv.pl b/xinetd/xconv.pl
11
index cc58868..6c0a71d 100755
14
@@ -16,8 +16,16 @@ print_defaults;
18
+ $disable = 0; # Default to 'enable'
22
+ # Check for disable before we check for comments
23
+ if (m/^\#<off>\#/i) {
28
# Remove comment lines
31
@@ -37,9 +45,12 @@ while( <STDIN> ) {
33
print "service $command[0]\n";
35
- print "\tflags = NAMEINARGS\n";
36
print "\tsocket_type = $command[1]\n";
37
print "\tprotocol = $command[2]\n";
38
+ if( $command[0] =~ /^\d+$/ ) {
39
+ print "\tport = $command[0]\n";
40
+ print "\ttype = UNLISTED\n";
42
if( grep /no/, $command[3] ) {
43
print "\twait = no\n";
45
@@ -50,9 +61,28 @@ while( <STDIN> ) {
46
if( defined $user[1] ) {
47
print "\tgroup = $user[1]\n";
49
+ # Amanda is a special case, it needs this, see
50
+ # http://www.amanda.org/docs/install.html and
51
+ # Bug report #167367
52
+ if ( $command[6] =~ /(amandad|amindexd|amidxtaped)/ ) {
53
+ print "\tgroups = yes\n";
55
if( grep /internal/, $command[5] ) {
56
print "\ttype = INTERNAL\n";
57
print "\tid = $command[0]-$command[1]\n";
58
+ } elsif ( $command[5] =~ /\/usr\/sbin\/tcpd/ ){
59
+ # Tcp wrapping is already implemented in xinetd
60
+ print "\tserver = $command[6]\n";
61
+ if ( defined $command[7] ) {
62
+ print "\tserver_args = ";
64
+ while( defined $command[$i] ) {
65
+ print "$command[$i] ";
72
print "\tserver = $command[5]\n";
73
print "\tserver_args = ";
74
@@ -65,6 +95,11 @@ while( <STDIN> ) {
80
+ print "\tdisable = yes\n";