(srvconv): check number of arguments

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3419 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-09-07 23:30:22 +00:00
parent 01bf42dfe8
commit 3dac035ce6

View File

@@ -60,7 +60,8 @@ static struct getargs args[] = {
static int num_args = sizeof(args) / sizeof(args[0]);
int srvconv(int argc, char **argv)
int
srvconv(int argc, char **argv)
{
krb5_error_code ret;
int optind = 0;
@@ -78,6 +79,14 @@ int srvconv(int argc, char **argv)
return 0;
}
argc -= optind;
argv += optind;
if (argc != 0) {
arg_printusage(args, num_args, "");
return 1;
}
if(keytab == NULL){
ret = krb5_kt_default_name(context, keytab_name, sizeof(keytab_name));
if(ret) {