From owner-freebsd-questions Thu Aug 6 05:45:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA29815 for freebsd-questions-outgoing; Thu, 6 Aug 1998 05:45:02 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from cisco.it ([195.103.235.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA29790 for ; Thu, 6 Aug 1998 05:44:54 -0700 (PDT) (envelope-from A.Nati@cisco.it) Received: from cisco.cisco.it.cisco.it (portone.cisco.it [195.103.235.22]) by cisco.it (8.7.5/8.7.3) with SMTP id OAA17641; Thu, 6 Aug 1998 14:46:12 +0200 (MET DST) Message-Id: <3.0.1.32.19980806144443.006cd6f4@posta.cisco.it> X-Sender: cp011@posta.cisco.it X-Mailer: Windows Eudora Pro Version 3.0.1 (32) [I] Date: Thu, 06 Aug 1998 14:44:43 +0200 To: Brandon Lockhart From: Antonio Nati Subject: Re: system ("makemap") error... Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: References: <35C98180.41C67EA6@cisco.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In 08.02 06/08/98 -0400, hai scritto: >How are you SU'ing it to root? > The final errore code is shifted 8 bit, so it is 73 * 256 (73 = EX_CANTCREAT). Makemap contains a check on the output file ("/etc/virtusertable.db"). It checks if user may write to "/etc/virtusertable.db" (using getuid for user uid). In my case it decides it has not the correct uid. Changing the owner of "/etc/virtusertable.db" to httpd's uid makes all the joke work. Now I'm wondering about: 1) does "system ()" pass the su'ed uid to the executed command? 2) is it correct that makemap checks getuid and not instead geteuid? I would like to avoid to make too much chmode in the program. Tonino ----------------------------------------------------------------------- Antonio Nati Cisco Consulting S.r.l. A.Nati@cisco.it Divisione reti e telematica tel. 06 72990.419 Via G. Carmignani, 2 - 00173 Roma fax. 06 7230660 http://www.cisco.it ----------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message