diff options
author | Ken Raeburn <raeburn@mit.edu> | 2000-08-23 22:57:08 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2000-08-23 22:57:08 +0000 |
commit | bb0fa5c59e45a83769463f88a2b17cbe981ad9d0 (patch) | |
tree | 5fe8981acc7c41f0de450e4feb97b4dc8616413c /src/kdc | |
parent | 5327f0b03d2256bbc6a6c8a27ef450e900b6aee7 (diff) | |
download | krb5-bb0fa5c59e45a83769463f88a2b17cbe981ad9d0.tar.gz krb5-bb0fa5c59e45a83769463f88a2b17cbe981ad9d0.tar.xz krb5-bb0fa5c59e45a83769463f88a2b17cbe981ad9d0.zip |
* main.c (initialize_realms): For "cannot initialize realm" messages, tell the
user to check the log file. Print out an error message as well as logging it
if retrieving the default realm name fails.
* kerberos_v4.c (kerberos_v4): Mask requested-life byte value with 0xff to
avoid sign-extension problems.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12631 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kdc')
-rw-r--r-- | src/kdc/ChangeLog | 10 | ||||
-rw-r--r-- | src/kdc/kerberos_v4.c | 2 | ||||
-rw-r--r-- | src/kdc/main.c | 9 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index e5243f7b04..c1d66bf664 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,13 @@ +2000-08-23 Ken Raeburn <raeburn@mit.edu> + + * main.c (initialize_realms): For "cannot initialize realm" + messages, tell the user to check the log file. Print out an error + message as well as logging it if retrieving the default realm name + fails. + + * kerberos_v4.c (kerberos_v4): Mask requested-life byte value with + 0xff to avoid sign-extension problems. + 2000-07-03 Ezra Peisach <epeisach@mit.edu> * Makefile.in (rtest): Link in the kdb5 library. diff --git a/src/kdc/kerberos_v4.c b/src/kdc/kerberos_v4.c index 6629c3e35f..2c9d9d0232 100644 --- a/src/kdc/kerberos_v4.c +++ b/src/kdc/kerberos_v4.c @@ -689,7 +689,7 @@ kerberos_v4(client, pkt) } ptr = (char *) pkt_time_ws(pkt) + 4; - req_life = (u_long) (*ptr++); + req_life = (u_long) (*ptr++) & 0xff; service = ptr; str_length_check(service, SNAME_SZ); diff --git a/src/kdc/main.c b/src/kdc/main.c index 473b902d01..c26782f0c2 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -615,7 +615,7 @@ initialize_realms(kcontext, argc, argv) if ((retval = init_realm(argv[0], rdatap, optarg, db_name, mkey_name, menctype, default_ports, manual))) { - fprintf(stderr,"%s: cannot initialize realm %s\n", + fprintf(stderr,"%s: cannot initialize realm %s - see log file for details\n", argv[0], optarg); exit(1); } @@ -692,13 +692,15 @@ initialize_realms(kcontext, argc, argv) if ((retval = krb5_get_default_realm(kcontext, &lrealm))) { com_err(argv[0], retval, "while attempting to retrieve default realm"); + fprintf (stderr, "%s: %s, attempting to retrieve default realm\n", + argv[0], error_message (retval)); exit(1); } if ((rdatap = (kdc_realm_t *) malloc(sizeof(kdc_realm_t)))) { if ((retval = init_realm(argv[0], rdatap, lrealm, db_name, mkey_name, menctype, default_ports, manual))) { - fprintf(stderr,"%s: cannot initialize realm %s\n", + fprintf(stderr,"%s: cannot initialize realm %s - see log file for details\n", argv[0], lrealm); exit(1); } @@ -794,6 +796,9 @@ int main(argc, argv) exit(1); } krb5_klog_init(kcontext, "kdc", argv[0], 1); + /* N.B.: After this point, com_err sends output to the KDC log + file, and not to stderr. */ + initialize_kdc5_error_table(); /* |