Patches sent by India based on Security review.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user