summaryrefslogtreecommitdiffstats
path: root/src/kadmin/server
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1997-07-01 06:37:29 +0000
committerTom Yu <tlyu@mit.edu>1997-07-01 06:37:29 +0000
commit90f75959cbde8620359084e1d80e294e0d1c497d (patch)
tree1e5766f547b13cc0d457d7a0e74e4931502f7129 /src/kadmin/server
parent8c7e731a5905a0d08eeb9fbaba4b160b96647d54 (diff)
downloadkrb5-90f75959cbde8620359084e1d80e294e0d1c497d.tar.gz
krb5-90f75959cbde8620359084e1d80e294e0d1c497d.tar.xz
krb5-90f75959cbde8620359084e1d80e294e0d1c497d.zip
* kadm_rpc_svc.c, server_stubs.c: Add support for setv4key
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10111 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/server')
-rw-r--r--src/kadmin/server/ChangeLog4
-rw-r--r--src/kadmin/server/kadm_rpc_svc.c9
-rw-r--r--src/kadmin/server/server_stubs.c55
3 files changed, 68 insertions, 0 deletions
diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog
index ea9cbdb73e..7d28b79baa 100644
--- a/src/kadmin/server/ChangeLog
+++ b/src/kadmin/server/ChangeLog
@@ -1,3 +1,7 @@
+Tue Jul 1 02:36:55 1997 Tom Yu <tlyu@mit.edu>
+
+ * kadm_rpc_svc.c, server_stubs.c: Add support for setv4key.
+
Mon Mar 31 17:42:03 1997 Barry Jaspan <bjaspan@mit.edu>
* kadm_rpc_svc.c, server_stubs.c: add support for setkey_principal
diff --git a/src/kadmin/server/kadm_rpc_svc.c b/src/kadmin/server/kadm_rpc_svc.c
index c4b6ebc598..a012bce98a 100644
--- a/src/kadmin/server/kadm_rpc_svc.c
+++ b/src/kadmin/server/kadm_rpc_svc.c
@@ -5,6 +5,9 @@
* $Source$
*
* $Log$
+ * Revision 1.14 1997/07/01 06:37:28 tlyu
+ * * kadm_rpc_svc.c, server_stubs.c: Add support for setv4key.
+ *
* Revision 1.13 1997/04/23 19:53:11 bjaspan
* add kadm5_setkey_principal
*
@@ -177,6 +180,12 @@ void kadm_1(rqstp, transp)
local = (char *(*)()) chpass_principal_1;
break;
+ case SETV4KEY_PRINCIPAL:
+ xdr_argument = xdr_setv4key_arg;
+ xdr_result = xdr_generic_ret;
+ local = (char *(*)()) setv4key_principal_1;
+ break;
+
case SETKEY_PRINCIPAL:
xdr_argument = xdr_setkey_arg;
xdr_result = xdr_generic_ret;
diff --git a/src/kadmin/server/server_stubs.c b/src/kadmin/server/server_stubs.c
index 1d04c03d93..a4015b5c00 100644
--- a/src/kadmin/server/server_stubs.c
+++ b/src/kadmin/server/server_stubs.c
@@ -612,6 +612,61 @@ chpass_principal_1(chpass_arg *arg, struct svc_req *rqstp)
}
generic_ret *
+setv4key_principal_1(setv4key_arg *arg, struct svc_req *rqstp)
+{
+ static generic_ret ret;
+ char *prime_arg;
+ gss_buffer_desc client_name,
+ service_name;
+ OM_uint32 minor_stat;
+ kadm5_server_handle_t handle;
+
+ xdr_free(xdr_generic_ret, &ret);
+
+ if (ret.code = new_server_handle(arg->api_version, rqstp, &handle))
+ return &ret;
+
+ if (ret.code = check_handle((void *)handle)) {
+ free_server_handle(handle);
+ return &ret;
+ }
+
+ ret.api_version = handle->api_version;
+
+ if (setup_gss_names(rqstp, &client_name, &service_name) < 0) {
+ ret.code = KADM5_FAILURE;
+ return &ret;
+ }
+ krb5_unparse_name(handle->context, arg->princ, &prime_arg);
+
+ if (!(CHANGEPW_SERVICE(rqstp)) &&
+ acl_check(handle->context, rqstp->rq_clntcred,
+ ACL_SETKEY, arg->princ)) {
+ ret.code = kadm5_setv4key_principal((void *)handle, arg->princ,
+ arg->keyblock);
+ } else {
+ krb5_klog_syslog(LOG_NOTICE, LOG_UNAUTH, "kadm5_setv4key_principal",
+ prime_arg, client_name.value, service_name.value,
+ inet_ntoa(rqstp->rq_xprt->xp_raddr.sin_addr));
+ ret.code = KADM5_AUTH_SETKEY;
+ }
+
+ if(ret.code != KADM5_AUTH_SETKEY) {
+ krb5_klog_syslog(LOG_NOTICE, LOG_DONE, "kadm5_setv4key_principal",
+ prime_arg, ((ret.code == 0) ? "success" :
+ error_message(ret.code)),
+ client_name.value, service_name.value,
+ inet_ntoa(rqstp->rq_xprt->xp_raddr.sin_addr));
+ }
+
+ free_server_handle(handle);
+ free(prime_arg);
+ gss_release_buffer(&minor_stat, &client_name);
+ gss_release_buffer(&minor_stat, &service_name);
+ return &ret;
+}
+
+generic_ret *
setkey_principal_1(setkey_arg *arg, struct svc_req *rqstp)
{
static generic_ret ret;