]> git.ipfire.org Git - thirdparty/krb5.git/commit
Allow deletion of require_auth with LDAP KDB 1043/head
authorGreg Hudson <ghudson@mit.edu>
Tue, 25 Feb 2020 16:32:09 +0000 (11:32 -0500)
committerGreg Hudson <ghudson@mit.edu>
Thu, 27 Feb 2020 21:20:33 +0000 (16:20 -0500)
commit6d9da7bb216f96cbdd731aa894714bd84213a9d0
tree67c27acf4e6a50b1e9e298200e49c5efe8a8c1ea
parent50fb43b4a2d97ce2cd53e1ced30e8e8224fede70
Allow deletion of require_auth with LDAP KDB

In update_ldap_mod_auth_ind(), if there is no string attribute value
for require_auth, check for krbPrincipalAuthInd attributes that might
need to be removed.  (This will only work if the entry is loaded and
then modified, but that is the normal case for an existing entry.)

Move the update_ldap_mod_auth_ind() call inside the tl-data
conditional (which should perhaps be a check for KADM5_TL_DATA in the
mask instead).  A modification which did not intend to update tl-data
should not remove the krbPrincipalAuthInd attributes.

Change get_int_from_tl_data() to to zero its output so that it can't
leave a garbage value behind if it returns 0 (as it does if no
KDB_TL_USER_INFO tl-data is present).

Based on a patch by Glenn Machin.

ticket: 8877
tags: pullup
target_version: 1.18-next
target_version: 1.17-next
src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
src/tests/t_kdb.py