gopaste example fails because sqlite tries to chown

Bug #1534802 reported by Leo Arias
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Won't Fix
Low
Leo Arias

Bug Description

The gopaste service from the snapcraft example doesn't work. With snappy-debug it shows that:

sysctl: permission denied on key 'kernel.printk_ratelimit'
= Seccomp =
Time: Jan 15 19:12:58
Log: auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1142 comm="gopasted" exe="/snaps/gopaste.sideload/IKNPLdMMXNPK/bin/gopasted" sig=31 arch=c000003e 93(fchown) compat=0 ip=0x7f801d9a9467 code=0x0
Syscall: fchown
Suggestions:
* don't copy ownership of files (eg, use 'cp -r --preserve=mode' instead of 'cp -a')
* adjust program to not use 'fchown'

<jdstrand> elopio: you can't use the chown family of syscalls because of two things: we don't have per-app uids so the chown doesn't make sense under most cases, and for those cases that do make sense, we need syscall argument filtering
<jdstrand> put more simply, do what it suggested and adjust to not use chown
<jdstrand> the hope is we'll have argument filtering for seccomp and can loosen that up a bit
<jdstrand> for 16.04
<elopio> hum, the chown seems to come from here: https://raw.githubusercontent.com/mattn/go-sqlite3/master/code/sqlite3-binding.c
<sergiusens> elopio, sqlite is not going to work without patching

Revision history for this message
Leo Arias (elopio) wrote :

<sergiusens> elopio, oh, for gopasted we can use the security-override and add fchown to the valid syscalls
Workaround: https://github.com/ubuntu-core/snapcraft/pull/237

Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: New → Triaged
importance: Undecided → Low
Leo Arias (elopio)
Changed in snapcraft:
milestone: none → 2.7
assignee: nobody → Leo Arias (elopio)
Leo Arias (elopio)
Changed in snapcraft:
milestone: 2.7 → none
Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

We do not carry these examples anymore

Changed in snapcraft:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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