ldap/servers/slapd/modify.c | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit 206130a4c2a8b96e45bd89d8612451653884b915
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Aug 23 14:16:29 2013 -0600
Bug 999634 - ns-slapd crash due to bogus DN
https://bugzilla.redhat.com/show_bug.cgi?id=999634
Reviewed by: ???
Branch: master
Fix Description: When the target DN is not a valid DN, the code will bypass
the initialization of unhashed_pw_smod, and attempt to call slapi_smods_done.
Depending on what memory is in the unhashed_pw_smod, if both mods and
free_mods are true, an attempt will be made to free mods or *mods and the
server will crash. It is tricky to find the right sequence of operations
that will write the stack in such a way that both unhashed_pw_smod.mods
and unhashed_pw_smod.free_mods are set.
The fix is to just get rid of unhashed_pw_smod which is not used.
I also check this code and other operation code for similar cases, but the
rest of the code is clean.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit a3d65ac00df871675896f587b0da2c24eab961bb)
(cherry picked from commit f513bc3f955a07c9d22128b312dbbb0384192e31)
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index 2677b92..957f36e 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -653,7 +653,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
int passin_sdn = 0;
LDAPMod **mods, *pw_mod, **tmpmods = NULL;
Slapi_Mods smods;
- Slapi_Mods unhashed_pw_smod;
int repl_op, internal_op, lastmod, skip_modified_attrs;
char *unhashed_pw_attr = NULL;
Slapi_Operation *operation;
@@ -692,8 +691,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
slapi_mods_init_passin (&smods, mods);
- slapi_mods_init(&unhashed_pw_smod, 0);
-
/* target spec is used to decide which plugins are applicable for the operation */
operation_set_target_spec (pb->pb_op, sdn);
@@ -1138,7 +1135,6 @@ free_and_return:
if (be)
slapi_be_Unlock(be);
- slapi_mods_done(&unhashed_pw_smod); /* can finalize now */
if (unhashed_pw_attr)
slapi_ch_free ((void**)&unhashed_pw_attr);
VERSION.sh | 2 +-
ldap/servers/slapd/modify.c | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
New commits:
commit 60cfb7370ca457b36fdfaa2820bf05fbe3f26859
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Aug 28 14:53:36 2013 -0700
bump version to 1.3.1.7
diff --git a/VERSION.sh b/VERSION.sh
index 6bd724d..3a45057 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=1.6
+VERSION_MAINT=1.7
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
commit abdf69842a2525b6a670aafd2a940a0c67b656ec
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Aug 23 14:16:29 2013 -0600
Bug 999634 - ns-slapd crash due to bogus DN
https://bugzilla.redhat.com/show_bug.cgi?id=999634
Reviewed by: ???
Branch: 389-ds-base-1.3.1
Fix Description: When the target DN is not a valid DN, the code will bypass
the initialization of unhashed_pw_smod, and attempt to call slapi_smods_done.
Depending on what memory is in the unhashed_pw_smod, if both mods and
free_mods are true, an attempt will be made to free mods or *mods and the
server will crash. It is tricky to find the right sequence of operations
that will write the stack in such a way that both unhashed_pw_smod.mods
and unhashed_pw_smod.free_mods are set.
The fix is to just get rid of unhashed_pw_smod which is not used.
I also check this code and other operation code for similar cases, but the
rest of the code is clean.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit a3d65ac00df871675896f587b0da2c24eab961bb)
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index 2677b92..957f36e 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -653,7 +653,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
int passin_sdn = 0;
LDAPMod **mods, *pw_mod, **tmpmods = NULL;
Slapi_Mods smods;
- Slapi_Mods unhashed_pw_smod;
int repl_op, internal_op, lastmod, skip_modified_attrs;
char *unhashed_pw_attr = NULL;
Slapi_Operation *operation;
@@ -692,8 +691,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
slapi_mods_init_passin (&smods, mods);
- slapi_mods_init(&unhashed_pw_smod, 0);
-
/* target spec is used to decide which plugins are applicable for the operation */
operation_set_target_spec (pb->pb_op, sdn);
@@ -1138,7 +1135,6 @@ free_and_return:
if (be)
slapi_be_Unlock(be);
- slapi_mods_done(&unhashed_pw_smod); /* can finalize now */
if (unhashed_pw_attr)
slapi_ch_free ((void**)&unhashed_pw_attr);
VERSION.sh | 2 +-
ldap/servers/slapd/modify.c | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
New commits:
commit bdca4155dda5c01ddca4e1c9d5694c6b0b41df87
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Aug 28 14:29:22 2013 -0700
bump version to 1.3.0.8
diff --git a/VERSION.sh b/VERSION.sh
index a22b290..e949dae 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.7
+VERSION_MAINT=0.8
# if this is a PRERELEASE, set VERSION_PREREL
# otherwise, comment it out
# be sure to include the dot prefix in the prerel
commit 14644c588032626f6f63b8fe4a897e98a212a763
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Aug 23 14:16:29 2013 -0600
Bug 999634 - ns-slapd crash due to bogus DN
https://bugzilla.redhat.com/show_bug.cgi?id=999634
Reviewed by: ???
Branch: 389-ds-base-1.3.0
Fix Description: When the target DN is not a valid DN, the code will bypass
the initialization of unhashed_pw_smod, and attempt to call slapi_smods_done.
Depending on what memory is in the unhashed_pw_smod, if both mods and
free_mods are true, an attempt will be made to free mods or *mods and the
server will crash. It is tricky to find the right sequence of operations
that will write the stack in such a way that both unhashed_pw_smod.mods
and unhashed_pw_smod.free_mods are set.
The fix is to just get rid of unhashed_pw_smod which is not used.
I also check this code and other operation code for similar cases, but the
rest of the code is clean.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit a3d65ac00df871675896f587b0da2c24eab961bb)
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index be8b9b8..5d1fa19 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -643,7 +643,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
int passin_sdn = 0;
LDAPMod **mods, *pw_mod, **tmpmods = NULL;
Slapi_Mods smods;
- Slapi_Mods unhashed_pw_smod;
int repl_op, internal_op, lastmod, skip_modified_attrs;
char *unhashed_pw_attr = NULL;
Slapi_Operation *operation;
@@ -682,8 +681,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
slapi_mods_init_passin (&smods, mods);
- slapi_mods_init(&unhashed_pw_smod, 0);
-
/* target spec is used to decide which plugins are applicable for the operation */
operation_set_target_spec (pb->pb_op, sdn);
@@ -1128,7 +1125,6 @@ free_and_return:
if (be)
slapi_be_Unlock(be);
- slapi_mods_done(&unhashed_pw_smod); /* can finalize now */
if (unhashed_pw_attr)
slapi_ch_free ((void**)&unhashed_pw_attr);
ldap/servers/slapd/back-ldbm/index.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit b1b3ff7cb8b74bd588d196ffb51963c7789de4df
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Aug 28 16:55:18 2013 -0400
Ticket 47306 - execute index_add_mods only for indexed attributes
Description: Check if the attribute being updated is actually indexed,
before doing all the pre-index processing of the attribute/value.
https://fedorahosted.org/389/ticket/47306
Reviewed by: Noriko(Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index 4b2b13a..3957099 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -518,6 +518,7 @@ index_add_mods(
char *basetype = NULL;
char *tmp = NULL;
Slapi_Attr *curr_attr = NULL;
+ struct attrinfo *ai = NULL;
Slapi_ValueSet *all_vals = NULL;
Slapi_ValueSet *mod_vals = NULL;
Slapi_Value **evals = NULL; /* values that still exist after a
@@ -537,6 +538,11 @@ index_add_mods(
if(tmp != NULL) {
basetype = tmp; /* basetype was malloc'd */
}
+ ainfo_get( be, basetype, &ai );
+ if ( ai == NULL || ai->ai_indexmask == 0 || ai->ai_indexmask == INDEX_OFFLINE ) {
+ /* this attribute is not being indexed, skip it. */
+ goto error;
+ }
/* Get a list of all remaining values for the base type
* and any present subtypes.
ldap/servers/slapd/modify.c | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit f513bc3f955a07c9d22128b312dbbb0384192e31
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri Aug 23 14:16:29 2013 -0600
Bug 999634 - ns-slapd crash due to bogus DN
https://bugzilla.redhat.com/show_bug.cgi?id=999634
Reviewed by: ???
Branch: 389-ds-base-1.2.11
Fix Description: When the target DN is not a valid DN, the code will bypass
the initialization of unhashed_pw_smod, and attempt to call slapi_smods_done.
Depending on what memory is in the unhashed_pw_smod, if both mods and
free_mods are true, an attempt will be made to free mods or *mods and the
server will crash. It is tricky to find the right sequence of operations
that will write the stack in such a way that both unhashed_pw_smod.mods
and unhashed_pw_smod.free_mods are set.
The fix is to just get rid of unhashed_pw_smod which is not used.
I also check this code and other operation code for similar cases, but the
rest of the code is clean.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit a3d65ac00df871675896f587b0da2c24eab961bb)
diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c
index da742da..5e52f26 100644
--- a/ldap/servers/slapd/modify.c
+++ b/ldap/servers/slapd/modify.c
@@ -642,7 +642,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
int passin_sdn = 0;
LDAPMod **mods, *pw_mod, **tmpmods = NULL;
Slapi_Mods smods;
- Slapi_Mods unhashed_pw_smod;
int repl_op, internal_op, lastmod, skip_modified_attrs;
char *unhashed_pw_attr = NULL;
Slapi_Operation *operation;
@@ -681,8 +680,6 @@ static void op_shared_modify (Slapi_PBlock *pb, int pw_change, char *old_pw)
slapi_mods_init_passin (&smods, mods);
- slapi_mods_init(&unhashed_pw_smod, 0);
-
/* target spec is used to decide which plugins are applicable for the operation */
operation_set_target_spec (pb->pb_op, sdn);
@@ -1008,7 +1005,6 @@ free_and_return:
if (be)
slapi_be_Unlock(be);
- slapi_mods_done(&unhashed_pw_smod); /* can finalize now */
if (unhashed_pw_attr)
slapi_ch_free ((void**)&unhashed_pw_attr);
ldap/servers/slapd/pw.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 5bbd3651ff89c8acf35e943f97567966803c980b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Aug 28 16:30:26 2013 -0400
Ticket 47371 - Some updates of "passwordgraceusertime" are useless when updating "userpassword"
Bug Description: "passwordgraceusertime" is always reset to "0" after a password change.
Even if the the current value is "0".
Fix Description: Only reset the value to "0" if the current value is not "0".
https://fedorahosted.org/389/ticket/47371
Reveiwed by: Noriko(Thanks!)
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index b9d54a3..8d73753 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -585,6 +585,7 @@ int
update_pw_info ( Slapi_PBlock *pb , char *old_pw)
{
Slapi_Operation *operation = NULL;
+ Slapi_Entry *e = NULL;
Slapi_DN *sdn = NULL;
Slapi_Mods smods;
passwdPolicy *pwpolicy = NULL;
@@ -594,9 +595,10 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw)
char *timestr;
int internal_op = 0;
- slapi_pblock_get(pb, SLAPI_OPERATION, &operation);
+ slapi_pblock_get( pb, SLAPI_OPERATION, &operation);
slapi_pblock_get( pb, SLAPI_TARGET_SDN, &sdn );
slapi_pblock_get( pb, SLAPI_REQUESTOR_NDN, &bind_dn);
+ slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &e);
internal_op = slapi_operation_is_flag_set(operation, SLAPI_OP_FLAG_INTERNAL);
target_dn = slapi_sdn_get_ndn(sdn);
pwpolicy = new_passwdPolicy(pb, target_dn);
@@ -633,8 +635,10 @@ update_pw_info ( Slapi_PBlock *pb , char *old_pw)
set_retry_cnt_mods (pb, &smods, 0 );
}
- /* Clear the passwordgraceusertime from the user entry */
- slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "passwordgraceusertime", "0");
+ if(!slapi_entry_attr_hasvalue(e,"passwordgraceusertime", "0")){
+ /* Clear the passwordgraceusertime from the user entry */
+ slapi_mods_add_string(&smods, LDAP_MOD_REPLACE, "passwordgraceusertime", "0");
+ }
/*
* If the password is reset by a different user, mark it the first time logon. If this is an internal
ldap/admin/src/scripts/DSCreate.pm.in | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 56441c31d8709fdd5c9e45a0cfcaa1e9ec88532a
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Aug 23 12:17:57 2013 -0400
Ticket 47394 - remove-ds.pl should remove /var/lock/dirsrv
Bug Description: Once a DS instance has been created, /var/lock/dirsrv, /var/lib/dirsrv, and /var/run/dirsrv
are owned by the user that was specified when the instance was created. Then remove this
single instance, and create a new instance that runs as a different user. The install will fail.
Fix Description: When removing the last instance on the machine, remove the /var/lock|run|lib/dirsrv/ directories.
https://fedorahosted.org/389/ticket/47394
Reviewed by: richm(Thanks!)
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index cc00bb3..7835c41 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -1274,7 +1274,10 @@ sub removeDSInstance {
my @errs;
my $initconfig = "$initconfig_dir/@package_name@-$inst";
-
+ my $pkglockdir = "@localstatedir@/lock/@package_name@";
+ my $pkgrundir = "@localstatedir@/run/@package_name@";
+ my $pkglibdir = "@localstatedir@/lib/@package_name@";
+
# Get the configdir, rundir and product_name from the instance initconfig script.
unless(open(INFILE, $initconfig)) {
return ( [ 'error_no_such_instance', $instname, $! ] );
@@ -1454,7 +1457,14 @@ sub removeDSInstance {
# update systemd files
push @errs, updateSystemD();
-
+
+ # remove /var/lock/dirsrv & /var/run/dirsrv if this was the last instance
+ if(!<$pkglockdir/*>){
+ rmdir $pkglockdir;
+ rmdir $pkgrundir;
+ rmdir $pkglibdir;
+ }
+
# if we got here, report success
if (@errs) {
debug(1, "Could not successfully remove $instname\n");