sergiusens / snapcraft-preload

Use smart preloading in your snaps to avoid hard coded parts that would fail security.
12 stars 20 forks source link

connect, bind: don't try to redirect abstract sockets #5

Closed 3v1n0 closed 7 years ago

3v1n0 commented 7 years ago

If sun_path[0] == '\0', then we're handling an abstract socket and its path has not a direct connection with filesystem, thus we should not try to redirect it.

Without this it's impossible to use preload in X apps as they won't be able to connect to /tmp/.X11-unix/X0 abstract socket

3v1n0 commented 7 years ago

@kyrofa I've addressed your comments...

3v1n0 commented 7 years ago

Ouch pushed to this again as I forgot a PATH_MAX - 1, please @kyrofa reapprove this if you think it's fine

kyrofa commented 7 years ago

please @kyrofa reapprove this if you think it's fine

Indeed, +1.

3v1n0 commented 7 years ago

@sergiusens to you the merge powers, so that we can use this for the nextcloud-client and get rid of some paths workarounds ;-)