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 #include <afs/param.h>
19 CommandProc (struct cmd_syndesc *as, void *arock)
21 afs_int32 code, ecode=0;
22 struct ktc_principal server;
25 if (as->parms[0].items) { /* A cell is provided */
26 for (itp=as->parms[0].items; itp; itp = itp->next) {
27 strcpy(server.cell, itp->data);
28 server.instance[0] = '\0';
29 strcpy(server.name, "afs");
30 code = ktc_ForgetToken(&server);
32 printf("unlog: could not discard tickets for cell %s, code %d\n",
34 ecode = code; /* return last error */
38 ecode = ktc_ForgetAllTokens ();
40 printf("unlog: could not discard tickets, code %d\n", ecode);
51 struct cmd_syndesc *ts;
55 WSAStartup(0x0101, &WSAjunk);
57 ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "Release Kerberos authentication");
58 cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
60 code = cmd_Dispatch(argc, argv);