Classic confinement for safesurfer-desktop


#1

Hi there.

Trying to publish my snap on snapcraft, but getting this error:

Error:(NEEDS REVIEW) confinement ‘classic’ not allowed. If your snap needs classic confinement to function, please make a request for this snap to use classic by creating a new topic in the forum using the ‘store’ category and detail the technical reasons why classic is required.

My snap needs classic confinement, because it needs to change system DNS settings.
It edits /etc/resolv.conf (after backing it up).
I’ve got the page linked up to GitHub to auto-build if that means anything more.

Thanks!


#2

access to changing the resolver setup is included in the network-setup-control interface, did you try using that instead ?


#3

Thanks for the reply.

I’d prefer not to, as it requires netplan as a system dependency.
Changing DNS settings from /etc/resolv.conf is universal.


#4

This depends on how /etc/nsswitch.conf is configured. On many modern system you typically do not want to modify this file directly since systemd-resolvd is in use (as is the case for Ubuntu). For older systems that are Debian-based, it is still best that the file not be modified directly since resolvconf manages the file.

While it is true that there are no interfaces that allow writing resolv.conf, I would contend that this behavior is undesirable. Better would be to have an interface for using resolved’s DBus API. This would then also work on all-snaps systems.


#5

On many modern system you typically do not want to modify this file directly since systemd-resolvd is in use (as is the case for Ubuntu).

Yes that’s right, it does get overridden. That’s why I also make it immutable, so then systemd-resolvd cannot override it.

My software isn’t Ubuntu specific that’s why I’m requiring this method used.


#6

Are there any updates on this being on the store?


#7

@pedronis - can you weigh in on this? This does not seem to be a candidate for classic based on historical precedent, but you might have other thoughts.


#8

Ping - can you comment?


#9

Ping @pedronis - can you comment?


#10

It still seem that it would need to work within interfaces, and not get classic.


#11

Based on @pedronis comment, the requirements are understood and not granting classic.

Currently the network-control interface can be used to give access to resolvconf on systems that use it. If you need other functionality, please report back in a new topic on what specific accesses you need and we can work through interface improvements.