diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-06-05 14:25:18 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-06-05 14:25:18 +0000 |
commit | 2c2aa04c4519ed77a81cae8d62951c40fdd3bee5 (patch) | |
tree | 5b19df490463cc873f3ce30f11623201d61243f4 /www/apache13-modperl/files/patch-bb | |
parent | - Sync pkg-descr with reality. (diff) |
Add apache13-modperl, an Apache web server with mod_perl statically compiled in.
PR: ports/67051
Submitted by: Rod Taylor <ports@rbt.ca>
Notes
Notes:
svn path=/head/; revision=110888
Diffstat (limited to 'www/apache13-modperl/files/patch-bb')
-rw-r--r-- | www/apache13-modperl/files/patch-bb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/www/apache13-modperl/files/patch-bb b/www/apache13-modperl/files/patch-bb new file mode 100644 index 000000000000..313c5f515759 --- /dev/null +++ b/www/apache13-modperl/files/patch-bb @@ -0,0 +1,60 @@ +--- src/support/suexec.c.orig Wed Mar 5 18:50:29 2003 ++++ src/support/suexec.c Fri Jul 18 18:09:56 2003 +@@ -90,6 +90,9 @@ + #include <sys/types.h> + + #include <stdarg.h> ++#ifdef LOGIN_CAP ++#include <login_cap.h> ++#endif + + #include "suexec.h" + +@@ -322,6 +325,9 @@ + #ifdef LOG_EXEC + fprintf(stderr, " -D LOG_EXEC=\"%s\"\n", LOG_EXEC); + #endif ++#ifdef LOGIN_CAP ++ fprintf(stderr, " -D LOGIN_CAP\n"); ++#endif + #ifdef SAFE_PATH + fprintf(stderr, " -D SAFE_PATH=\"%s\"\n", SAFE_PATH); + #endif +@@ -480,7 +486,28 @@ + + /* + * Change UID/GID here so that the following tests work over NFS. +- * ++ */ ++ ++#ifdef LOGIN_CAP ++ /* ++ * Set user context (resources, priority and grouplist). ++ * If unsuccessful, error out. ++ */ ++ if (setusercontext(NULL, pw, uid, LOGIN_SETRESOURCES | LOGIN_SETPRIORITY | ++ LOGIN_SETGROUP | LOGIN_SETLOGIN) == -1) { ++ log_err("emerg: failed to set user context (%ld: %s)\n", uid, cmd); ++ exit(108); ++ } ++ ++ /* ++ * Set gid to the target group. If unsuccessful, error out. ++ */ ++ if ((setgid(gid)) != 0) { ++ log_err("emerg: failed to setgid (%ld: %s)\n", gid, cmd); ++ exit(109); ++ } ++#else /* !LOGIN_CAP */ ++ /* + * Initialize the group access list for the target user, + * and setgid() to the target group. If unsuccessful, error out. + */ +@@ -488,6 +515,7 @@ + log_err("emerg: failed to setgid (%ld: %s)\n", gid, cmd); + exit(109); + } ++#endif /* LOGIN_CAP */ + + /* + * setuid() to the target user. Error out on fail. |