svn rev #25858: trunk/src/ include/ include/krb5/ lib/krb5/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Wed May 9 13:55:27 EDT 2012
http://src.mit.edu/fisheye/changelog/krb5/?cs=25858
Commit By: ghudson
Log Message:
Constify get_init_creds string input params
The get_init_creds functions take read-only string input parameters
for passwords and initial ticket services. Make these const char *
parameters instead of just char * parameters, for caller convenience.
Reported by rra at stanford.edu.
ticket: 7121
Changed Files:
U trunk/src/include/k5-int.h
U trunk/src/include/krb5/krb5.hin
U trunk/src/lib/krb5/krb/get_in_tkt.c
U trunk/src/lib/krb5/krb/gic_keytab.c
U trunk/src/lib/krb5/krb/gic_pwd.c
U trunk/src/lib/krb5/krb/val_renew.c
Modified: trunk/src/include/k5-int.h
===================================================================
--- trunk/src/include/k5-int.h 2012-05-09 17:40:38 UTC (rev 25857)
+++ trunk/src/include/k5-int.h 2012-05-09 17:55:27 UTC (rev 25858)
@@ -1013,7 +1013,8 @@
krb5int_get_init_creds(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_prompter_fct prompter,
void *prompter_data, krb5_deltat start_time,
- char *in_tkt_service, krb5_get_init_creds_opt *options,
+ const char *in_tkt_service,
+ krb5_get_init_creds_opt *options,
krb5_gic_get_as_key_fct gak, void *gak_data,
int *master, krb5_kdc_rep **as_reply);
Modified: trunk/src/include/krb5/krb5.hin
===================================================================
--- trunk/src/include/krb5/krb5.hin 2012-05-09 17:40:38 UTC (rev 25857)
+++ trunk/src/include/krb5/krb5.hin 2012-05-09 17:55:27 UTC (rev 25858)
@@ -6696,9 +6696,10 @@
*/
krb5_error_code KRB5_CALLCONV
krb5_get_init_creds_password(krb5_context context, krb5_creds *creds,
- krb5_principal client, char *password,
+ krb5_principal client, const char *password,
krb5_prompter_fct prompter, void *data,
- krb5_deltat start_time, char *in_tkt_service,
+ krb5_deltat start_time,
+ const char *in_tkt_service,
krb5_get_init_creds_opt *k5_gic_options);
struct _krb5_init_creds_context;
@@ -7040,7 +7041,7 @@
krb5_error_code KRB5_CALLCONV
krb5_get_init_creds_keytab(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_keytab arg_keytab,
- krb5_deltat start_time, char *in_tkt_service,
+ krb5_deltat start_time, const char *in_tkt_service,
krb5_get_init_creds_opt *k5_gic_options);
typedef struct _krb5_verify_init_creds_opt {
@@ -7150,7 +7151,7 @@
krb5_error_code KRB5_CALLCONV
krb5_get_validated_creds(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_ccache ccache,
- char *in_tkt_service);
+ const char *in_tkt_service);
/**
* Get renewed credential from KDC using an existing credential.
@@ -7176,7 +7177,7 @@
krb5_error_code KRB5_CALLCONV
krb5_get_renewed_creds(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_ccache ccache,
- char *in_tkt_service);
+ const char *in_tkt_service);
/**
* Decode an ASN.1-formatted ticket.
Modified: trunk/src/lib/krb5/krb/get_in_tkt.c
===================================================================
--- trunk/src/lib/krb5/krb/get_in_tkt.c 2012-05-09 17:40:38 UTC (rev 25857)
+++ trunk/src/lib/krb5/krb/get_in_tkt.c 2012-05-09 17:55:27 UTC (rev 25858)
@@ -437,7 +437,7 @@
static krb5_error_code
build_in_tkt_name(krb5_context context,
- char *in_tkt_service,
+ const char *in_tkt_service,
krb5_const_principal client,
krb5_principal *server)
{
@@ -1616,7 +1616,7 @@
krb5_prompter_fct prompter,
void *prompter_data,
krb5_deltat start_time,
- char *in_tkt_service,
+ const char *in_tkt_service,
krb5_get_init_creds_opt *options,
krb5_gic_get_as_key_fct gak_fct,
void *gak_data,
Modified: trunk/src/lib/krb5/krb/gic_keytab.c
===================================================================
--- trunk/src/lib/krb5/krb/gic_keytab.c 2012-05-09 17:40:38 UTC (rev 25857)
+++ trunk/src/lib/krb5/krb/gic_keytab.c 2012-05-09 17:55:27 UTC (rev 25858)
@@ -209,7 +209,7 @@
static krb5_error_code
get_init_creds_keytab(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_keytab keytab,
- krb5_deltat start_time, char *in_tkt_service,
+ krb5_deltat start_time, const char *in_tkt_service,
krb5_get_init_creds_opt *options, int *use_master)
{
krb5_error_code ret;
@@ -250,7 +250,7 @@
krb5_principal client,
krb5_keytab arg_keytab,
krb5_deltat start_time,
- char *in_tkt_service,
+ const char *in_tkt_service,
krb5_get_init_creds_opt *options)
{
krb5_error_code ret, ret2;
Modified: trunk/src/lib/krb5/krb/gic_pwd.c
===================================================================
--- trunk/src/lib/krb5/krb/gic_pwd.c 2012-05-09 17:40:38 UTC (rev 25857)
+++ trunk/src/lib/krb5/krb/gic_pwd.c 2012-05-09 17:55:27 UTC (rev 25858)
@@ -218,11 +218,11 @@
krb5_get_init_creds_password(krb5_context context,
krb5_creds *creds,
krb5_principal client,
- char *password,
+ const char *password,
krb5_prompter_fct prompter,
void *data,
krb5_deltat start_time,
- char *in_tkt_service,
+ const char *in_tkt_service,
krb5_get_init_creds_opt *options)
{
krb5_error_code ret, ret2;
Modified: trunk/src/lib/krb5/krb/val_renew.c
===================================================================
--- trunk/src/lib/krb5/krb/val_renew.c 2012-05-09 17:40:38 UTC (rev 25857)
+++ trunk/src/lib/krb5/krb/val_renew.c 2012-05-09 17:55:27 UTC (rev 25858)
@@ -136,7 +136,7 @@
static krb5_error_code
get_valrenewed_creds(krb5_context context, krb5_creds *out_creds,
krb5_principal client, krb5_ccache ccache,
- char *in_tkt_service, int kdcopt)
+ const char *in_tkt_service, int kdcopt)
{
krb5_error_code code;
krb5_creds in_creds, *new_creds;
@@ -181,7 +181,7 @@
krb5_error_code KRB5_CALLCONV
krb5_get_validated_creds(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_ccache ccache,
- char *in_tkt_service)
+ const char *in_tkt_service)
{
return get_valrenewed_creds(context, creds, client, ccache,
in_tkt_service, KDC_OPT_VALIDATE);
@@ -190,7 +190,7 @@
krb5_error_code KRB5_CALLCONV
krb5_get_renewed_creds(krb5_context context, krb5_creds *creds,
krb5_principal client, krb5_ccache ccache,
- char *in_tkt_service)
+ const char *in_tkt_service)
{
return get_valrenewed_creds(context, creds, client, ccache,
in_tkt_service, KDC_OPT_RENEW);
More information about the cvs-krb5
mailing list