Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
cloooned
Posts: 5
Registered: ‎01-11-2013
My Device: None

Packet Filter: /dev/pf permission denied

Hi

 

I found this very useful documentation of packet filtering in BB10. The problem is now, how do I gain O_RDWR access to the /dev/pf device? I noticed there is no su or root profile available?

 

Regards,

Cloooned

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Packet Filter: /dev/pf permission denied

It's extremely unlikely that access to this is exposed to our apps. Where did you find this documentation?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
cloooned
Posts: 5
Registered: ‎01-11-2013
My Device: None

Re: Packet Filter: /dev/pf permission denied

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Packet Filter: /dev/pf permission denied

The documentation comes from QNX, which is used widely outside of BB10, so what you see there sometimes covers things which are not available to third-party apps running on BB10.

 

In this case, check the permissions of the device in question:

 

$ ls -l /dev/pf
nrw-rw----   1 root      nto               0 Jan 18 09:45 /dev/pf

Owned by root, r/w access from the nto group, neither of which is anything we can get at.

 

If there is some documented API that explicitly says a BB10 app can use it to access the PF stuff, or if you can find a command line utility that's got "world" executable executable permissions, then you could use that. I'm 99.5% sure you won't find it as this is the sort of thing that's tightly controlled in BB10 to preserve the system security.

 

I'm equally confident you'd see it covered by a "restricted app permission" and since I see no such permission listed, I think you can give up on this possibility.

 

If you have a need for it (and unless someone tells us I'm wrong about this), you could file a Feature Request in the Jira issue tracker describing your use case.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!