1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-27 12:16:22 +03:00

Support connecting to other users sessions by using <user>/<session>

This commit is contained in:
Maxime Coste 2016-01-20 22:58:39 +00:00
parent 2bc24d6889
commit 99b4dc9929

View File

@ -415,6 +415,9 @@ static sockaddr_un session_addr(StringView session)
{
sockaddr_un addr;
addr.sun_family = AF_UNIX;
if (find(session, '/')!= session.end())
format_to(addr.sun_path, "/tmp/kakoune/{}", session);
else
format_to(addr.sun_path, "/tmp/kakoune/{}/{}", getpwuid(geteuid())->pw_name, session);
return addr;
}