Package scap.check.exec

Examples of scap.check.exec.FileExecutor


      String ovalDir = checkSystem.getPropertyValue(config, OVALCheckSystem.PROP_OVAL_DIR);
      String ovalBin = checkSystem.getPropertyValue(config, OVALCheckSystem.PROP_OVAL_BIN);
      StaticFileExecutionStrategy executionStrategy = new StaticFileExecutionStrategy(new File(ovalDir), ovalBin);

        String executable = executionStrategy.getExecutableFile().getCanonicalPath();
        FileExecutor executor = new FileExecutor(executionStrategy);
//        executor.setRedirectErrorStream( this.outputInfoAndErrorsToSTDOUT );
        executor.setRedirectErrorStream(true);

        List<String> arguments = buildArgumentList();


        if (log.isDebugEnabled()) {
          StringBuilder builder = new StringBuilder();
          builder.append(executable);

          if (!arguments.isEmpty()) {
            for (String argument : arguments) {
                builder.append(" ");
              builder.append(argument);
            }
          }

          log.debug("Invoking OVALDI using: " + builder.toString());
         
        }

        Process p = executor.execute(arguments);

        String processName = ovalBin + " : " + this.getDefinitionXmlFile().getName();
        IORedirect  ioRedirect = new IORedirect( p.getInputStream(), out, outputInfoAndErrorsToSTDOUT );
        ioRedirect.setProcessName( processName );
View Full Code Here

TOP

Related Classes of scap.check.exec.FileExecutor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.