socket-util: add sockaddr_un_set_path() helper
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Oct 2018 16:02:30 +0000 (18:02 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Oct 2018 17:35:00 +0000 (19:35 +0200)
commit5cf91ea9c858fca03983c96932c886497953603e
treea8448b157f66c3eb02006ec923e3ef48549d5910
parent44ed5214add7b2c1048a9b8e6ca8cb99505a78eb
socket-util: add sockaddr_un_set_path() helper

Properly initializing sun_path from foreign data is not easy, given the
size constraints, and NUL confusion. Let's add a helper function for
this.
src/basic/socket-util.c
src/basic/socket-util.h