From owner-freebsd-questions Sun Apr 6 11:09:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id LAA24030 for questions-outgoing; Sun, 6 Apr 1997 11:09:38 -0700 (PDT) Received: from cisco.it ([194.183.8.2]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA24010 for ; Sun, 6 Apr 1997 11:09:34 -0700 (PDT) Received: from pentium-120 (ppp-03.cisco.it [194.183.8.32]) by cisco.it (8.7.5/8.7.3) with SMTP id VAA04279 for ; Sun, 6 Apr 1997 21:08:26 +0200 (MET DST) Date: Sun, 6 Apr 1997 21:08:26 +0200 (MET DST) Message-Id: <199704061908.VAA04279@cisco.it> X-Sender: cp011@posta.cisco.it X-Mailer: Windows Eudora Light Version 1.5.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: freebsd-questions@FreeBSD.ORG From: Antonio Nati Subject: unsecure dependency on adduser, seteuid Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I'm trying to put in action a cgi program that would create a pop user automatically. That's what I'm doing: compile and chmod 6555 the cgi-program; execute the cgi program: search for a free pty; setuid (0); seteuid (0); fork; child: dup the pty (tty) to stdin, stdout, stderr child: execl ("adduser", "-batch", ...) master: read from pty and display HTML; master: continue with other operations... All is ok, execpt that adduser hangs on: Unsecure dependency in open at /usr/sbin/adduser line 1211 The error happens in the subroutine append_file, with /etc/master.passwd beeing the file that should be used by the routine. More, If I execute a non cgi-program with the same mechanisms inside, it works fine from root, but gives the same error if executed by other users (no matter of setuid, seteuid, chmod 6555, ecc.). Any suggestion? Tonino