summaryrefslogtreecommitdiffstats
path: root/src/ccapi/lib
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2007-09-27 05:30:20 +0000
committerAlexandra Ellwood <lxs@mit.edu>2007-09-27 05:30:20 +0000
commit4512a692228ab03ff83e7eaf0e20684b7c38659a (patch)
treebdf4d06413afafd1d95b1178e463aafdb18afa68 /src/ccapi/lib
parenta6308edc0bd456471e740c301a8c366258b29ccd (diff)
downloadkrb5-4512a692228ab03ff83e7eaf0e20684b7c38659a.tar.gz
krb5-4512a692228ab03ff83e7eaf0e20684b7c38659a.tar.xz
krb5-4512a692228ab03ff83e7eaf0e20684b7c38659a.zip
cc_ccache_set_principal and cc_ccache_get_principal were also ignoring their
credentials version inputs. ticket: 5771 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19986 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/ccapi/lib')
-rw-r--r--src/ccapi/lib/ccapi_ccache.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ccapi/lib/ccapi_ccache.c b/src/ccapi/lib/ccapi_ccache.c
index 485e6ceea8..b2ea37a1d4 100644
--- a/src/ccapi/lib/ccapi_ccache.c
+++ b/src/ccapi/lib/ccapi_ccache.c
@@ -286,6 +286,7 @@ cc_int32 ccapi_ccache_get_principal (cc_ccache_t in_ccache,
{
cc_int32 err = ccNoError;
cci_ccache_t ccache = (cci_ccache_t) in_ccache;
+ cci_stream_t request = NULL;
cci_stream_t reply = NULL;
char *principal = NULL;
@@ -293,9 +294,17 @@ cc_int32 ccapi_ccache_get_principal (cc_ccache_t in_ccache,
if (!out_principal) { err = cci_check_error (ccErrBadParam); }
if (!err) {
+ err = cci_stream_new (&request);
+ }
+
+ if (!err) {
+ err = cci_stream_write_uint32 (request, in_credentials_version);
+ }
+
+ if (!err) {
err = cci_ipc_send (cci_ccache_get_principal_msg_id,
ccache->identifier,
- NULL,
+ request,
&reply);
}
@@ -307,6 +316,7 @@ cc_int32 ccapi_ccache_get_principal (cc_ccache_t in_ccache,
err = cci_string_new (out_principal, principal);
}
+ cci_stream_release (request);
cci_stream_release (reply);
free (principal);
@@ -331,6 +341,10 @@ cc_int32 ccapi_ccache_set_principal (cc_ccache_t io_ccache,
}
if (!err) {
+ err = cci_stream_write_uint32 (request, in_credentials_version);
+ }
+
+ if (!err) {
err = cci_stream_write_string (request, in_principal);
}