unmerge 167367
tags 167367 patch
tags 147558 patch
thanks

(Reviewing old bug reports) 

First off, I'm unmerging 167367 from the other bug reports as, after 
reading http://www.amanda.org/docs/install.html the issue with amanda is 
not related to the problem of not converting numeric ports to a proper 
xinetd conf but, actually, might be because 'groups = yes' needs to be 
specified here.

The attached patch should fix both issues (the port issue and the Amanda 
issue), it's slightly tested by myself with a modified inetd.conf file and 
seems to work OK.

Regards

Javier
--- xinetd-2.3.13.old/xinetd/xconv.pl   2003-02-27 23:16:25.000000000 +0100
+++ xinetd-2.3.13/xinetd/xconv.pl       2005-03-08 16:09:28.000000000 +0100
@@ -40,6 +40,9 @@
        print "\tflags       = NAMEINARGS\n";
        print "\tsocket_type = $command[1]\n";
        print "\tprotocol    = $command[2]\n";
+       if( $command[0] =~ /^\d+$/ ) {
+               print "\tport        = $command[0]\n";
+       }
        if( grep /no/, $command[3] ) {
                print "\twait        = no\n";
        } else {
@@ -50,9 +53,28 @@
        if( defined $user[1] ) {
                print "\tgroup       = $user[1]\n";
        }
+       # Amanda is a special case, it needs this, see
+       # http://www.amanda.org/docs/install.html and 
+       # Bug report #167367
+       if ( $command[6] =~ /usr\/lib\/amanda/ ) {
+               print "\tgroups      = yes\n";
+       }
        if( grep /internal/, $command[5] ) {
                print "\ttype        = INTERNAL\n";
                print "\tid          = $command[0]-$command[1]\n";
+       } elsif ( $command[5] =~ /\/usr\/sbin\/tcpd/ ){
+       # Tcp wrapping is already implemented in xinetd
+               print "\tserver      = $command[6]\n";
+               if ( defined $command[7] ) {
+                       print "\tserver_args = ";
+                       $i = 7;
+                       while( defined $command[$i] ) {
+                               print "$command[$i] ";
+                               $i++;
+                       }
+                       print "\n";
+               }
+       
        } else {
                print "\tserver      = $command[5]\n";
                print "\tserver_args = ";

Attachment: signature.asc
Description: Digital signature

Reply via email to