From: John Kohl Date: Tue, 29 Jan 1991 16:38:02 +0000 (+0000) Subject: Initial revision X-Git-Tag: krb5-1.0-alpha4~332 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0758135e7effcedb73bc3338314b5a39f06e2afe;p=krb5.git Initial revision git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1640 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/rtest.c b/src/kdc/rtest.c new file mode 100644 index 000000000..a1b132f1d --- /dev/null +++ b/src/kdc/rtest.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include "kdc_util.h" + +void +main(argc,argv) + int argc; + char *argv[]; + { + krb5_data otrans; + krb5_data ntrans; + + krb5_data *tgnames[10]; + krb5_principal tgs = tgnames; + krb5_data tgsrlm; + + krb5_data *cnames[10]; + krb5_principal cl = cnames; + krb5_data crlm; + + krb5_data *snames[10]; + krb5_principal sv = snames; + krb5_data srlm; + + if (argc < 4) { + fprintf(stderr, "not enough args\n"); + exit(1); + } + ntrans.length = 0; + otrans.length = strlen(argv[1]) + 1; + otrans.data = (char *) malloc(otrans.length); + strcpy(otrans.data,argv[1]); + + tgsrlm.length = strlen(argv[2]) + 1; + tgsrlm.data = (char *) malloc(tgsrlm.length); + strcpy(tgsrlm.data,argv[2]); + tgs[0] = &tgsrlm; + + crlm.length = strlen(argv[3]) + 1; + crlm.data = (char *) malloc(crlm.length); + strcpy(crlm.data,argv[3]); + cl[0] = &crlm; + + srlm.length = strlen(argv[4]) + 1; + srlm.data = (char *) malloc(srlm.length); + strcpy(srlm.data,argv[4]); + sv[0] = &srlm; + + add_to_transited(&otrans,&ntrans,tgs,cl,sv); + + printf("%s\n",ntrans.data); + + } + +krb5_encrypt_block master_encblock; diff --git a/src/kdc/rtest.good b/src/kdc/rtest.good new file mode 100644 index 000000000..4eecf6e30 --- /dev/null +++ b/src/kdc/rtest.good @@ -0,0 +1,26 @@ +ATHENA.MIT.EDU +MIT.EDU,ATHENA. +EDU,MIT.,ATHENA. +EDU,MIT.,ATHENA.,WASHINGTON.EDU +EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS. +EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W. +EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.,SUB3W.CS.WASHINGTON.EDU +EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W. +EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W. +EDU,ATHENA.MIT.,SUB2M.,WASHINGTON.EDU,CS. +/EDU/MIT/ATHENA +/EDU/MIT,/ATHENA +/EDU/MIT,/ATHENA +/EDU,/MIT,/ATHENA +/EDU,/MIT,/ATHENA, /EDU/WASHINGTON +/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS +/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W +/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W, /EDU/WASHINGTON/CS/SUB3W +/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W +/EDU,/MIT,/ATHENA, /EDU/WASHINGTON,/CS,/SUB2W +/EDU,/MIT/ATHENA,/SUB2M, /EDU/WASHINGTON,/CS +EDU,MIT.,ATHENA.,ATEST., /COM,/HP,/APOLLO +EDU,MIT.,ATHENA., /COM,/HP,/APOLLO,/HTEST +/COM,/HP,/APOLLO,EDU,MIT.,ATHENA.,ATEST. +/COM,/HP,/APOLLO,ATHENA.MIT.EDU +EDU,MIT.,ATHENA., /COM/HP/APOLLO/HTEST diff --git a/src/kdc/rtscript b/src/kdc/rtscript new file mode 100644 index 000000000..04f2d0f4f --- /dev/null +++ b/src/kdc/rtscript @@ -0,0 +1,23 @@ +#!/bin/sh +# should print: +#ATHENA.MIT.EDU +#MIT.EDU,ATHENA. +#EDU,MIT.,ATHENA. +#EDU,MIT.,ATHENA.,WASHINGTON.EDU +#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS. +#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W. +#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W.,SUB3W.CS.WASHINGTON.EDU +#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W. +#EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W. +#EDU,ATHENA.MIT.,SUB2M.,WASHINGTON.EDU,CS. +# +./rtest "" ATHENA.MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest ATHENA.MIT.EDU MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "MIT.EDU,ATHENA." EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,MIT.,ATHENA." WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU" CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS." SUB2W.CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W." SUB3W.CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W." SUB1W.CS.WASHINGTON.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.,SUB2W." SUB1M.ATHENA.MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU +./rtest "EDU,SUB2M.ATHENA.MIT.,WASHINGTON.EDU,CS." ATHENA.MIT.EDU SUB1W.CS.WASHINGTON.EDU SUB1M.ATHENA.MIT.EDU