Windows: remove extraneous "pingCount" format param
[openafs.git] / src / WINNT / afsd / cunlog.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 #include <afsconfig.h>
11 #include <afs/param.h>
12
13 #include <roken.h>
14 #include <afs/stds.h>
15
16 #include <afs/auth.h>
17 #include "cmd.h"
18 #include <afsint.h>
19 #include <winsock2.h>
20
21 static int
22 CommandProc (struct cmd_syndesc *as, void *arock)
23 {
24   afs_int32 code, ecode=0;
25   struct ktc_principal server;
26   struct cmd_item *itp;
27
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);
34         if (code) {
35            printf("unlog: could not discard tickets for cell %s, code %d\n",
36                   itp->data, code);
37            ecode = code;                   /* return last error */
38         }
39      }
40   } else {
41      ecode = ktc_ForgetAllTokens ();
42      if (ecode)
43         printf("unlog: could not discard tickets, code %d\n", ecode);
44   }
45   return ecode;
46 }
47
48
49 main(argc, argv)
50   int argc;
51   char *argv[];
52
53 {
54   struct cmd_syndesc *ts;
55   afs_int32 code;
56   WSADATA WSAjunk;
57
58   WSAStartup(0x0101, &WSAjunk);
59
60   ts = cmd_CreateSyntax(NULL, CommandProc, NULL, 0, "Release Kerberos authentication");
61   cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
62
63   code = cmd_Dispatch(argc, argv);
64   return (code);
65 }