shithub: riscv

ref: 14a7c237b5a645bdd3e56112888a875dcf61648c
dir: /sys/src/libauthsrv/_asgetticket.c/

View raw version
#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){
		werrstr(pbmsg);
		return -1;
	}
	return _asrdresp(fd, tbuf, 2*TICKETLEN);
}