From owner-freebsd-isdn Tue Feb 13 7:17:57 2001 Delivered-To: freebsd-isdn@freebsd.org Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by hub.freebsd.org (Postfix) with ESMTP id 0028037B491 for ; Tue, 13 Feb 2001 07:17:53 -0800 (PST) Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout0.freenet.de with esmtp (Exim 3.22 #1) id 14ShDE-00086B-00; Tue, 13 Feb 2001 16:17:52 +0100 Received: from b81bd.pppool.de ([213.7.129.189] helo=Magelan.Leidinger.net) by mx2.freenet.de with esmtp (Exim 3.22 #1) id 14ShDD-0006rA-00; Tue, 13 Feb 2001 16:17:52 +0100 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.11.2/8.11.2) with ESMTP id f1DCkYu03854; Tue, 13 Feb 2001 13:46:35 +0100 (CET) (envelope-from netchild@Leidinger.net) Message-Id: <200102131246.f1DCkYu03854@Magelan.Leidinger.net> Date: Tue, 13 Feb 2001 13:46:32 +0100 (CET) From: Alexander Leidinger Subject: Re: Software for start a "ifconfig isp0 up" on the server To: mpasini@club-internet.fr Cc: freebsd-isdn@FreeBSD.ORG In-Reply-To: <20010213114454.A470@earth.domtek.fr> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 13 Feb, Matthieu Pasini wrote: > Hi all, > I would like to let all my family to be able connect to the Internet with my server running FreeBSD and I4B( it's running well). > Well, all the family is using computers under Win98 and i don't want to leave the "auto-connection" on on my server ... > So i just wanna know if something has already made a soft which run a "ifconfig isp0 up" on the server, or if there is another solution. > I thought about a web solution but i have problems with permissions on ifconfig ;( ---snip--- #include #include #include int main(int argc, char *argv[]) { if(setreuid(0, 0) == -1) { perror("setreuid"); exit(1); } return system("/sbin/ifconfig isp0 up"); }; /* *** EOF *** */ ---snip--- Don't use any user supplied data for the system(3) call (everything will be interpreted by /bin/sh)! Just make the executable SUID root to be able to let everyone (with access to the executable) issue an "ifconfig isp0 up". Don't forget to protect your internal webserver from access from the outside. Bye, Alexander. -- Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message