return TCL_OK;
}
-static int get_server_handle(Tcl_Interp *interp, char *name, void **handle)
+static int get_server_handle(Tcl_Interp *interp, const char *name,
+ void **handle)
{
Tcl_HashEntry *entry;
return TCL_OK;
}
-static int remove_server_handle(Tcl_Interp *interp, char *name)
+static int remove_server_handle(Tcl_Interp *interp, const char *name)
{
Tcl_HashEntry *entry;
#define GET_HANDLE(num_args, ignored) \
void *server_handle; \
- char *whoami = argv[0]; \
+ const char *whoami = argv[0]; \
argv++, argc--; \
if (argc != num_args + 1) { \
Tcl_AppendResult(interp, whoami, ": ", arg_error, 0); \
-static int parse_str(Tcl_Interp *interp, char *in_str, char **out_str)
+static int parse_str(Tcl_Interp *interp, const char *in_str, char **out_str)
{
if (! in_str) {
*out_str = 0;
*out_str = 0;
}
else {
- *out_str = in_str;
+ *out_str = (char *) in_str;
}
return TCL_OK;
}
sprintf(buf, "%d", tl_data->tl_data_length);
Tcl_DStringAppendElement(str, buf);
Tcl_DStringAppend(str, " ", 1);
- Tcl_DStringAppend(str, tl_data->tl_data_contents,
+ Tcl_DStringAppend(str, (char *) tl_data->tl_data_contents,
tl_data->tl_data_length);
Tcl_DStringEndSublist(str);
}
static int parse_flags(Tcl_Interp *interp, Tcl_HashTable *table,
- struct flagval *array, int size, char *str,
+ struct flagval *array, int size, const char *str,
krb5_flags *flags)
{
int tmp, argc, i, retcode = TCL_OK;
- char **argv;
+ const char **argv;
Tcl_HashEntry *entry;
if (Tcl_GetInt(interp, str, &tmp) == TCL_OK) {
*flags |= *(krb5_flags *) Tcl_GetHashValue(entry);
}
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
return(retcode);
}
sizeof(struct flagval), flags);
}
-static int parse_krb5_flags(Tcl_Interp *interp, char *str, krb5_flags *flags)
+static int parse_krb5_flags(Tcl_Interp *interp, const char *str,
+ krb5_flags *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
}
-static int parse_aux_attributes(Tcl_Interp *interp, char *str, long *flags)
+static int parse_aux_attributes(Tcl_Interp *interp, const char *str,
+ long *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
return TCL_OK;
}
-static int parse_principal_mask(Tcl_Interp *interp, char *str, krb5_int32 *flags)
+static int parse_principal_mask(Tcl_Interp *interp, const char *str,
+ krb5_int32 *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
return TCL_OK;
}
-static int parse_policy_mask(Tcl_Interp *interp, char *str, krb5_int32 *flags)
+static int parse_policy_mask(Tcl_Interp *interp, const char *str,
+ krb5_int32 *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
return str;
}
-static int parse_keysalts(Tcl_Interp *interp, char *list,
+static int parse_keysalts(Tcl_Interp *interp, const char *list,
krb5_key_salt_tuple **keysalts,
int num_keysalts)
{
- char **argv, **argv1 = NULL;
+ const char **argv, **argv1 = NULL;
int i, tmp, argc, argc1, retcode;
*keysalts = NULL;
}
(*keysalts)[i].ks_salttype = tmp;
- Tcl_Free(argv1);
+ Tcl_Free((char *) argv1);
argv1 = NULL;
}
finished:
if (argv1) {
- Tcl_Free(argv1);
+ Tcl_Free((char *) argv1);
}
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
return retcode;
}
-static int parse_key_data(Tcl_Interp *interp, char *list,
+static int parse_key_data(Tcl_Interp *interp, const char *list,
krb5_key_data **key_data,
int n_key_data)
{
- char **argv;
+ const char **argv;
int argc, retcode;
*key_data = NULL;
}
finished:
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
return retcode;
}
-static int parse_tl_data(Tcl_Interp *interp, char *list,
+static int parse_tl_data(Tcl_Interp *interp, const char *list,
krb5_tl_data **tlp,
int n_tl_data)
{
krb5_tl_data *tl, *tl2;
- char **argv, **argv1 = NULL;
+ const char **argv, **argv1 = NULL;
int i, tmp, argc, argc1, retcode;
*tlp = NULL;
tl->tl_data_contents = (krb5_octet *) malloc(tmp+1);
strcpy((char *) tl->tl_data_contents, argv1[2]);
- Tcl_Free(argv1);
+ Tcl_Free((char *) argv1);
argv1 = NULL;
tl = tl->tl_data_next;
}
finished:
if (argv1) {
- Tcl_Free(argv1);
+ Tcl_Free((char *) argv1);
}
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
return retcode;
}
kadm5_config_params *params)
{
static Tcl_HashTable *table = 0;
- char **argv = NULL;
+ const char **argv = NULL;
int tmp, argc, retcode;
memset(params, 0, sizeof(kadm5_config_params));
krb5_error_code krb5_ret;
int tcl_ret;
int argc;
- char **argv;
+ const char **argv;
int tmp;
int retcode = TCL_OK;
}
finished:
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
*out_princ = princ;
return retcode;
}
kadm5_policy_ent_t policy = 0;
int tcl_ret;
int argc;
- char **argv;
+ const char **argv;
int tmp;
int retcode = TCL_OK;
policy->policy_refcnt = tmp;
finished:
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
*out_policy = policy;
return retcode;
}
enum init_type { INIT_NONE, INIT_PASS, INIT_CREDS };
static int _tcl_kadm5_init_any(enum init_type init_type, ClientData clientData,
- Tcl_Interp *interp, int argc, char *argv[])
+ Tcl_Interp *interp, int argc, const char *argv[])
{
kadm5_ret_t ret;
char *client_name, *pass, *service_name;
int tcl_ret;
krb5_ui_4 struct_version, api_version;
- char *handle_var;
+ const char *handle_var;
void *server_handle;
char *handle_name, *params_str;
- char *whoami = argv[0];
+ const char *whoami = argv[0];
kadm5_config_params params;
argv++, argc--;
}
static int tcl_kadm5_init(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
return _tcl_kadm5_init_any(INIT_PASS, clientData, interp, argc, argv);
}
static int tcl_kadm5_init_with_creds(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
return _tcl_kadm5_init_any(INIT_CREDS, clientData, interp, argc, argv);
}
static int tcl_kadm5_destroy(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
kadm5_ret_t ret;
int tcl_ret;
static int tcl_kadm5_create_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
int tcl_ret;
kadm5_ret_t ret;
static int tcl_kadm5_delete_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
krb5_error_code krb5_ret;
static int tcl_kadm5_modify_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *princ_string;
kadm5_principal_ent_t princ = 0;
static int tcl_kadm5_rename_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal source, target;
krb5_error_code krb5_ret;
static int tcl_kadm5_chpass_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
char *pw;
static int tcl_kadm5_chpass_principal_util(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
char *new_pw;
static int tcl_kadm5_randkey_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
krb5_keyblock *keyblocks;
static int tcl_kadm5_get_principal(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const const char *argv[])
{
krb5_principal princ;
kadm5_principal_ent_rec ent;
}
static int tcl_kadm5_create_policy(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
int tcl_ret;
kadm5_ret_t ret;
static int tcl_kadm5_delete_policy(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
kadm5_ret_t ret;
char *policy;
static int tcl_kadm5_modify_policy(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *policy_string;
kadm5_policy_ent_t policy = 0;
static int tcl_kadm5_get_policy(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
kadm5_policy_ent_rec ent;
Tcl_DString *ent_dstring = 0;
static int tcl_kadm5_free_principal_ent(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *ent_name;
kadm5_principal_ent_t ent;
static int tcl_kadm5_free_policy_ent(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *ent_name;
kadm5_policy_ent_t ent;
static int tcl_kadm5_get_privs(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
- char *set_ret;
+ const char *set_ret;
kadm5_ret_t ret;
char *priv_var;
long privs;
return TCL_OK;
}
-static int get_server_handle(Tcl_Interp *interp, char *name, void **handle)
+static int get_server_handle(Tcl_Interp *interp, const char *name,
+ void **handle)
{
Tcl_HashEntry *entry;
return TCL_OK;
}
-static int remove_server_handle(Tcl_Interp *interp, char *name)
+static int remove_server_handle(Tcl_Interp *interp, const char *name)
{
Tcl_HashEntry *entry;
#define GET_HANDLE(num_args, do_dostruct) \
void *server_handle; \
int dostruct = 0; \
- char *whoami = argv[0]; \
+ const char *whoami = argv[0]; \
argv++, argc--; \
if ((argc > 0) && (! strcmp(argv[0], "-struct"))) { \
if (! do_dostruct) { \
-static int parse_str(Tcl_Interp *interp, char *in_str, char **out_str)
+static int parse_str(Tcl_Interp *interp, const char *in_str,
+ const char **out_str)
{
if (! in_str) {
*out_str = 0;
*out_str = 0;
}
else {
- *out_str = in_str;
+ *out_str = in_str;
}
return TCL_OK;
}
static int parse_flags(Tcl_Interp *interp, Tcl_HashTable *table,
- struct flagval *array, int size, char *str,
+ struct flagval *array, int size, const char *str,
krb5_flags *flags)
{
int tmp, argc, i, retcode = TCL_OK;
- char **argv;
+ const char **argv;
Tcl_HashEntry *entry;
if (Tcl_GetInt(interp, str, &tmp) == TCL_OK) {
*flags |= *(krb5_flags *) Tcl_GetHashValue(entry);
}
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
return(retcode);
}
sizeof(struct flagval), flags);
}
-static int parse_krb5_flags(Tcl_Interp *interp, char *str, krb5_flags *flags)
+static int parse_krb5_flags(Tcl_Interp *interp, const char *str,
+ krb5_flags *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
}
-static int parse_aux_attributes(Tcl_Interp *interp, char *str, long *flags)
+static int parse_aux_attributes(Tcl_Interp *interp, const char *str,
+ long *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
return TCL_OK;
}
-static int parse_principal_mask(Tcl_Interp *interp, char *str, krb5_int32 *flags)
+static int parse_principal_mask(Tcl_Interp *interp, const char *str,
+ krb5_int32 *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
}
-static int parse_policy_mask(Tcl_Interp *interp, char *str, krb5_int32 *flags)
+static int parse_policy_mask(Tcl_Interp *interp, const char *str,
+ krb5_int32 *flags)
{
krb5_flags tmp;
static Tcl_HashTable *table = 0;
-static int parse_principal_ent(Tcl_Interp *interp, char *list,
+static int parse_principal_ent(Tcl_Interp *interp, const char *list,
ovsec_kadm_principal_ent_t *out_princ)
{
ovsec_kadm_principal_ent_t princ = 0;
krb5_error_code krb5_ret;
int tcl_ret;
int argc;
- char **argv;
+ const char **argv;
int tmp;
int retcode = TCL_OK;
}
finished:
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
*out_princ = princ;
return retcode;
}
ovsec_kadm_policy_ent_t policy = 0;
int tcl_ret;
int argc;
- char **argv;
+ const char **argv;
int tmp;
int retcode = TCL_OK;
policy->policy_refcnt = tmp;
finished:
- Tcl_Free(argv);
+ Tcl_Free((char *) argv);
*out_policy = policy;
return retcode;
}
static int tcl_ovsec_kadm_init(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
ovsec_kadm_ret_t ret;
char *client_name, *pass, *service_name, *realm;
int tcl_ret;
krb5_ui_4 struct_version, api_version;
- char *handle_var;
+ const char *handle_var;
void *server_handle;
char *handle_name;
- char *whoami = argv[0];
+ const char *whoami = argv[0];
argv++, argc--;
static int tcl_ovsec_kadm_destroy(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
ovsec_kadm_ret_t ret;
int tcl_ret;
static int tcl_ovsec_kadm_create_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
int tcl_ret;
ovsec_kadm_ret_t ret;
static int tcl_ovsec_kadm_delete_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
krb5_error_code krb5_ret;
ovsec_kadm_ret_t ret;
int tcl_ret;
- char *name;
+ const char *name;
GET_HANDLE(1, 0);
static int tcl_ovsec_kadm_modify_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
- char *princ_string;
+ const char *princ_string;
ovsec_kadm_principal_ent_t princ = 0;
int tcl_ret;
krb5_int32 mask;
static int tcl_ovsec_kadm_rename_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal source, target;
krb5_error_code krb5_ret;
static int tcl_ovsec_kadm_chpass_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
char *pw;
static int tcl_ovsec_kadm_chpass_principal_util(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
char *new_pw;
static int tcl_ovsec_kadm_randkey_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
krb5_keyblock *keyblock;
- char *keyblock_var;
+ const char *keyblock_var;
Tcl_DString *keyblock_dstring = 0;
#ifdef OVERRIDE
int override_qual;
static int tcl_ovsec_kadm_get_principal(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
krb5_principal princ;
ovsec_kadm_principal_ent_t ent;
static int tcl_ovsec_kadm_create_policy(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
int tcl_ret;
ovsec_kadm_ret_t ret;
static int tcl_ovsec_kadm_delete_policy(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
ovsec_kadm_ret_t ret;
char *policy;
static int tcl_ovsec_kadm_modify_policy(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *policy_string;
ovsec_kadm_policy_ent_t policy = 0;
static int tcl_ovsec_kadm_get_policy(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
ovsec_kadm_policy_ent_t ent;
Tcl_DString *ent_dstring = 0;
static int tcl_ovsec_kadm_free_principal_ent(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *ent_name;
ovsec_kadm_principal_ent_t ent;
static int tcl_ovsec_kadm_free_policy_ent(ClientData clientData,
Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
char *ent_name;
ovsec_kadm_policy_ent_t ent;
static int tcl_ovsec_kadm_get_privs(ClientData clientData, Tcl_Interp *interp,
- int argc, char *argv[])
+ int argc, const char *argv[])
{
- char *set_ret;
+ const char *set_ret;
ovsec_kadm_ret_t ret;
char *priv_var;
long privs;