You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -33,6 +33,12 @@ using System.Net.Sockets;
|
||||
|
||||
namespace Mono.Unix
|
||||
{
|
||||
internal struct PeerCredData {
|
||||
public int pid;
|
||||
public int uid;
|
||||
public int gid;
|
||||
}
|
||||
|
||||
public class PeerCred
|
||||
{
|
||||
/* Make sure this doesn't clash with anything in
|
||||
@@ -40,14 +46,14 @@ namespace Mono.Unix
|
||||
* runtime
|
||||
*/
|
||||
private const int so_peercred=10001;
|
||||
private Mono.Posix.PeerCredData data;
|
||||
private PeerCredData data;
|
||||
|
||||
public PeerCred (Socket sock) {
|
||||
if (sock.AddressFamily != AddressFamily.Unix) {
|
||||
throw new ArgumentException ("Only Unix sockets are supported", "sock");
|
||||
}
|
||||
|
||||
data = (Mono.Posix.PeerCredData)
|
||||
data = (PeerCredData)
|
||||
sock.GetSocketOption (SocketOptionLevel.Socket, (SocketOptionName)so_peercred);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user