the database name and the service name, eliminating an
installation hassle.
* adm_extern.h: declare realm.
* adm_server.c: define realm.
(process_args): change db_realm to realm.
* adm_network.c (setup_network): use the preset realm, not the
default realm.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5427
dc483132-0cff-0310-8789-
dd5450dbe970
+Fri Apr 21 13:11:00 1995 Mark Eichin <eichin@cygnus.com>
+
+ From Ian Taylor <ian@cygnus.com>. Makes kadmind use -r for both
+ the database name and the service name, eliminating an
+ installation hassle.
+ * adm_extern.h: declare realm.
+ * adm_server.c: define realm.
+ (process_args): change db_realm to realm.
+ * adm_network.c (setup_network): use the preset realm, not the
+ default realm.
+
Thu Apr 20 18:05:00 1995 Mark Eichin <eichin@cygnus.com>
Changes from Ian Taylor <ian@cygnus.com> to support testsuite.
volatile int signal_requests_exit = 0; /* gets set when signal hits */
char *dbm_db_name = DEFAULT_KDB_FILE;
+char *realm = NULL;
krb5_keyblock tgs_key;
krb5_kvno tgs_kvno;
extern volatile int signal_requests_exit;
extern char *dbm_db_name;
+extern char *realm;
extern krb5_keyblock tgs_key;
extern krb5_kvno tgs_kvno;
{
krb5_error_code retval;
char server_host_name[MAXHOSTNAMELEN];
- char *lrealm;
krb5_sigtype doexit(), do_child();
struct servent *service_servent;
struct hostent *service_hostent;
return ENOMEM;
}
-
- if (retval = krb5_get_default_realm(context, &lrealm)) {
- free(client_server_info.name_of_service);
- com_err( "setup_network", 0,
- "adm_network: Unable to get Default Realm");
- return retval;
- }
-
(void) sprintf(client_server_info.name_of_service, "%s%s%s%s%s",
- CPWNAME, "/", lrealm, "", "");
- free(lrealm);
+ CPWNAME, "/", realm, "@", realm);
#ifdef DEBUG
fprintf(stderr, "client_server_info.name_of_service = %s\n",
int c;
krb5_boolean manual = FALSE;
int keytypedone = 0;
- char *db_realm = 0;
char *mkey_name = 0;
char *local_realm;
krb5_enctype etype;
break;
case 'r':
- db_realm = optarg;
+ realm = optarg;
break;
case 'D':
}
- if (!db_realm) {
+ if (!realm) {
/* no realm specified, use default realm */
if (retval = krb5_get_default_realm(context, &local_realm)) {
com_err(argv[0], retval,
"while attempting to retrieve default realm");
exit(1);
}
- db_realm = local_realm;
+ realm = local_realm;
}
if (!mkey_name) {
/* assemble & parse the master key name */
if (retval = krb5_db_setup_mkey_name(context, mkey_name,
- db_realm,
+ realm,
(char **) 0,
&master_princ)) {
com_err(argv[0], retval, "while setting up master key name");