<div dir="ltr">Is this something that could be added to the roadmap?  We'd really prefer to not have to call the snap itself with sudo as it creates some permissions issues (root-owned dirs in $HOME for example) and some other general flakiness.  What would the sudo interface entail, just access to /usr/bin/sudo and /etc/sudoers.d/snap.mountpoint?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 8, 2016 at 5:27 AM, Oliver Grawert <span dir="ltr"><<a href="mailto:ogra@ubuntu.com" target="_blank">ogra@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi,<br>
<span class="">Am Montag, den 08.08.2016, 09:36 +0200 schrieb Simon Fels:<br>
> On 06.08.2016 15:54, Chris Wayne wrote:<br>
> ><br>
> > Hi guys,<br>
> ><br>
> > I seem to be having some issues while running anything as sudo from<br>
> > within a <br>
> > snap (namely bug <a href="https://bugs.launchpad.net/ubuntu/+source/snapd/+b" rel="noreferrer" target="_blank">https://bugs.launchpad.net/<wbr>ubuntu/+source/snapd/+b</a><br>
> > ug/1610292).  <br>
> If you package sudo within your snap snapcraft will strip the<br>
> necessary<br>
> suid bit from it so it wont work anymore. Only way to use sudo is to<br>
> use<br>
> the one from the core snap.<br>
><br>
</span>how would you hook into /etc/sudoers (or /etc/sudoers.d/) ? <br>
snapd would have to install or bind-mount a sudoers file above the one<br>
from the core snap ... you also need to make sure that your user exists<br>
in the password db ... both gets very hairy in an all-snap image where<br>
the core snap is actually the rootfs (and both of the above files are<br>
required for having the system functional)<br>
<br>
i could imagine a sudo interface here (for the binary) and shipping a<br>
generic /etc/sudoers.d/snapd mountpoint in the core snap where<br>
snapd/snap-confine could bind-mount a shipped sudoers snippet, but that<br>
still leaves the passwd db issue open...<br>
<br>
ciao<br>
        oli<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></div>