From: Tom Yu Date: Tue, 1 Jul 1997 06:35:43 +0000 (+0000) Subject: * client_principal.c, client_rpc.c: Add support for setv4key X-Git-Tag: krb5-1.1-beta1~1115 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eb46ba798f5f561bbad8ef90dba7b1df4fbcb8bd;p=krb5.git * client_principal.c, client_rpc.c: Add support for setv4key git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10109 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/clnt/ChangeLog b/src/lib/kadm5/clnt/ChangeLog index 3635a324f..21d45718a 100644 --- a/src/lib/kadm5/clnt/ChangeLog +++ b/src/lib/kadm5/clnt/ChangeLog @@ -1,3 +1,6 @@ +Tue Jul 1 02:34:46 1997 Tom Yu + + * client_principal.c, client_rpc.c: Add support for setv4key. Mon Mar 31 17:40:48 1997 Barry Jaspan * client_principal.c, client_rpc.c: add support for diff --git a/src/lib/kadm5/clnt/client_principal.c b/src/lib/kadm5/clnt/client_principal.c index adcbb291f..73a2f2950 100644 --- a/src/lib/kadm5/clnt/client_principal.c +++ b/src/lib/kadm5/clnt/client_principal.c @@ -261,6 +261,29 @@ kadm5_chpass_principal(void *server_handle, return r->code; } +kadm5_ret_t +kadm5_setv4key_principal(void *server_handle, + krb5_principal princ, + krb5_keyblock *keyblock) +{ + setv4key_arg arg; + generic_ret *r; + kadm5_server_handle_t handle = server_handle; + + CHECK_HANDLE(server_handle); + + arg.princ = princ; + arg.keyblock = keyblock; + arg.api_version = handle->api_version; + + if(princ == NULL || keyblock == NULL) + return EINVAL; + r = setv4key_principal_1(&arg, handle->clnt); + if(r == NULL) + return KADM5_RPC_ERROR; + return r->code; +} + kadm5_ret_t kadm5_setkey_principal(void *server_handle, krb5_principal princ, diff --git a/src/lib/kadm5/clnt/client_rpc.c b/src/lib/kadm5/clnt/client_rpc.c index ecb5943b3..86830b011 100644 --- a/src/lib/kadm5/clnt/client_rpc.c +++ b/src/lib/kadm5/clnt/client_rpc.c @@ -106,6 +106,20 @@ chpass_principal_1(argp, clnt) return (&res); } +generic_ret * +setv4key_principal_1(argp, clnt) + setv4key_arg *argp; + CLIENT *clnt; +{ + static generic_ret res; + + memset((char *)&res, 0, sizeof(res)); + if (clnt_call(clnt, SETV4KEY_PRINCIPAL, xdr_setv4key_arg, argp, xdr_generic_ret, &res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&res); +} + generic_ret * setkey_principal_1(argp, clnt) setkey_arg *argp;