socket-label: tweak socket_address_listen() a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Dec 2017 15:59:44 +0000 (16:59 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Jan 2018 12:55:08 +0000 (13:55 +0100)
commit706d7c27ad12098a44d83330eab1aef8f8ed12dc
tree6b85916543139934b059df7a4dc6321c8ea79c2a
parent294d46f138e67f9e1bfb18f5ec1b009a4a9d5292
socket-label: tweak socket_address_listen() a bit

This changes two things when binding to AF_UNIX file system sockets:

1. When wethe socket already exists in the fs, and unlink() on it fails,
   don't bother to bind() a second time: since nothing changed it won't
   work either.

2. Also use SELinux-aware bind() for the second attempt.
src/basic/socket-label.c