<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 22, 2016 at 11:14 PM, Sergio Schvezov <span dir="ltr"><<a href="mailto:sergio.schvezov@canonical.com" target="_blank">sergio.schvezov@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><span class=""><div><br><div class="gmail_extra"><br><div class="gmail_quote">El 19 dic. 2016 11:11 AM, "Alberto Donato" <<a href="mailto:alberto.donato@canonical.com" target="_blank">alberto.donato@canonical.com</a>> escribió:<br type="attribution"><blockquote class="m_-5132445674291611528quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm trying to create a snap for sshuttle, the ssh-based VPN app.</div><div>One of its components (the firewall manager) needs to either be run as root, or use su/sudo to be able to configure firewall rules.</div><div><br></div><div>The app uses an "if os.getuid() != 0" to check whether it can run.<br clear="all"></div><div><br></div><div>Is there any way to get it to work inside a snap?</div></div></blockquote></div></div></div><div dir="auto"><br></div></span><div dir="auto">Doesn't putting sudo in front of your command do the trick?</div></div></blockquote><div><br></div><div>Well that might work, but it would run all sshuttle components as root, while the application is designed to run just the firewall part as root.</div><div>I'd like to preserve this behavior.</div><div>My question, in general, is whether it's possible to set up sudo within a snap confinement so that certain commands can be run as root.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div>Alberto Donato | <a href="mailto:alberto.donato@canonical.com" target="_blank">alberto.donato@canonical.com</a></div><div><a href="https://launchpad.net/~ack" target="_blank">https://launchpad.net/~ack</a> | GPG: 2048R/9E2823B3</div></div>
</div></div>