Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Apr 2002 18:48:13 -0500 (EST)
From:      "Philip M. Gollucci" <philip@sduwebship.student.umd.edu>
To:        Roger Williams <rogerw1962@hotmail.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: freebsd and suexec
Message-ID:  <20020411184724.Y14766-100000@sduwebship.student.umd.edu>
In-Reply-To: <F197p69viM0jB06F2LP00005c9d@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Me thinks you need -lutil like the FBSD manpage says on the compile line.
That would make sense with the compile error as well since it doesn't say
implicit function blah blah.


END
------------------------------------------------------------------------------
Philip M. Gollucci (p6m7g8) philip@p6m7g8.com 301.314.3118 301.646.3011

Science, Discovery, & the Universe (UMCP)
        Webmaster & Webship Teacher
        URL: http://www.sdu.umd.edu

EJournalPress.com
        Database/PERL Programmer & System Admin
        URL : http://www.ejournalpress.com

Homepage    : http://p6m7g8.com
Resume      : http://p6m7g8.com/Work/index.html
Software    : http://p6m7g8.com/Developement/



On Fri, 12 Apr 2002, Roger Williams wrote:

> Hello,
> Im trying to get suexec to work with "/etc/login.conf classes" limits and
> have applied many
> patches and everyone returns something similar to the error below.  Im
> runing
> or trying to run apache 1.3.23, can anyone tell me what is going on or what
> I'm doing wrong?
> 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>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020411184724.Y14766-100000>