(main): check number of arguments

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3421 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-09-07 23:34:53 +00:00
parent c522f6cc39
commit e624e0c3a4
5 changed files with 25 additions and 0 deletions

View File

@@ -94,6 +94,13 @@ int main(int argc, char **argv)
fprintf(stderr, "string2key (%s-%s)\n", PACKAGE, VERSION);
exit(0);
}
argc -= optind;
argv += optind;
if (argc > 1)
usage(1);
if(version5 && principal == NULL){
printf("Kerberos v5 principal: ");
fgets(buf, sizeof(buf), stdin);