_asgetticket.c 280 B

12345678910111213141516
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <authsrv.h>
  4. static char *pbmsg = "AS protocol botch";
  5. int
  6. _asgetticket(int fd, char *trbuf, char *tbuf)
  7. {
  8. if(write(fd, trbuf, TICKREQLEN) < 0){
  9. close(fd);
  10. werrstr(pbmsg);
  11. return -1;
  12. }
  13. return _asrdresp(fd, tbuf, 2*TICKETLEN);
  14. }