Support connecting to other users sessions by using <user>/<session>
This commit is contained in:
parent
2bc24d6889
commit
99b4dc9929
|
@ -415,7 +415,10 @@ static sockaddr_un session_addr(StringView session)
|
||||||
{
|
{
|
||||||
sockaddr_un addr;
|
sockaddr_un addr;
|
||||||
addr.sun_family = AF_UNIX;
|
addr.sun_family = AF_UNIX;
|
||||||
format_to(addr.sun_path, "/tmp/kakoune/{}/{}", getpwuid(geteuid())->pw_name, session);
|
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;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user