+Tue Oct 17 08:11:56 2000 Ezra Peisach <epeisach@mit.edu>
+
+ * kprop.c, kpropd.c: Use krb5_set_principal_realm() instead of
+ freeing library generated memory using the internal krb5_xfree().
+
Sat Oct 14 14:16:20 2000 Ezra Peisach <epeisach@mit.edu>
* kpropd.c, kprop.c: Ensure size of database sent OTW as 4 bytes
exit(1);
}
if (realm) {
- (void) krb5_xfree(krb5_princ_realm(context, my_principal)->data);
- krb5_princ_set_realm_length(context, my_principal, strlen(realm));
- krb5_princ_set_realm_data(context, my_principal, strdup(realm));
+ retval = krb5_set_principal_realm(context, my_principal, realm);
+ if (retval) {
+ com_err(progname, errno,
+ "while setting client principal realm");
+ exit(1);
+ }
}
#if 0
krb5_princ_type(context, my_principal) = KRB5_NT_PRINCIPAL;
exit(1);
}
if (realm) {
- (void) krb5_xfree(krb5_princ_realm(context, creds.server)->data);
- krb5_princ_set_realm_length(context, creds.server, strlen(realm));
- krb5_princ_set_realm_data(context, creds.server, strdup(realm));
+ retval = krb5_set_principal_realm(context, creds.server, realm);
+ if (retval) {
+ com_err(progname, errno,
+ "while setting server principal realm");
+ exit(1);
+ }
}
/*
exit(1);
}
if (realm) {
- (void) krb5_xfree(krb5_princ_realm(context, server)->data);
- krb5_princ_set_realm_length(context, server, strlen(realm));
- krb5_princ_set_realm_data(context, server, strdup(realm));
+ retval = krb5_set_principal_realm(kpropd_context, server, realm);
+ if (retval) {
+ com_err(progname, errno,
+ "while constructing my service realm");
+ exit(1);
+ }
}
/*
* Construct the name of the temporary file.