diff options
author | ivan <ivan> | 2002-04-17 05:46:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-04-17 05:46:09 +0000 |
commit | 1fb1f03d156cc44223dfdf0076c468ed011adf11 (patch) | |
tree | f1e760afe12b94e770a4391e4a7d311441dd5c49 /fs_passwd | |
parent | a7cd626d75d613ce8a0fea5a9bb96ac3a7167275 (diff) |
also untaint pid
Diffstat (limited to 'fs_passwd')
-rwxr-xr-x | fs_passwd/fs_passwdd | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs_passwd/fs_passwdd b/fs_passwd/fs_passwdd index 38079da66..43eb5db1f 100755 --- a/fs_passwd/fs_passwdd +++ b/fs_passwd/fs_passwdd @@ -31,9 +31,11 @@ listen(Server,SOMAXCONN) or die "listen: $!"; if ( -e $pid_file ) { open(PIDFILE,"<$pid_file"); - chomp( my $old_pid = <PIDFILE> ); + #chomp( my $old_pid = <PIDFILE> ); + my $old_pid = <PIDFILE>; close PIDFILE; - kill 'TERM', $old_pid; + $old_pid =~ /^(\d+)$/ + kill 'TERM', $1; } open(PIDFILE,">$pid_file"); print PIDFILE "$$\n"; |