From: ivan Date: Mon, 23 Mar 1998 08:20:25 +0000 (+0000) Subject: Initial revision X-Git-Tag: freeside_1_2_0~303 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0b5b85344c8cb7d94ba895fbd56f483dee756de7 Initial revision --- diff --git a/fs_passwd/fs_passwdd b/fs_passwd/fs_passwdd new file mode 100755 index 000000000..582e13ccd --- /dev/null +++ b/fs_passwd/fs_passwdd @@ -0,0 +1,49 @@ +#!/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"; + +$ENV{'PATH'} ='/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: $!"; + +my($paddr); +for ( ; $paddr = accept(Client,Server); close Client) { + my($me,$old_password,$new_password,$new_gecos,$new_shell); + + $me=; + $old_password=; + $new_password=; + $new_gecos=; + $new_shell=; + + print $me,$old_password,$new_password,$new_gecos,$new_shell; + my($error); + + $error=; + + print Client $error; + close Client; +} +