]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libauthsrv/_asgetticket.c
merge
[plan9front.git] / sys / src / libauthsrv / _asgetticket.c
1 #include <u.h>
2 #include <libc.h>
3 #include <authsrv.h>
4
5 static char *pbmsg = "AS protocol botch";
6
7 int
8 _asgetticket(int fd, char *trbuf, char *tbuf)
9 {
10         if(write(fd, trbuf, TICKREQLEN) < 0){
11                 werrstr(pbmsg);
12                 return -1;
13         }
14         return _asrdresp(fd, tbuf, 2*TICKETLEN);
15 }