You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Roger Williams <ro...@roger.jp> on 2002/04/12 06:01:18 UTC

Has anybody.......?

Hello,
 Im trying to get suexec to work with "class" limits and have applied many
patches and everone returns something similar to the error below.  Im runing
or trying to run apache 1.1.23, can anyone tell me what is going on?
PLEASE!!!!!!!!!!!!!


Thanks,
Roger

<PATCH>
+++ suexec.c    Mon Sep  6 21:47:33 1999
@@ -75,6 +75,7 @@
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <login_cap.h>

 #include <stdarg.h>

@@ -250,6 +251,7 @@
     char *cmd;                 /* command to be executed    */
     char cwd[AP_MAXPATH];      /* current working directory */
     char dwd[AP_MAXPATH];      /* docroot working directory */
+    login_cap_t *lc;           /* user resource limits      */
     struct passwd *pw;         /* password entry holder     */
     struct group *gr;          /* group entry holder        */
     struct stat dir_info;      /* directory info holder     */
@@ -401,6 +403,19 @@
     if ((gid == 0) || (gid < GID_MIN)) {
	log_err("cannot run as forbidden gid (%d/%s)\n", gid, cmd);
	exit(108);
+    }
+
+    /*
+     * Apply user resource limits based on login class.
+     */
+    if ((lc = login_getclassbyname(pw->pw_class, pw)) == NULL) {
+	log_err("failed to login_getclassbyname()\n");
+	exit(109);
+    }
+
+    if ((setusercontext(lc, pw, uid, LOGIN_SETRESOURCES)) != 0) {
+	log_err("failed to setusercontext()\n");
+	exit(109);
     }

     /*

</PATCH>


<ERROR>
gcc -c  -I../os/unix -I../include   -funsigned-char -DUSE_EXPAT -I../lib/exp
at-lite -DNO_DL_NEEDED `../apaci` suexec.c
gcc  -funsigned-char -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED
`../apaci` -o suexec   -L../os/unix -L../ap suexec.o -lm -lap -los  -lcrypt
suexec.o: In function `main':
suexec.o(.text+0x7b1): undefined reference to `login_getclassbyname'
suexec.o(.text+0x7fd): undefined reference to `setusercontext'
*** Error code 1

</ERROR>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org