Netgraph: node and type list without root privileges

Julian Elischer julian at elischer.org
Tue May 16 18:39:38 UTC 2006


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.




More information about the freebsd-net mailing list