diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-25 23:08:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-08-25 23:08:45 +0000 |
commit | 7b19a97c25589df244ab90fbe03b7509f61ac0ff (patch) | |
tree | c7b4cdc742e46d3781983b75e84e2fc41f56d327 /kerberosIV | |
parent | ad42b542e45e8a35e958dda15cf8b440051e89db (diff) |
more 63 bit lossage
Diffstat (limited to 'kerberosIV')
-rw-r--r-- | kerberosIV/kdb_edit/kdb_edit.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/kerberosIV/kdb_edit/kdb_edit.c b/kerberosIV/kdb_edit/kdb_edit.c index 256a39a8d2f..8e958722b1f 100644 --- a/kerberosIV/kdb_edit/kdb_edit.c +++ b/kerberosIV/kdb_edit/kdb_edit.c @@ -1,4 +1,4 @@ -/* $Id: kdb_edit.c,v 1.2 1996/09/16 18:48:53 millert Exp $ */ +/* $Id: kdb_edit.c,v 1.3 1997/08/25 23:08:44 deraadt Exp $ */ /*- * Copyright 1987, 1988 by the Student Information Processing Board @@ -57,7 +57,7 @@ static des_cblock master_key; static des_cblock session_key; static des_key_schedule master_key_schedule; static char pw_str[255]; -static long master_key_version; +static int master_key_version; static void Usage(void) @@ -97,7 +97,7 @@ change_principal(void) int creating = 0; int editpw = 0; int changed = 0; - long temp_long; + int temp_long; int n; struct tm *tp, edate, *localtime(const time_t *); long maketime(struct tm *tp, int local); @@ -220,7 +220,7 @@ change_principal(void) &master_key, master_key_schedule, DES_ENCRYPT); bcopy(new_key, &principal_data[i].key_low, 4); - bcopy(((long *) new_key) + 1, + bcopy(((int *) new_key) + 1, &principal_data[i].key_high, 4); bzero(new_key, sizeof(new_key)); null_key: @@ -267,7 +267,7 @@ change_principal(void) fprintf(stdout, "Max ticket lifetime (*5 minutes) [ %d ] ? ", principal_data[i].max_life); while (z_fgets(temp, sizeof temp, stdin) && *temp) { - if (sscanf(temp, "%ld", &temp_long) != 1) + if (sscanf(temp, "%d", &temp_long) != 1) goto bad_life; if (temp_long > 255 || (temp_long < 0)) { bad_life: @@ -287,7 +287,7 @@ change_principal(void) fprintf(stdout, "Attributes [ %d ] ? ", principal_data[i].attributes); while (z_fgets(temp, sizeof temp, stdin) && *temp) { - if (sscanf(temp, "%ld", &temp_long) != 1) + if (sscanf(temp, "%d", &temp_long) != 1) goto bad_att; if (temp_long > 65535 || (temp_long < 0)) { bad_att: @@ -349,17 +349,12 @@ main(int argc, char **argv) { /* Local Declarations */ - long n; + int n; prog[sizeof prog - 1] = '\0'; /* make sure terminated */ strncpy(prog, argv[0], sizeof prog - 1); /* salt away invoking * program */ - /* Assume a long is four bytes */ - if (sizeof(long) != 4) { - fprintf(stdout, "%s: size of long is %d.\n", prog, (int)sizeof(long)); - exit(-1); - } /* Assume <=32 signals */ if (NSIG > 32) { fprintf(stderr, "%s: more than 32 signals defined.\n", prog); |