shughes
October 17, 2019, 10:12am
1
Hi. I’m new to the snap world, and have been trying to package a Qt5 application that uses arp-scan to scan a network to find a specific device. It works find when I build a binary and run it on Laptop/Desktop/Pi but when I snap it, the arp-scan doesn’t seem to work. I’ve tried running the snap as sudo (don’t know if this makes a difference).
What do I need to do to run a system call as root in a snap?
Thanks in advance.
ogra
October 17, 2019, 10:23am
2
install the snappy-debug
snap and use “snappy-debug.scanlog”, that will make suggestions about what interfaces to use or how to change your application …
popey
October 17, 2019, 10:24am
3
What interfaces have you specified?
I note another application which sounds like it does similar things to yours might list some interfaces that you’re missing?
alan@KinkPad-K450:~$ snap connections netdiscover-ondra
Interface Plug Slot Notes
bluetooth-control netdiscover-ondra:bluetooth-control - -
network netdiscover-ondra:network :network -
network-bind netdiscover-ondra:network-bind :network-bind -
network-control netdiscover-ondra:network-control - -
network-observe netdiscover-ondra:network-observe - -
network-setup-observe netdiscover-ondra:network-setup-observe - -
shughes
October 17, 2019, 10:32am
4
Thanks for quick replies!!
@popey These are the interfaces I’ve specified:
sion@sion-ThinkPad-E595: snap connections visnetreg
Interface Plug Slot Notes
home visnetreg:home :home -
network visnetreg:network :network -
network-bind visnetreg:network-bind :network-bind -
network-control visnetreg:network-control - -
network-observe visnetreg:network-observe - -
network-setup-observe visnetreg:network-setup-observe - -
unity7 visnetreg:unity7 :unity7 -
@ogra I ran the snappy-debug.scanlog and all looks sensible in there… Only denials are on ‘fsetid’ - not sure if this is an issue?
ogra
October 17, 2019, 10:46am
5
these three are not connected to a slot
note that security critical interfaces do not auto-connect, you need to use snap connect
to make actual use of them …
shughes
October 17, 2019, 10:56am
6
Good spot!
Connected manually… still no luck.
My bad… I didn’t have the arp-scan package set under stage-packages!! It was never going to work.
Thanks @ogra and @popey for your help, I certainly learnt something from your assistance.