void tickauthreply(Ticketreq*, Authkey*);
void tickauthreply2(Ticketreq*, Authkey*, uchar *, int, uchar *, int);
void safecpy(char*, char*, int);
+void catch(void*, char*);
void
main(int argc, char *argv[])
int dupe, lmok, ntok, ntbloblen;
uchar phash[SHA1dlen], chash[SHA1dlen], ahash[SHA1dlen];
DigestState *s;
+ long timeout;
int tries;
/*
/* Z[4] */
if(ntbloblen > sizeof(ntblob)-4)
exits(0);
- if(readn(0, ntblob+ntbloblen, 4) < 0)
- exits(0);
- ntbloblen += 4;
+
+ /* LINUX omits the final Z(4), so read with short timeout */
+ notify(catch);
+ timeout = alarm(50);
+ if(readn(0, ntblob+ntbloblen, 4) == 4)
+ ntbloblen += 4;
+ alarm(timeout);
+ notify(nil);
}
safecpy(tr->uid, reply.uid, sizeof(tr->uid));
to[len-1] = 0;
}
+void
+catch(void*, char *msg)
+{
+ if(strstr(msg, "alarm") != nil)
+ noted(NCONT);
+ noted(NDFLT);
+}