2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 /* test-reauth.c - test SIA reauthorization code. */
12 #include <afsconfig.h>
13 #include <afs/param.h>
39 sia_code_string(int code)
41 static char err_string[64];
51 (void)sprintf(err_string, "Unknown error %d\n", code);
56 main(int ac, char **av)
59 SIAENTITY *entity = NULL;
60 int (*sia_collect) () = sia_collect_trm;
65 printf("Usage: test-reauth user-name\n");
70 code = sia_ses_init(&entity, ac, av, NULL, username, NULL, 1, NULL);
71 if (code != SIASUCCESS) {
72 printf("sia_ses_init failed with code %s\n", sia_code_string(code));
73 sia_ses_release(&entity);
77 code = sia_ses_reauthent(sia_collect, entity);
78 if (code != SIASUCCESS) {
79 printf("sia_ses_reauthent failed with code %s\n",
80 sia_code_string(code));
81 sia_ses_release(&entity);
85 code = sia_ses_release(&entity);
86 if (code != SIASUCCESS) {
87 printf("sia_ses_release failed with code %s\n",
88 sia_code_string(code));
92 printf("Password verified.\n");