1 #ifndef RESTRICT_PROCESS_SIZE_H 2 #define RESTRICT_PROCESS_SIZE_H 3 4 #include <sys/time.h> 5 #ifdef HAVE_SYS_RESOURCE_H 6 # include <sys/resource.h> 7 #endif 8 9 /* Restrict max. process size. */ 10 void restrict_process_size(rlim_t bytes); 11 /* Restrict max. number of processes. */ 12 void restrict_process_count(rlim_t count); 13 /* Set fd limit to count. */ 14 void restrict_fd_limit(rlim_t count); 15 16 /* Get the core dump size limit. Returns 0 if ok, -1 if lookup failed. */ 17 int restrict_get_core_limit(rlim_t *limit_r); 18 /* Get the process VSZ size limit. Returns 0 if ok, -1 if lookup failed. */ 19 int restrict_get_process_size(rlim_t *limit_r); 20 /* Get the process count limit. Returns 0 if ok, -1 if lookup failed. */ 21 int restrict_get_process_limit(rlim_t *limit_r); 22 /* Get the fd limit. Returns 0 if ok, -1 if lookup failed. */ 23 int restrict_get_fd_limit(rlim_t *limit_r); 24 25 #endif 26