Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5907

ScriptedSSH search script unsupported filter cause timeout exception

    XMLWordPrintable

Details

    Description

      SearchLinux.groovy script should handle filters correctly. For example when incorrect eq filter is used, script is waiting for prompt and throw incorrect timeout exception

      SearchLinux.groovy update

      _line 80_
              } else if (filter instanceof EqualsFilter && ((EqualsFilter) filter).getAttribute().is(Uid.NAME) || ((EqualsFilter) filter).getAttribute().is(Name.NAME))) {
                  def username = ((EqualsFilter) filter).getAttribute().getValue().get(0)
                  log.info("Searching for $username")
                  sendln "/usr/bin/cut -d: -f1,3,4,5,6,7 /etc/passwd | /bin/grep \"^$username:\""
              } else {
                  throw new UnsupportedOperationException(operation.name() + " operation of type:" +
                      " filter is not supported.")
              }
      
      _line 124_
              else if (filter instanceof EqualsFilter && ((EqualsFilter) filter).getAttribute().is(Uid.NAME) || ((EqualsFilter) filter).getAttribute().is(Name.NAME))) {
                  def groupname = ((EqualsFilter) filter).getAttribute().getValue().get(0)
                  sendln "/usr/bin/cut -d: -f1,3,4 /etc/group | /bin/grep \"^$groupname:\""
              } else {
                  throw new UnsupportedOperationException(operation.name() + " operation of type:" +
                      " filter is not supported.")
              }
      

      Attachments

        Activity

          People

            ben.apple Ben Apple
            michal.orlik@profiq.cz Michal Orlik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: