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