allow specification of port number.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5285 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-01-30 12:48:55 +00:00
parent 3d0f6778b1
commit 957cd47a28
2 changed files with 17 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -48,6 +48,7 @@ static int help_flag;
static int version_flag;
static char *realm;
static char *admin_server;
static int server_port = 0;
static char *client_name;
static struct getargs args[] = {
@@ -69,6 +70,10 @@ static struct getargs args[] = {
"admin-server", 'a', arg_string, &admin_server,
"server to contact", "host"
},
{
"server-port", 's', arg_integer, &server_port,
"server to contact", "host"
},
{ "local", 'l', arg_flag, &local_flag, "local admin mode" },
{ "help", 'h', arg_flag, &help_flag },
{ "version", 'v', arg_flag, &version_flag }
@@ -236,6 +241,11 @@ main(int argc, char **argv)
conf.mask |= KADM5_CONFIG_ADMIN_SERVER;
}
if (server_port) {
conf.kadmind_port = htons(server_port);
conf.mask |= KADM5_CONFIG_KADMIND_PORT;
}
if(local_flag){
ret = kadm5_s_init_with_password_ctx(context,
KADM5_ADMIN_SERVICE,