mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
use fixed name
This commit is contained in:
parent
8c0613150e
commit
e3331bf21b
1 changed files with 12 additions and 8 deletions
|
@ -93,7 +93,7 @@ void
|
||||||
threadmain(int argc, char **argv)
|
threadmain(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int fd, pid, export, dotextlist;
|
int fd, pid, export, dotextlist;
|
||||||
char dir[100];
|
char dir[100], *ns;
|
||||||
char sock[200], addr[200];
|
char sock[200], addr[200];
|
||||||
uvlong x;
|
uvlong x;
|
||||||
|
|
||||||
|
@ -129,6 +129,9 @@ threadmain(int argc, char **argv)
|
||||||
if(dotextlist)
|
if(dotextlist)
|
||||||
listkeystext();
|
listkeystext();
|
||||||
|
|
||||||
|
ns = getns();
|
||||||
|
snprint(sock, sizeof sock, "%s/ssh-agent.socket", ns);
|
||||||
|
if(0){
|
||||||
x = ((uvlong)fastrand()<<32) | fastrand();
|
x = ((uvlong)fastrand()<<32) | fastrand();
|
||||||
x ^= ((uvlong)fastrand()<<32) | fastrand();
|
x ^= ((uvlong)fastrand()<<32) | fastrand();
|
||||||
snprint(dir, sizeof dir, "/tmp/ssh-%llux", x);
|
snprint(dir, sizeof dir, "/tmp/ssh-%llux", x);
|
||||||
|
@ -136,6 +139,7 @@ threadmain(int argc, char **argv)
|
||||||
sysfatal("mkdir %s: %r", dir);
|
sysfatal("mkdir %s: %r", dir);
|
||||||
close(fd);
|
close(fd);
|
||||||
snprint(sock, sizeof sock, "%s/agent.%d", dir, pid);
|
snprint(sock, sizeof sock, "%s/agent.%d", dir, pid);
|
||||||
|
}
|
||||||
snprint(addr, sizeof addr, "unix!%s", sock);
|
snprint(addr, sizeof addr, "unix!%s", sock);
|
||||||
|
|
||||||
if((afd = announce(addr, adir)) < 0)
|
if((afd = announce(addr, adir)) < 0)
|
||||||
|
|
Loading…
Reference in a new issue