<div dir="ltr">Hi everyone,<div><br></div><div>Been playing a bit creating simple snappy apps, services and reading about AppArmor over the weekend. Here're some thoughts:</div><div><ul><li>Creating snaps is super easy. This would encourage many users to jump over snappy quickly. I quite like it.</li><li>Hardware access in snaps is still not ready (please point out otherwise) but can be bypassed manually by launching systemd services (root/sudo needed). Example <a href="https://github.com/erlerobot/erle-apm-copter.erle">here</a>.</li><li>I have not been able to use AppArmor appropriately and some help might be appreciated. <br>I started creating a <i><a href="https://github.com/erlerobot/erle-apparmor.erle">simple snap</a> that writes the date in a <b>/home/ubuntu/date.txt</b></i> file. This seems to require special permissions so i tried using the <a href="https://github.com/erlerobot/erle-apparmor.erle/blob/master/meta/package.yaml#L8">unconfined template</a> which didn't allow me neither:</li></ul><div>
<p class=""><i><font color="#38761d"><span class="">ubuntu@localhost</span><span class="">:</span><span class="">~</span><span class="">$ <a href="http://erle-apparmor.erle.script.sh">erle-apparmor.erle.script.sh</a> </span></font></i></p>
<p class=""><span class=""><i><font color="#38761d">/apps/erle-apparmor.erle/1.0/src/script.sh: line 3: /home/ubuntu/date.txt: Permission denied</font></i></span></p>
<p class=""><span class=""><i><font color="#38761d">date: Thu Feb 19 17:32:45 UTC 2015 printed to file</font></i></span></p></div></div><div>I kept trying hand-modifiying <b>/var/lib/apparmor/profiles/click_erle-apparmor.erle_script.sh_1.0</b> and adding something like:</div><div><br></div><div>
<p class=""><span class=""><i><font color="#38761d"> # Writable area</font></i></span></p>
<p class=""><span class=""><i><font color="#38761d"> owner /home/ubuntu/ w,</font></i></span></p></div>
<div>Which didn't work either. Could anyone point out how could i re-write the snap so that it can write in /home/ubuntu directory? I presume accessing hardware abstractions/files (e.g.: GPIOs) would be pretty much the same, right?</div><div><br></div><div><br></div><div><br></div><div>While going through AppArmor and the <a href="https://wiki.ubuntu.com/SecurityTeam/Specifications/SnappyConfinement">SnappyConfinement</a> articles and i noted that the last 2 link of the Introduction point to somewhere they should not.</div><div><br></div><div>Jamie or whoever maintains the docs might like to modify it.</div><div>Cheers,</div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>Víctor Mayoral Vilches</b><div>CTO & Co-Founder</div><div><br></div><div><img src="http://erlerobotics.com/blog/wp-content/uploads/2014/10/erle_corporativo_5.0_72px_nobackground.png" width="96" height="96"><br></div><div><br></div><div><b>Erle Robotics</b></div><div><a href="http://erlerobotics.com" target="_blank">erlerobotics.com</a> | <a href="mailto:victor@erlerobot.com" target="_blank">victor@erlerobot.com</a></div><div>+34 616151561<br></div><div><i>skype</i>: v.mayoral<br></div><div><br></div></div></div></div></div></div></div></div></div></div>
</div></div>