Can install non classic snap with --classic, but classic flag isn't set

Bug #1668891 reported by Didier Roche-Tolomelli
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Medium
Unassigned
snapd (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Similarly as you can install confined snap in devmode via --devmode, I tried to do the same for a classic snap (definining confinement: strict).

The snap install successfully, but it's confined, not seeing the classic file system tree.
"snap list" confirms it.

If non classic snap aren't supposed to be installed in classic (which seems to be the case due to wrapper scripts being different in python for instance when the snap is a classic snap: https://github.com/snapcore/snapcraft/pull/1093/files#diff-6ddd7f2a83b2f307ff953c3fb60ae35dR256), snapd should prevents it.

Anyway, non classic snap shouldn't be installed using --classic silently in their default mode (strict/devmode)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: snapd 2.22.3
ProcVersionSignature: Ubuntu 4.4.0-64.85-generic 4.4.44
Uname: Linux 4.4.0-64-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Mar 1 09:29:34 2017
InstallationDate: Installed on 2012-05-28 (1737 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: snapd
UpgradeStatus: Upgraded to xenial on 2014-10-31 (851 days ago)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1668891] Re: Can install non classic snap with --classic, but classic flag isn't set

Good catch!

Changed in snappy:
status: New → Confirmed
Changed in snapd (Ubuntu):
importance: Undecided → High
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

๐Ÿ‘

Changed in snapd (Ubuntu):
importance: High → Medium
Leo Arias (elopio)
affects: snappy → snapd
Revision history for this message
Marc Peรฑa (pachulo) wrote :

Something weird is definitely going on in here.

I tried installing KeepassXC snap with "--classic" and even though the "list --all" shows this:

Name Version Rev Developer Notes
core 16-2 1441 canonical -
keepassxc 2.1.3 6 keepassxreboot -
...

Now the "/" that KeepassXC sees is the real one.

The problem is that, even then, I can't access NFS mounted directories.

Revision history for this message
Claudio Matsuoka (cmatsuoka) wrote :

@didrocks: installing a non-classic snap with --classic with current snapd issues the following warning. (Using --classic shouldn't override the package confinement, the flag is still ignored but not silently.)

$ snap install word-salad --classic
Warning: flag --classic ignored for strictly confined snap word-salad

word-salad 0.1 from Alan Pope ๐Ÿง (popey) installed

I'll close this bug as fix-released (this was addressed in 2.37), however if you feel this is not a proper solution please reopen.

@pachulo: I can't reproduce the situation you describe (strictly confined snap seeing the real /). If this is still an issue, please open a new bug and it will be investigated.

Changed in snapd:
status: Confirmed → Fix Released
Changed in snapd (Ubuntu):
status: Confirmed → Fix Released
Changed in snapd:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.