summaryrefslogtreecommitdiff
path: root/fs_passwd
diff options
context:
space:
mode:
authorivan <ivan>2002-04-17 05:46:09 +0000
committerivan <ivan>2002-04-17 05:46:09 +0000
commit1fb1f03d156cc44223dfdf0076c468ed011adf11 (patch)
treef1e760afe12b94e770a4391e4a7d311441dd5c49 /fs_passwd
parenta7cd626d75d613ce8a0fea5a9bb96ac3a7167275 (diff)
also untaint pid
Diffstat (limited to 'fs_passwd')
-rwxr-xr-xfs_passwd/fs_passwdd6
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";