Package: pdsh / 2.18-8

Metadata

Package Version Patches format
pdsh 2.18-8 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
ltdl.patch | (download)

src/pdsh/Makefile.am | 4 2 + 2 - 0 !
src/pdsh/Makefile.in | 33 14 + 19 - 0 !
2 files changed, 16 insertions(+), 21 deletions(-)

---
pdsh module code reentrancy.patch | (download)

src/pdsh/mod.c | 75 60 + 15 - 0 !
1 file changed, 60 insertions(+), 15 deletions(-)

 [patch] pdsh not translating host names to altnames

pdsh was not translating names to their alternates:

  dawn1> echo dawni all,altname=e%n,pdsh_rcmd_type=mrsh > gend

  dawn1> pdsh -q -F gend -a | tail -1
  dawni

After a bit of scrutinizing, I found that genders_postop() was being
called twice.  This caused the names to toggle and so remain
unchanged.  After a lot more scrutinizing, I found this call stack was
causing the global module list iterator to be reset and then used to
search with while it was being used already:

  src/pdsh/main.c       101  opt_verify(&opt)

  src/pdsh/opt.c        655  mod_postop(opt)

  src/pdsh/mod.c        222  list_iterator_reset(module_itr)
  src/pdsh/mod.c        223  while ((mod = list_next(module_itr)))
  src/pdsh/mod.c        224      _mod_postop(mod, pdsh_opts)

  src/pdsh/mod.c        171  (*mod->pmod->mod_ops->postop) (pdsh_opts)

  src/modules/genders.c 286  register_genders_rcmd_types (opt);

  src/modules/genders.c 584  rcmd_register_defaults (host, rcmd, user);

  src/pdsh/rcmd.c       262  rcmd_module_register (rcmd_name)

  src/pdsh/rcmd.c       174  mod_get_module ("rcmd", name)

  src/pdsh/mod.c        456  list_iterator_reset(module_itr);
  src/pdsh/mod.c        457  while ((mod = list_next(module_itr))) {
  src/pdsh/mod.c        458      if (_mod_description_match (mod, type, name))
  src/pdsh/mod.c        459          return mod;

I have attached issue_3.patch which replaces the global iterator with
ones allocated in the various functions.  Strictly speaking, this
issue is solved by just doing that in mod_postop(), but I don't know
if there are other places that could lead to this same issue.  Due to
all the error checking and deallocations, the code changes are not
insignificant, so check it over and change as appropriate.


git-svn-id: https://eris/svn/pdsh/trunk@1187 a504ef89-36fa-0310-b486-b3dff5ebf1e6

genders_remove_runtime_check.patch | (download)

src/modules/genders.c | 52 3 + 49 - 0 !
1 file changed, 3 insertions(+), 49 deletions(-)

---