Changeset 699

Show
Ignore:
Timestamp:
11/11/06 10:20:15 (2 years ago)
Author:
common
Message:

nepenthes

  • Nepenthes, add raw sockets & net admin to capabilities
  • Socket, include time.h (uclibc fix)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/nepenthes-core/src/Nepenthes.cpp

    r655 r699  
    12201220        // set caps 
    12211221        cap_t caps = cap_init(); 
    1222         cap_value_t capList[4] = 
     1222        cap_value_t capList[6] = 
    12231223        {  
    12241224                CAP_SYS_CHROOT,                 // chroot() 
    12251225                CAP_NET_BIND_SERVICE,   // bind() ports < 1024  
    12261226                CAP_SETUID,                     // setuid() 
    1227                 CAP_SETGID                              // setgid() 
     1227                CAP_SETGID,                             // setgid() 
     1228                CAP_NET_RAW,                    // pcap 
     1229                CAP_NET_ADMIN                   // route 
    12281230        }; 
    12291231 
    1230         unsigned num_caps = 4
     1232        unsigned num_caps = 6
    12311233 
    12321234        cap_set_flag(caps, CAP_EFFECTIVE,       num_caps, capList, CAP_SET); 
  • nepenthes/trunk/nepenthes-core/src/Socket.cpp

    r593 r699  
    3131#include <sstream> 
    3232 
    33 #ifdef WIN32 
    3433#include <time.h> 
    35 #else 
    36      #include <sys/types.h> 
    37      #include <sys/socket.h> 
    38      #include <netinet/in.h> 
    39      #include <arpa/inet.h> 
    40 #endif 
     34 
     35#include <sys/types.h> 
     36#include <sys/socket.h> 
     37#include <netinet/in.h> 
     38#include <arpa/inet.h> 
    4139 
    4240#include "Socket.hpp"