security patch fix

This commit is contained in:
Jim Norman 2006-04-07 21:46:16 +00:00
parent b2b5903126
commit 9bb6642e4a

View File

@ -79,23 +79,25 @@ namespace sscs.communication
CSSSLogger.ExecutionTrace(this); CSSSLogger.ExecutionTrace(this);
try try
{ {
UnixFileSystemInfo sockFileInfo = new UnixFileInfo(socketFileName); UnixFileSystemInfo sockFileInfo = new UnixFileInfo(socketFileName);
UnixUserInfo sockFileOwner = sockFileInfo.OwnerUser; UnixUserInfo sockFileOwner = sockFileInfo.OwnerUser;
// check if ROOT is the owner of the file: /tmp/.novellCASA // check if ROOT is the owner of the file: /tmp/.novellCASA
if (sockFileOwner.UserId != 0) if (sockFileOwner.UserId != 0)
{ {
File.Delete(socketFileName); File.Delete(socketFileName);
} }
listeningSocket.Bind(sockEndPoint);
listeningSocket.Listen(50);
} }
catch(Exception e) catch(Exception e)
{ {
CSSSLogger.ExpLog(e.ToString()); CSSSLogger.ExpLog(e.ToString());
} }
while(true)
listeningSocket.Bind(sockEndPoint);
listeningSocket.Listen(50);
while(true)
{ {
try try
{ {