From 5d38b453ef90ee936c9a6d4781d2592938060b93 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 27 Apr 2012 18:36:52 +0000 Subject: [PATCH] Fix problem where unauthorized users could indefinitely hold an xcatd slot open so long as they stayed connected git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12379 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 06ccf66d0..3615164f6 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1688,9 +1688,10 @@ sub service_connection { my $request; my $req=undef; alarm(15); - while (<$sock>) { + my $line; + while (alarm (15) and $line = <$sock>) { alarm(0); - $request .= $_; + $request .= $line; #$req = eval { XMLin($request, ForceArray => [ 'attribute' , 'attributepair' ]) }; if (m/<\/xcatrequest>/) { $req = eval { XMLin($request, SuppressEmpty=>undef,ForceArray=>1) };