less drive-by-deleting. From Love <lha@e.kth.se>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5289 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-01-30 18:13:16 +00:00
parent e9a23cb00b
commit fea6b76cee

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -82,7 +82,7 @@ kt_remove(int argc, char **argv)
krb5_error_code ret;
krb5_keytab_entry entry;
char *principal_string = NULL;
krb5_principal principal;
krb5_principal principal = NULL;
int kvno = 0;
char *keytype_string = NULL;
krb5_keytype keytype = KEYTYPE_NULL;
@@ -129,6 +129,12 @@ kt_remove(int argc, char **argv)
}
}
}
if (!principal && !keytype && !kvno) {
krb5_warnx(context,
"You must give at least one of "
"principal, keytype or kvno.");
return 0;
}
entry.principal = principal;
entry.keyblock.keytype = keytype;
entry.vno = kvno;