diff options
| author | ivan <ivan> | 2004-03-11 07:33:55 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2004-03-11 07:33:55 +0000 |
| commit | c959e1e7039535de9eed1afcdcc1adf3db9a0f9f (patch) | |
| tree | 721a885e55157efacbe7c2497ce98658cc452bdf /fs_passwd/fs_passwdd | |
| parent | 7fa84ef3ef04fe18608d85c8c3aa1f34fe824c6c (diff) | |
update fs_passwd stuff as wrappers around self-service
Diffstat (limited to 'fs_passwd/fs_passwdd')
| -rwxr-xr-x | fs_passwd/fs_passwdd | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/fs_passwd/fs_passwdd b/fs_passwd/fs_passwdd deleted file mode 100755 index cce98e787..000000000 --- a/fs_passwd/fs_passwdd +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_passwdd -# -# This is run REMOTELY over ssh by fs_passwd_server. -# -# ivan@sisd.com 98-mar-9 - -use strict; -use Socket; - -my $fs_passwdd_socket = "/usr/local/freeside/fs_passwdd_socket"; -my $pid_file = "$fs_passwdd_socket.pid"; - -$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 $uaddr = sockaddr_un($fs_passwdd_socket); -my $proto = getprotobyname('tcp'); - -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($fs_passwdd_socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -if ( -e $pid_file ) { - open(PIDFILE,"<$pid_file"); - #chomp( my $old_pid = <PIDFILE> ); - my $old_pid = <PIDFILE>; - close PIDFILE; - $old_pid =~ /^(\d+)$/; - kill 'TERM', $1; -} -open(PIDFILE,">$pid_file"); -print PIDFILE "$$\n"; -close PIDFILE; - -my($paddr); -for ( ; $paddr = accept(Client,Server); close Client) { - my($me,$old_password,$new_password,$new_gecos,$new_shell); - - $me=<Client>; - $old_password=<Client>; - $new_password=<Client>; - $new_gecos=<Client>; - $new_shell=<Client>; - - print $me,$old_password,$new_password,$new_gecos,$new_shell; - my($error); - - $error=<STDIN>; - - print Client $error; - close Client; -} - |
