Deleted Added
sdiff udiff text old ( 90926 ) new ( 120945 )
full compact
1/*
2 * Copyright (c) 1997 - 2001 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 19 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "ktutil_locl.h"
35
36RCSID("$Id: get.c,v 1.22 2003/01/16 19:03:23 lha Exp $");
37
38static void*
39open_kadmin_connection(char *principal,
40 const char *realm,
41 char *admin_server,
42 int server_port)
43{
44 static kadm5_config_params conf;

--- 39 unchanged lines hidden (view full) ---

84 krb5_keytab keytab;
85 void *kadm_handle = NULL;
86 char *principal = NULL;
87 char *realm = NULL;
88 char *admin_server = NULL;
89 int server_port = 0;
90 int help_flag = 0;
91 int optind = 0;
92 struct getarg_strings etype_strs = {0, NULL};
93 krb5_enctype *etypes = NULL;
94 size_t netypes = 0;
95
96 struct getargs args[] = {
97 { "principal", 'p', arg_string, NULL,
98 "admin principal", "principal"
99 },

--- 5 unchanged lines hidden (view full) ---

105 { "admin-server", 'a', arg_string, NULL,
106 "server to contact", "host"
107 },
108 { "server-port", 's', arg_integer, NULL,
109 "port to contact", "port number"
110 },
111 { "help", 'h', arg_flag, NULL }
112 };
113 int i = 0, j;
114
115 args[i++].value = &principal;
116 args[i++].value = &etype_strs;
117 args[i++].value = &realm;
118 args[i++].value = &admin_server;
119 args[i++].value = &server_port;
120 args[i++].value = &help_flag;
121
122 if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)
123 || help_flag) {
124 arg_printusage(args, sizeof(args) / sizeof(args[0]),
125 "ktutil get", "principal...");
126 return 1;
127 }
128 if(optind == argc) {

--- 141 unchanged lines hidden ---