[Pkg-fedora-ds-maintainers] 389-ds-base: Changes to 'upstream-experimental'

Timo Aaltonen tjaalton-guest at alioth.debian.org
Tue Mar 12 07:53:18 UTC 2013


 VERSION.sh               |    2 +-
 ldap/servers/slapd/dse.c |   32 ++++++++++++++------------------
 ldap/servers/slapd/pw.c  |    8 +++++++-
 3 files changed, 22 insertions(+), 20 deletions(-)

New commits:
commit d8da32fc252bfb515c16c1436332a3f918242b99
Author: Noriko Hosoi <nhosoi at totoro.usersys.redhat.com>
Date:   Wed Feb 13 15:27:53 2013 -0800

    bump version to 1.3.0.3

diff --git a/VERSION.sh b/VERSION.sh
index 852013d..6391f34 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
 # PACKAGE_VERSION is constructed from these
 VERSION_MAJOR=1
 VERSION_MINOR=3
-VERSION_MAINT=0.2
+VERSION_MAINT=0.3
 # if this is a PRERELEASE, set VERSION_PREREL
 # otherwise, comment it out
 # be sure to include the dot prefix in the prerel

commit 4dcf155d2b25c15d52a6336790f2e82acb37228e
Author: Noriko Hosoi <nhosoi at totoro.usersys.redhat.com>
Date:   Wed Feb 13 14:13:56 2013 -0800

    Ticket #584 - Existence of an entry is not checked when its password is to be deleted
    
    Bug description: When attempting to delete a password from an
    entry, a password syntax checking api check_pw_syntax_ext missed
    a check if the target entry exists or not.  Note: add and replace
    checks it and handles the case correctly.
    
    Fix description: In this patch the check is added to the delete
    case, as well.
    
    Reviewed by Rich (Thank you!!)
    (cherry picked from commit d559d4665b18702b51161a25737b62799d8ef430)

diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index 9135a52..b01fb2b 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -777,7 +777,7 @@ int
 check_pw_syntax_ext ( Slapi_PBlock *pb, const Slapi_DN *sdn, Slapi_Value **vals,
 			char **old_pw, Slapi_Entry *e, int mod_op, Slapi_Mods *smods)
 {
-   	Slapi_Attr		*attr;
+	Slapi_Attr		*attr;
 	int 			i, pwresponse_req = 0;
 	int				is_replication = 0;
 	int				internal_op = 0;
@@ -794,6 +794,12 @@ check_pw_syntax_ext ( Slapi_PBlock *pb, const Slapi_DN *sdn, Slapi_Value **vals,
 	 * PASS == 0.
 	 */
 	if (LDAP_MOD_DELETE == (mod_op & LDAP_MOD_OP)) {
+		/* check if the entry exists or not */
+		e = get_entry(pb, dn);
+		if (e == NULL) {
+			return -1;
+		}
+		slapi_entry_free(e); 
 		return 0;
 	}
 	if (NULL == vals) {

commit ba4b1c6f693cd4b30a061b760fa19921b1eeb79c
Author: Mark Reynolds <mreynolds at redhat.com>
Date:   Thu Jan 24 11:02:25 2013 -0500

    Ticket 562 - Crash when deleting suffix
    
    Bug Description:  If you delete a suffix you can crash the server if
                      you do not have a backend "userRoot".
    
    Fix Description:  Not sure why the nsme userroot needs to be present, maybe
                      it impacts the callback linked list order, not sure.  So
                      in dse_call_callback we grab the next callback before
                      calling the callback function.  It's possible that one of
                      these callbacks will unregister other callbacks - potentially
                      the "next" callback that we already put aside.  So it
                      gets freed, and then its read on the next pass which crashes
                      the server.
    
                      The fix is just to not "pre grab" the next callback, and
                      wait until after the callback function returns to move on
                      to the next callback.
    
                      Note:  this only appears to happen on 32-bit platforms.
    
    https://fedorahosted.org/389/ticket/562
    
    Reviewed by: Ludwig & nkinder(Thanks!)
    (cherry picked from commit 6c855a8ce0de3c6b34594856762e68503da433fc)

diff --git a/ldap/servers/slapd/dse.c b/ldap/servers/slapd/dse.c
index fd40432..27e71b6 100644
--- a/ldap/servers/slapd/dse.c
+++ b/ldap/servers/slapd/dse.c
@@ -2396,31 +2396,27 @@ dse_call_callback(struct dse* pdse, Slapi_PBlock *pb, int operation, int flags,
     /* ONREPL callbacks can potentially modify pblock parameters like backend
      * which would cause problems during request processing. We need to save 
      * "important" fields before calls and restoring them afterwards */
-    int r = SLAPI_DSE_CALLBACK_OK;
+    int rc = SLAPI_DSE_CALLBACK_OK;
+
     if (pdse->dse_callback != NULL) {
-        struct dse_callback *p;
-        p=pdse->dse_callback; 
-		while (p!=NULL) {
-			struct dse_callback *p_next = p->next;
+        struct dse_callback *p = pdse->dse_callback;
+        int result;
+
+        while (p != NULL) {
             if ((p->operation & operation) && (p->flags & flags)) {
-                if(slapi_sdn_scope_test(slapi_entry_get_sdn_const(entryBefore), p->base, p->scope))
-                {
-                    if(NULL == p->slapifilter ||
-							slapi_vattr_filter_test(pb, entryBefore, p->slapifilter,
-									0 /* !verify access */ )==0)
-                    {
-                        int result= (*p->fn)(pb, entryBefore,entryAfter,returncode,returntext,p->fn_arg);
-                        if(result<r)
-                        {
-                            r= result;
+                if(slapi_sdn_scope_test(slapi_entry_get_sdn_const(entryBefore), p->base, p->scope)){
+                    if(NULL == p->slapifilter || slapi_vattr_filter_test(pb, entryBefore, p->slapifilter, 0) == 0){
+                        result = (*p->fn)(pb, entryBefore,entryAfter,returncode,returntext,p->fn_arg);
+                        if(result < rc){
+                            rc = result;
                         }
-					}
+                    }
                 }
             }
-			p = p_next;
+            p = p->next;
         }
     }
-    return r;
+    return rc;
 }
 
 int



More information about the Pkg-fedora-ds-maintainers mailing list