/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
+#include <afs/opr.h>
-#include <stdio.h>
-#include <potpourri.h>
-#ifdef AFS_AIX32_ENV
-#include <signal.h>
-#endif
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <sys/ioctl.h>
#include <afs/vice.h>
-#include <sys/file.h>
#include <afs/auth.h>
#include <afs/cellconfig.h>
int deleted;
};
+static int unlog_ForgetCertainTokens(char **, int);
+static int unlog_NormalizeCellNames(char **, int);
+static int unlog_CheckUnlogList(char **, int, struct ktc_principal *);
+static int unlog_VerifyUnlog(char **, int, struct tokenInfo *, int);
-int
+static int
CommandProc(struct cmd_syndesc *as, void *arock)
{
#define MAXCELLS 20 /* XXX */
if (as->parms[0].items) { /* A cell is provided */
for (itp = as->parms[0].items; itp; itp = itp->next) {
- if (i > MAXCELLS) {
+ if (i >= MAXCELLS) {
printf
("The maximum number of cells (%d) is exceeded; the rest are ignored\n",
MAXCELLS);
main(int argc, char *argv[])
{ /*Main routine */
struct cmd_syndesc *ts;
- register afs_int32 code;
+ afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
sigaction(SIGSEGV, &nsa, NULL);
#endif
- ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
+ ts = cmd_CreateSyntax(NULL, CommandProc, NULL, 0,
"Release Kerberos authentication");
cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
* then re-register the good ones. Ugly, but it works.
*/
-int
+static int
unlog_ForgetCertainTokens(char **list, int listSize)
{
- unsigned count, index, index2;
+ int index, index2;
+ int count;
afs_int32 code;
struct ktc_principal serviceName;
struct tokenInfo *tokenInfoP;
code = ktc_ListTokens(count, &count, &serviceName);
} while (!code);
- tokenInfoP =
- (struct tokenInfo *)malloc((sizeof(struct tokenInfo) * count));
+ tokenInfoP = malloc((sizeof(struct tokenInfo) * count));
if (!tokenInfoP) {
perror("unlog_ForgetCertainTokens -- osi_Alloc failed");
exit(1);
int
unlog_NormalizeCellNames(char **list, int size)
{
- char *newCellName, *lcstring();
+ char *newCellName;
unsigned index;
struct afsconf_dir *conf;
int code;