aboutsummaryrefslogtreecommitdiff
path: root/src/libauthsrv/_asgetticket.c
blob: ea9e0c9ef816d788a3877593d1558119294c9a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <u.h>
#include <libc.h>
#include <authsrv.h>

static char *pbmsg = "AS protocol botch";

int
_asgetticket(int fd, char *trbuf, char *tbuf)
{
	if(write(fd, trbuf, TICKREQLEN) < 0){
		close(fd);
		werrstr(pbmsg);
		return -1;
	}
	return _asrdresp(fd, tbuf, 2*TICKETLEN);
}