accprogs exceptions globcod {% #include #include /* always need this */ #include #include #include "test.h" int debug; int i; int ret; int kill; CLIENT *cl; char master[128]; int setup() { int code; AUTH * auth; struct timeval cv; if (master[0] == NULL ) strcpy(master,"ops-5"); cl = clnt_create(master, ABSMASTER, ABSVERSION, "tcp"); if (cl == NULL) { /* * Couldn't establish connection with server. * Print error message and die. */ clnt_pcreateerror(master); exit(-1); } cv.tv_sec = 120; cv.tv_usec = 0; clnt_control(cl, CLSET_TIMEOUT, (char *) &cv); /* now setup authenticated connection */ if (authkerb_create("rcmd", master, (char *) NULL, AUTH_KERB, &code, &auth, cl)){ fprintf(stderr,"authkerb_create fails code = %d\n", code); return(-1); } return(SUCCESS); } void help(void) { fprintf(stdout,"usage: \t-server default:ops-5\n"); fprintf(stdout,"\t\t-k to kill the master on exit\n"); fprintf(stdout,"\t\t-d for debugging\n"); exit(1); } %} cases {% debug = 0; memset(master,0,128); for (i = 0; i < argc; i++) { if (!strcmp(argv[i],"-d")) { debug = 1; } else if (!strcmp(argv[i],"-server")) { i++; strcpy(master,argv[i]); } else if ( !strcmp(argv[i],"-k")) { kill = 1; } else if ( !strcmp(argv[i],"-help")) { help(); } } setup(); %} <, noexc, domain() , "abcdefghijklmn", string > <, noexc, location(argv) , "abcdefghijklmno", string > <, noexc, media_type() , "abcdefghijklmnopqrstuvwxyzaa", string > <, noexc, mpool() , "abcdefghijklmnopqrst", string > <, noexc, thost() , "abcdefghijklmz", string > <, noexc, dumpset() , "abcdefghijklnopqrstuwxhij", string > {% if (kill) { abs_shutdown_1(ABS_MASTER_SHUTDOWN, &ret , cl); clnt_destroy(cl); } %}