kadmin: add --hdb / -H argument
Makes it possible to $ kadmin -l -H /tmp/hdb init FOO.EXAMPLE rather than being able to only init /var/heimdal/heimdal.
This commit is contained in:
@@ -41,6 +41,7 @@ int local_flag;
|
||||
static int ad_flag;
|
||||
static int help_flag;
|
||||
static int version_flag;
|
||||
static char *hdb;
|
||||
static char *realm;
|
||||
static char *admin_server;
|
||||
static int server_port = 0;
|
||||
@@ -63,6 +64,10 @@ static struct getargs args[] = {
|
||||
"key-file", 'k', arg_string, &keyfile,
|
||||
"location of master key file", "file"
|
||||
},
|
||||
{
|
||||
"hdb", 'H', arg_string, &hdb,
|
||||
"HDB to use", "hdb"
|
||||
},
|
||||
{
|
||||
"realm", 'r', arg_string, &realm,
|
||||
"realm to use", "realm"
|
||||
@@ -204,6 +209,11 @@ main(int argc, char **argv)
|
||||
conf.mask |= KADM5_CONFIG_REALM;
|
||||
}
|
||||
|
||||
if (hdb) {
|
||||
conf.dbname = hdb;
|
||||
conf.mask |= KADM5_CONFIG_DBNAME;
|
||||
}
|
||||
|
||||
if (admin_server) {
|
||||
conf.admin_server = admin_server;
|
||||
conf.mask |= KADM5_CONFIG_ADMIN_SERVER;
|
||||
|
Reference in New Issue
Block a user