* Only allow raw sockets for root.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37843 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8e855d520a
commit
cb8adf5ed2
@ -1034,6 +1034,10 @@ ipv4_open(net_protocol* _protocol)
|
||||
{
|
||||
ipv4_protocol* protocol = (ipv4_protocol*)_protocol;
|
||||
|
||||
// Only root may open raw sockets
|
||||
if (geteuid() != 0)
|
||||
return B_NOT_ALLOWED;
|
||||
|
||||
RawSocket* raw = new (std::nothrow) RawSocket(protocol->socket);
|
||||
if (raw == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
Loading…
Reference in New Issue
Block a user