Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 1997 21:08:26 +0200 (MET DST)
From:      Antonio Nati <A.Nati@cisco.it>
To:        freebsd-questions@FreeBSD.ORG
Subject:   unsecure dependency on adduser, seteuid
Message-ID:  <199704061908.VAA04279@cisco.it>

next in thread | raw e-mail | index | archive | help
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






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