freebsd-ports/www/monkey/files/patch-users.c
Pav Lucistnik 56ff16ada7 Add Monkey HTTP Daemon, a small, powerful, and fast Web server written in C.
Features include language support, GET, POST, and HEAD methods, CGI, PHP4 , a
config file (optional for every user), a mime.types file, virtual hosts, the
ability to deny URLs and IPs, to run as a different user (such as nobody),
serve users home directories, resume, and more.

PR:		ports/58290
Submitted by:	Clement Laforet <sheepkiller@cultdeadsheep.org>
2003-12-05 20:48:42 +00:00

19 lines
552 B
C

--- src/user.c.orig Sat Oct 18 22:21:54 2003
+++ src/user.c Mon Oct 20 17:26:55 2003
@@ -23,6 +23,7 @@
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
+#include <sys/time.h>
#include <sys/resource.h>
#include "monkey.h"
@@ -79,7 +80,7 @@
/* Just if i'm superuser */
rl.rlim_max= (256 * config->maxclients);
rl.rlim_cur = rl.rlim_max;
- setrlimit( RLIMIT_OFILE, &rl );
+ setrlimit( RLIMIT_NOFILE, &rl );
/* Chequear si existe el usuario USER ... */
if ((usr = getpwnam( config->user )) == NULL) {