new case added to the switch for GET_GENERATION_NUMBER.
* misc.c: No loger includes adb.h directly (server_internal.h already
pulls that in).
* ovsec_kadmd.c (log_badverf): GET_GENERATION_NUMBER added to
proc_names array.
* server_stubs.c: Added new function getgeneration_4_svc.
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/incremental-propagation-branch@13405
dc483132-0cff-0310-8789-
dd5450dbe970
+2001-06-20 Mitchell Berger <mitchb@mit.edu>
+
+ * kadm_rpc_svc.c (kadm_1): getgeneration_arg added to argument union,
+ new case added to the switch for GET_GENERATION_NUMBER.
+
+ * misc.c: No loger includes adb.h directly (server_internal.h already
+ pulls that in).
+
+ * ovsec_kadmd.c (log_badverf): GET_GENERATION_NUMBER added to
+ proc_names array.
+
+ * server_stubs.c: Added new function getgeneration_4_svc.
+
2001-06-08 Ezra Peisach <epeisach@mit.edu>
* ovsec_kadmd.c (main): Make format string to sprintf specify that
chpass3_arg chpass_principal3_1_arg;
chrand3_arg chrand_principal3_1_arg;
setkey3_arg setkey_principal3_1_arg;
+ getgeneration_arg getgeneration_4_arg;
} argument;
char *result;
bool_t (*xdr_argument)(), (*xdr_result)();
local = (char *(*)()) setkey_principal3_1_svc;
break;
+ case GET_GENERATION_NUMBER:
+ xdr_argument = xdr_getgeneration_arg;
+ xdr_result = xdr_getgeneration_ret;
+ local = (char *(*)()) getgeneration_4_svc;
+ break;
+
default:
krb5_klog_syslog(LOG_ERR, "Invalid KADM5 procedure number: %s, %d",
inet_ntoa(rqstp->rq_xprt->xp_raddr.sin_addr),
static char *rcsid = "$Header$";
#endif
-#include <kadm5/adb.h>
#include <kadm5/server_internal.h>
#include <krb5/kdb.h>
#include "misc.h"
{18, "CREATE_PRINCIPAL3"},
{19, "CHPASS_PRINCIPAL3"},
{20, "CHRAND_PRINCIPAL3"},
- {21, "SETKEY_PRINCIPAL3"}
+ {21, "SETKEY_PRINCIPAL3"},
+ {22, "GET_GENERATION_NUMBER"}
};
#define NPROCNAMES (sizeof (proc_names) / sizeof (struct procnames))
OM_uint32 minor;
return &ret;
}
+getgeneration_ret * getgeneration_4_svc(getgeneration_arg *arg,
+ struct svc_req *rqstp)
+{
+ static getgeneration_ret ret;
+ gss_buffer_desc client_name, service_name;
+ OM_uint32 minor_stat;
+ kadm5_server_handle_t handle;
+
+ xdr_free(xdr_getgeneration_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;
+ }
+
+ ret.code = kadm5_get_generation_number((void *)handle, &ret.generation);
+ krb5_klog_syslog(LOG_NOTICE, LOG_DONE, "kadm5_get_generation_number",
+ client_name.value,
+ ((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);
+ gss_release_buffer(&minor_stat, &client_name);
+ gss_release_buffer(&minor_stat, &service_name);
+ return &ret;
+}
+
generic_ret *init_1_svc(krb5_ui_4 *arg, struct svc_req *rqstp)
{
static generic_ret ret;