Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2354C18CC7 for ; Tue, 9 Feb 2016 22:57:15 +0000 (UTC) Received: (qmail 73504 invoked by uid 500); 9 Feb 2016 22:57:15 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 73464 invoked by uid 500); 9 Feb 2016 22:57:15 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 73455 invoked by uid 99); 9 Feb 2016 22:57:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2016 22:57:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CD864E031B; Tue, 9 Feb 2016 22:57:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smckinney@apache.org To: commits@directory.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: directory-fortress-core git commit: FC-133 - Change audit flags Date: Tue, 9 Feb 2016 22:57:14 +0000 (UTC) Repository: directory-fortress-core Updated Branches: refs/heads/master df91b2a1c -> b08bdc132 FC-133 - Change audit flags Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/b08bdc13 Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/b08bdc13 Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/b08bdc13 Branch: refs/heads/master Commit: b08bdc13281d62b59dba98b38ef9654f6370e704 Parents: df91b2a Author: Shawn McKinney Authored: Tue Feb 9 06:39:08 2016 -0600 Committer: Shawn McKinney Committed: Tue Feb 9 06:39:08 2016 -0600 ---------------------------------------------------------------------- ldap/slapd.conf.src | 2 +- .../org/apache/directory/fortress/core/impl/UserDAO.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/b08bdc13/ldap/slapd.conf.src ---------------------------------------------------------------------- diff --git a/ldap/slapd.conf.src b/ldap/slapd.conf.src index 54bf681..970cb25 100755 --- a/ldap/slapd.conf.src +++ b/ldap/slapd.conf.src @@ -28,7 +28,7 @@ include @SCHEMA_PATH@/inetorgperson.schema include @SCHEMA_PATH@/nis.schema include @SCHEMA_PATH@/openldap.schema include @SCHEMA_PATH@/fortress.schema -include @SCHEMA_PATH@/rbac.schema +@IS_RBAC_ACCELERATOR@include @SCHEMA_PATH@/rbac.schema ### SSL Configuration @IS_SSL@TLSCACertificateFile @CA_CERT_FILEW@ http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/b08bdc13/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java index 7da42ea..c5b7bc3 100755 --- a/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java +++ b/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java @@ -1691,6 +1691,7 @@ final class UserDAO extends ApacheDsDataProvider try { + // Perform this operation as the end user to allow password policy checking: ld = getUserConnection(); bind( ld, userDn, entity.getPassword() ); mods = new ArrayList(); @@ -1698,14 +1699,13 @@ final class UserDAO extends ApacheDsDataProvider mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, SchemaConstants .USER_PASSWORD_AT, new String( newPassword ) ) ); + // This modify changes the password and checks password policies (if enabled) modify( ld, userDn, mods ); - // The 2nd modify is to update audit attributes on the User entry: - if ( !GlobalIds.IS_AUDIT_DISABLED && ( entity.getAdminSession() != null ) ) + // This modify update audit attributes on the User entry (if enabled): + if ( GlobalIds.IS_OPENLDAP && ! GlobalIds.IS_AUDIT_DISABLED ) { - // Because the user modified their own password, set their userId here: - //(entity.getAdminSession()).setInternalUserId(entity.getUserId()); - mods = new ArrayList(); + mods = new ArrayList<>(); modify( ld, userDn, mods, entity ); } }