summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-10-07 16:49:33 +0200
committerMartin Kosek <mkosek@redhat.com>2013-10-08 09:19:05 +0200
commit1e0dfe1299f3802c9c45e75d2cbbbe07ebc75070 (patch)
treea3962546f116dc761d4b53799de793cc345ba1c3
parentcdae86ca461b1cf8895b33d9338d670610b30747 (diff)
downloadfreeipa.git-1e0dfe1299f3802c9c45e75d2cbbbe07ebc75070.tar.gz
freeipa.git-1e0dfe1299f3802c9c45e75d2cbbbe07ebc75070.tar.xz
freeipa.git-1e0dfe1299f3802c9c45e75d2cbbbe07ebc75070.zip
Use the right attribute with ipapwd_entry_checks for MagicRegen
There is a special mode to set the ipaNTHash attribute if a RC4 Kerberos key is available for the corresponding user. This is typically triggered by samba via the ipa_sam passdb plugin. The principal used by samba to connect to the IPA directory server has the right to modify ipaNTHash but no other password attribute. This means that the current check on the userPassword attribute is too strict for this case and leads to a failure of the whole operation. With this patch the access right on ipaNTHash are checked if no other password operations are requested.
-rw-r--r--daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
index 8a222650..64a9d314 100644
--- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
+++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/prepost.c
@@ -554,7 +554,8 @@ static int ipapwd_pre_mod(Slapi_PBlock *pb)
rc = ipapwd_entry_checks(pb, e,
&is_root, &is_krb, &is_smb, &is_ipant,
- SLAPI_USERPWD_ATTR, SLAPI_ACL_WRITE);
+ is_pwd_op ? SLAPI_USERPWD_ATTR : "ipaNTHash",
+ SLAPI_ACL_WRITE);
if (rc) {
goto done;
}