Fall back if cs fails to be useful.
[rsc] --rw-rw-r-- M 615310 glenda sys 18036 Dec 2 15:05 sys/src/cmd/auth/factotum/util.c
/n/sourcesdump/2005/1202/plan9/sys/src/cmd/auth/factotum/util.c:26,37 -
/n/sourcesdump/2005/1203/plan9/sys/src/cmd/auth/factotum/util.c:26,36
_authdial(char *net, char *authdom)
{
int fd;
- int vanilla;
- vanilla = net==nil || strcmp(net, "/net")==0;
-
- if(!vanilla || bindnetcs()>=0)
- return authdial(net, authdom);
+ if(bindnetcs() >= 0 && (fd=authdial(net, authdom)) >= 0)
+ return fd;
+ if(net != nil && strcmp(net, "/net") != 0)
+ return -1;
/* use the auth sever passed to us as an arg */
if(authaddr == nil)
|