From owner-freebsd-questions Thu Apr 11 21:44:29 2002 Delivered-To: freebsd-questions@freebsd.org Received: from sduwebship.student.umd.edu (sduwebship.student.umd.edu [129.2.156.15]) by hub.freebsd.org (Postfix) with ESMTP id B0F3E37B400 for ; Thu, 11 Apr 2002 21:44:21 -0700 (PDT) Received: from localhost (philip@localhost) by sduwebship.student.umd.edu (8.11.6/8.11.6) with ESMTP id g3BNmJ715103; Thu, 11 Apr 2002 18:48:19 -0500 (EST) (envelope-from philip@sduwebship.student.umd.edu) Date: Thu, 11 Apr 2002 18:48:13 -0500 (EST) From: "Philip M. Gollucci" To: Roger Williams Cc: questions@FreeBSD.ORG Subject: Re: freebsd and suexec In-Reply-To: Message-ID: <20020411184724.Y14766-100000@sduwebship.student.umd.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 > > > +++ suexec.c Mon Sep 6 21:47:33 1999 > @@ -75,6 +75,7 @@ > #include > #include > #include > +#include > > #include > > @@ -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); > } > > /* > > > > > > 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 > > > > > _________________________________________________________________ > 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