Closed farshidtz closed 1 year ago
The default path for the socket and lock files are at /run/openthread-wpan0.*. The snap has no access to these files, so an interface is defined to grant this access on demand: https://github.com/canonical/openthread-border-router-snap/blob/db2c1fb4ae615e1c01a3f7045d25dbb001c1ccef/snap/snapcraft.yaml#L34-L38
/run/openthread-wpan0.*
However, when the wpan interface name is different, a more open interface needs to be used, giving access to the whole /run directory on the host: https://github.com/canonical/openthread-border-router-snap/blob/db2c1fb4ae615e1c01a3f7045d25dbb001c1ccef/snap/snapcraft.yaml#L39-L42
/run
A better workaround is to change the base path. This can be done at compile time, as suggested by @prash813:
-DOT_CFLAGS=-DOPENTHREAD_POSIX_CONFIG_DAEMON_SOCKET_BASENAME=\"/tmp/openthread-%s\""
The default path for the socket and lock files are at
/run/openthread-wpan0.*
. The snap has no access to these files, so an interface is defined to grant this access on demand: https://github.com/canonical/openthread-border-router-snap/blob/db2c1fb4ae615e1c01a3f7045d25dbb001c1ccef/snap/snapcraft.yaml#L34-L38However, when the wpan interface name is different, a more open interface needs to be used, giving access to the whole
/run
directory on the host: https://github.com/canonical/openthread-border-router-snap/blob/db2c1fb4ae615e1c01a3f7045d25dbb001c1ccef/snap/snapcraft.yaml#L39-L42A better workaround is to change the base path. This can be done at compile time, as suggested by @prash813: