Deleted Added
full compact
get.c (90926) get.c (120945)
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
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.21 2001/10/29 12:53:52 nectar Exp $");
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;
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 int i, j;
93 struct getarg_strings etype_strs = {0, NULL};
94 krb5_enctype *etypes = NULL;
95 size_t netypes = 0;
96
97 struct getargs args[] = {
98 { "principal", 'p', arg_string, NULL,
99 "admin principal", "principal"
100 },

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

106 { "admin-server", 'a', arg_string, NULL,
107 "server to contact", "host"
108 },
109 { "server-port", 's', arg_integer, NULL,
110 "port to contact", "port number"
111 },
112 { "help", 'h', arg_flag, NULL }
113 };
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
114
115 args[0].value = &principal;
116 args[1].value = &etype_strs;
117 args[2].value = &realm;
118 args[3].value = &admin_server;
119 args[4].value = &server_port;
120 args[5].value = &help_flag;
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 ---
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 ---