From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: pwfmfx@cna.ne.jp To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] factotum problem fix Date: Tue, 19 Nov 2002 14:10:54 +0900 Topicbox-Message-UUID: 23affc20-eacb-11e9-9e20-41e7f4b1d025 Hello, I couldn't access to an auth server from /net.alt, because factotum used only /net. Here's my fix. Replace bindnetcs(void) in factotum/util.c by the following: -- from here -- /* bind in a specified network and cs */ static int bindnetcseach(char *net, char *ipdev, char *cssrv) { int srvfd; char buf[40]; snprint(buf, sizeof buf, "%s/cs", net); if(access(buf, AEXIST) >= 0) return 0; if((srvfd = open(cssrv, ORDWR)) < 0) return -1; if(mount(srvfd, -1, net, MAFTER, "") < 0) return -1; close(srvfd); snprint(buf, sizeof buf, "%s/tcp", net); if(access(buf, AEXIST) < 0) bind(ipdev, net, MAFTER); return 0; } /* bind in the default network and cs */ static int bindnetcs(void) { if(bindnetcseach("/net", "#I", "#s/cs") < 0) return -1; bindnetcseach("/net.alt", "#I1", "#s/cs_net.alt"); return 0; } -- end -- By the way, fd in _asgetticket() could be closed twice. When an error occurs, _asgetticket() close(fd), and a caller (auth/debug, factotum/p9sk1.c, ...) closes it again. Thanks. --- Mamoru Sato pwfmfx@cna.ne.jp pwfmfx@nurs.or.jp