mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Don't expose passwords, even to the administrator.
This ensures they don't leak over LDAP, but does not prevent access,
as ldbsearch locally still bypasses these controls.
Andrew Bartlett
(This used to be commit fa3f3bab33
)
This commit is contained in:
parent
b3cee235f5
commit
4c386ce366
@ -238,7 +238,6 @@ static int kludge_acl_callback(struct ldb_context *ldb, void *context, struct ld
|
||||
{
|
||||
switch (ac->user_type) {
|
||||
case SECURITY_SYSTEM:
|
||||
case SECURITY_ADMINISTRATOR:
|
||||
if (ac->allowedAttributesEffective) {
|
||||
ret = kludge_acl_allowedAttributes(ldb, ares->message, "allowedAttributesEffective");
|
||||
if (ret != LDB_SUCCESS) {
|
||||
@ -252,6 +251,20 @@ static int kludge_acl_callback(struct ldb_context *ldb, void *context, struct ld
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SECURITY_ADMINISTRATOR:
|
||||
if (ac->allowedAttributesEffective) {
|
||||
ret = kludge_acl_allowedAttributes(ldb, ares->message, "allowedAttributesEffective");
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if (ac->allowedChildClassesEffective) {
|
||||
ret = kludge_acl_childClasses(ldb, ares->message, "allowedChildClassesEffective");
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
/* fall though */
|
||||
default:
|
||||
/* remove password attributes */
|
||||
for (i = 0; data->password_attrs[i]; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user