aboutsummaryrefslogtreecommitdiff
path: root/src/libauthsrv/_asgetticket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libauthsrv/_asgetticket.c')
-rw-r--r--src/libauthsrv/_asgetticket.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libauthsrv/_asgetticket.c b/src/libauthsrv/_asgetticket.c
new file mode 100644
index 00000000..ea9e0c9e
--- /dev/null
+++ b/src/libauthsrv/_asgetticket.c
@@ -0,0 +1,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);
+}