From owner-freebsd-net@FreeBSD.ORG Tue May 16 18:39:29 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 70D5616B28D for ; Tue, 16 May 2006 18:39:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BC1943D46 for ; Tue, 16 May 2006 18:39:24 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.19.131]) ([10.251.19.131]) by a50.ironport.com with ESMTP; 16 May 2006 11:39:25 -0700 Message-ID: <446A1C5C.5040105@elischer.org> Date: Tue, 16 May 2006 11:39:24 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Brueffer References: <200605161420.16557.markus@brueffer.de> In-Reply-To: <200605161420.16557.markus@brueffer.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Netgraph: node and type list without root privileges X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2006 18:39:38 -0000 Markus Brueffer wrote: >Hi all, > >is it possible to somehow obtain a list of nodes of a specific type without >root privileges? > >Background: I need this in order to do autodetection of hci nodes (port of >kde-bluetooth and new libhci) from a regular user account. > >Thanks for your time, > >Markus > > > no, as it takes an ng_socket, and the VERY FIRST thing that is done when creating an ng_socket is: if (suser(td)) return (EPERM); There is no distiguishing between message types so once you can send a message (how ngctl gets the info) you can do anything.. it's an "all or nothing" thing. We COULD implement an net.graph.nodes sysctl that dumps out the current graph however.. But it's require someone willing to spend the time to do it.