Patches sent by India based on Security review.

This commit is contained in:
Jim Norman
2006-04-06 20:09:26 +00:00
parent 861619e231
commit b2b5903126
7 changed files with 816 additions and 686 deletions

View File

@@ -48,9 +48,25 @@ namespace Novell.CASA.MiCasa.Communication
SocketType.Stream,
ProtocolType.IP );
if (mSocket == null) throw new Exception("could not get socket");
sockEndPoint = new UnixEndPoint(socketFileName);
mSocket.Connect(sockEndPoint);
if (mSocket == null)
{
throw new Exception("could not get socket");
}
sockEndPoint = new UnixEndPoint(socketFileName);
UnixFileSystemInfo sockFileInfo = new UnixFileInfo(socketFileName);
UnixUserInfo sockFileOwner = sockFileInfo.OwnerUser;
// root is the owner of the file "/tmp/.novellCASA"
if (sockFileOwner.UserId == 0)
{
mSocket.Connect(sockEndPoint);
}
else
{
throw new Exception("not a valid miCASA service");
}
}
public int Read(byte[] buf)