Skip to content

Commit

Permalink
Consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Jun 13, 2023
1 parent 3cb0f45 commit e258f03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/installation/security_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def close_vnc!
# authentication and the system is not accesible through ssh
def access_problem?
# public key is not the only way
return false unless only_public_key_auth
return false unless only_public_key_auth?

# without running sshd it is useless
return true unless @enable_sshd
Expand Down Expand Up @@ -181,11 +181,11 @@ def global_section
end

def wanted_enable_sshd?
Yast::Linuxrc.usessh || only_public_key_auth || @enable_sshd
Yast::Linuxrc.usessh || only_public_key_auth? || @enable_sshd
end

def wanted_open_ssh?
Yast::Linuxrc.usessh || only_public_key_auth || @open_ssh
Yast::Linuxrc.usessh || only_public_key_auth? || @open_ssh
end

def wanted_open_vnc?
Expand All @@ -197,7 +197,7 @@ def wanted_open_vnc?
# @note If the root user does not have a password, we assume that we will use a public
# key in order to log into the system. In such a case, we need to enable the SSH
# service (including opening the port).
def only_public_key_auth
def only_public_key_auth?
return true unless root_user

password = root_user.password_content || ""
Expand Down

0 comments on commit e258f03

Please sign in to comment.