Hello All,
We are using wifi-ap.config command from the wifi-ap snap package. This command works fine in a normal shell. But in the snap’s shell, below is the error message which is displayed.
wifi-ap.config get
bash: /usr/lib/command-not-found: Permission denied
Also below are error logs collected from syslogs,
kernel: [ 4706.232754] audit: type=1400 audit(1554202457.869:4021): apparmor="DENIED" operation="exec" profile="snap.testing" name="/usr/bin/snap" pid=25503 comm="bash" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
kernel: [ 4706.234209] audit: type=1400 audit(1554202457.873:4022): apparmor="DENIED" operation="open" profile="snap.testing" name="/usr/bin/snap" pid=25503 comm="bash" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
I would like to know how to access this command inside the snap.
Thanks in advance!.
In the snap environment you’ll have to run the exact command specified in the apps._app_name_.command_
property in the recipe.
Additional launcher stacking may also apply, as long as the recipe didn’t use the command-chain
feature.
UPDATE: Superseded by the topic reply: https://forum.snapcraft.io/t/accessing-wifi-ap-inside-snap/10693/3
yes, $SNAP/command-config.wrapper
should work, as @Lin-Buo-Ren says.
1 Like
Hello @Lin-Buo-Ren,
FYI, the snap which i need to access is not in my snap. I shall need to access an another snap(wifi-ap) inside my snap.
you can’t do that, unless your snap uses classic confinement.
1 Like
Hello @chipaca,
Thanks for the quick replies.
My snap should be shipped with strict confinement.
Is there any other way to do that? Ex: via snap sockets?
You’ll have to somehow incorporate the software the wifi-ap snap provides into your snap recipe if your snap needs access to it.
Only if the wifi-ap
snap exposes such things, and you also know how to exploit it.
@Lin-Buo-Ren,
Since my snap should strict with a strict confinement, Is it possible to incorporate the software wifi-ap into my snap.
If yes, shall i know how to make this achieve.!
Check out the recipe of the wifi-ap
snap and port the parts required to your’s.
@Lin-Buo-Ren,
Below is the link for the yaml file of wifi-ap.
Link - wifi-ap_snapcraft.yaml
I hope some socket based code they have used in the slots. Since I’m a newbie, correct me if I’m wrong.
So, is it possible to talk with the snap sockets for this snap?
I’d suggest you ask the snap’s maintainers.
1 Like