From owner-freebsd-net Mon Dec 2 2:10:32 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BF9037B401 for ; Mon, 2 Dec 2002 02:10:30 -0800 (PST) Received: from smtp.uc3m.es (smtp03.uc3m.es [163.117.136.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id A52D343EBE for ; Mon, 2 Dec 2002 02:10:29 -0800 (PST) (envelope-from jrh@it.uc3m.es) Received: from smtp03.uc3m.es (localhost [127.0.0.1]) by smtp.uc3m.es (Postfix) with ESMTP id DB94B4319B for ; Mon, 2 Dec 2002 11:10:28 +0100 (CET) Received: from it.uc3m.es (zangano.it.uc3m.es [163.117.140.41]) by smtp03.uc3m.es (Postfix) with ESMTP id CC89599E30 for ; Mon, 2 Dec 2002 11:10:28 +0100 (CET) Message-ID: <3DEB3194.6C6AA674@it.uc3m.es> Date: Mon, 02 Dec 2002 11:10:28 +0100 From: Juan Francisco Rodriguez Hervella X-Mailer: Mozilla 4.74 [es] (X11; U; Linux 2.4.18 i686) X-Accept-Language: en MIME-Version: 1.0 Cc: freebsd-net@FreeBSD.ORG Subject: Re: Sysctl and root privileges, how could I avoid them ? References: <3DE7A145.18986834@it.uc3m.es> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi: I'm thinking in implement a new system call to make my stuff... is it very difficult ? Could you point me to any guide/boot/whatever to learn about it ? Thanks again. JINMEI Tatuya / $B?@L@C#:H(B escribió: > > >>>>> On Fri, 29 Nov 2002 18:17:57 +0100, > >>>>> Juan Francisco Rodriguez Hervella said: > > > I'm implementing a modification in the > > file "getaddrinfo.c", which calls a sysctlbyname > > function, but the problem is that > > this sysctlbyname function call requires "root" privileges. > > > But I can not expect all the programs linked to > > libinet6 (where getaddrinfo is used) to be executed as root ! > > Perhaps your code tries the write operation of sysctl, in which case > the super user privilege is required by default. If your goal can be > achieved without a write operation, the easiest way would be to just > avoid the write. If you really need a write operation for every user, > you may probably have to reconsider the library design. Since sysctl > tends to affect fundamental behavior of kernel, the required privilege > is basically reasonable and should not be overridden as an easy > compromise. > > JINMEI, Tatuya > Communication Platform Lab. > Corporate R&D Center, Toshiba Corp. > jinmei@isl.rdc.toshiba.co.jp > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- JFRH. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message