| dorpc(AuthRpc *rpc, char *verb, char *val, int len, AuthGetkey *getkey) |
| if((ret = auth_rpc(rpc, verb, val, len)) != ARneedkey && ret != ARbadkey) |
| return ARgiveup; /* don't know how */ |
| if((*getkey)(rpc->arg) < 0) |
| return ARgiveup; /* user punted */ |
| auth_getuserpasswd(AuthGetkey *getkey, char *fmt, ...) |
| quotefmtinstall(); /* just in case */ |
| params = vsmprint(fmt, arg); |
| if(dorpc(rpc, "start", params, strlen(params), getkey) != ARok |
| || dorpc(rpc, "read", nil, 0, getkey) != ARok) |
| rpc->arg[rpc->narg] = '\0'; |
| if(tokenize(rpc->arg, f, 2) != 2){ |
| werrstr("bad answer from factotum"); |
| up = malloc(sizeof(*up)+rpc->narg+1); |