Fix erronous socket filename

This commit is contained in:
Stephen Seo 2023-08-13 14:28:17 +09:00
parent d5a057a685
commit 718cc24648
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ int main(int argc, char **argv) {
char socket_filename[108];
snprintf(socket_filename, sizeof(socket_filename),
UNIX_SOCKET_HANDLER_SOCKET_FMT_STRING, getenv("HOME"));
UNIX_SOCKET_HANDLER_SOCKET_FMT_STRING, getenv("USER"));
struct sockaddr_un addr;
int ret;

View file

@ -115,7 +115,7 @@ void init_unix_socket_handler(UnixSocketHandler *handler) {
memset(handler, 0, sizeof(UnixSocketHandler));
snprintf(handler->socket_filename, sizeof(handler->socket_filename),
UNIX_SOCKET_HANDLER_SOCKET_FMT_STRING, getenv("HOME"));
UNIX_SOCKET_HANDLER_SOCKET_FMT_STRING, getenv("USER"));
umask(S_IRWXO);