diff options
author | cvs2git <cvs2git> | 2002-08-12 06:17:10 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2002-08-12 06:17:10 +0000 |
commit | 160be29a0dc62e79a4fb95d2ab8c0c7e5996760e (patch) | |
tree | 94ebadb17321b138fd7bfd9a5c379eec97c5d328 /fs_sesmon/FS-SessionClient/fs_sessiond | |
parent | 3ef62a0570055da710328937e7f65dbb2c027c62 (diff) |
This commit was manufactured by cvs2svn to create branch 'BESTPRACTICAL'.
Diffstat (limited to 'fs_sesmon/FS-SessionClient/fs_sessiond')
-rw-r--r-- | fs_sesmon/FS-SessionClient/fs_sessiond | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/fs_sesmon/FS-SessionClient/fs_sessiond b/fs_sesmon/FS-SessionClient/fs_sessiond deleted file mode 100644 index bfdb20a1d..000000000 --- a/fs_sesmon/FS-SessionClient/fs_sessiond +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_sessiond -# -# This is run REMOTELY over ssh by fs_session_server -# - -use strict; -use Socket; - -use vars qw( $Debug ); - -$Debug = 1; - -my $fs_sessiond_socket = "/usr/local/freeside/fs_sessiond_socket"; - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -$|=1; - -my $me = "[fs_sessiond]"; - -warn "$me starting\n" if $Debug; -#nothing to read from server - -warn "$me creating $fs_sessiond_socket\n" if $Debug; -my $uaddr = sockaddr_un($fs_sessiond_socket); -my $proto = getprotobyname('tcp'); -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($fs_sessiond_socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -warn "$me entering main loop\n" if $Debug; -my $paddr; -for ( ; $paddr = accept(Client,Server); close Client) { - - chomp( my $command = <Client> ); - - if ( $command eq 'login' || $command eq 'logout' || $command eq 'portnum' ) { - warn "$me reading data from local client\n" if $Debug; - my @data; - my $dos = 0; - push @data, scalar(<Client>) until $dos++ == 99 || $data[$#data] eq "END\n"; - if ( $dos == 99 ) { - warn "$me WARNING: DoS attempt!" - } else { - warn "$me sending data to remote server\n" if $Debug; - print "$command\n", @data; - warn "$me reading result from remote server\n" if $Debug; - my $error = <STDIN>; - warn "$me sending error to local client\n" if $Debug; - print Client $error; - } - } else { - warn "$me WARNING: unexpected command from client: $command"; - } - -} - |