Unifdef test for same principal when changing password.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4630 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-03-21 02:07:10 +00:00
parent ffa7f66531
commit 927c6adc1e
2 changed files with 16 additions and 0 deletions

View File

@@ -293,10 +293,14 @@ kadmind_dispatch(void *kadm_handle, krb5_storage *sp)
}
krb5_unparse_name_fixed(context->context, princ, name, sizeof(name));
krb5_warnx(context->context, "%s: %s %s", client, op, name);
#if 0
/* anyone can change her/his own password */
/* but not until there is a way to ensure that the
authentication was done via an initial ticket request */
if(!krb5_principal_compare(context->context, context->caller, princ))
ret = KADM5_AUTH_INSUFFICIENT;
if(ret)
#endif
ret = _kadm5_acl_check_permission(context, KADM5_PRIV_CPW);
if(ret){
krb5_free_principal(context->context, princ);
@@ -317,10 +321,14 @@ kadmind_dispatch(void *kadm_handle, krb5_storage *sp)
goto fail;
krb5_unparse_name_fixed(context->context, princ, name, sizeof(name));
krb5_warnx(context->context, "%s: %s %s", client, op, name);
#if 0
/* anyone can change her/his own password */
/* but not until there is a way to ensure that the
authentication was done via an initial ticket request */
if(!krb5_principal_compare(context->context, context->caller, princ))
ret = KADM5_AUTH_INSUFFICIENT;
if(ret)
#endif
ret = _kadm5_acl_check_permission(context, KADM5_PRIV_CPW);
if(ret){
krb5_free_principal(context->context, princ);