Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SINGLE and PROMPT parameters. #92

Merged
merged 2 commits into from
Nov 24, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
default['security']['suid_sgid']['remove_from_unknown'] = false
default['security']['suid_sgid']['dry_run_on_unknown'] = false

# Allow interactive startup (rhel, centos)
default['security']['init']['prompt'] = false
# Require root password for single user mode. (rhel, centos)
default['security']['init']['single'] = true

# remove packages with known issues
default['security']['packages']['clean'] = true

Expand Down
5 changes: 4 additions & 1 deletion recipes/sysctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
mode 0544
owner 'root'
group 'root'
variables
variables(
prompt: node['security']['init']['prompt'],
single: node['security']['init']['single']
)
end
end

Expand Down
4 changes: 2 additions & 2 deletions templates/default/rhel_sysconfig_init.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ SETCOLOR_WARNING="echo -en \\033[0;33m"
# terminal sequence to reset to the default color.
SETCOLOR_NORMAL="echo -en \\033[0;39m"
# Set to anything other than 'no' to allow hotkey interactive startup...
PROMPT=yes
PROMPT=<%= @prompt ? 'yes' : 'no' %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you changed the default from yes to no, is that intentional?

# Set to 'yes' to allow probing for devices with swap signatures
AUTOSWAP=no
# What ttys should gettys be started on?
ACTIVE_CONSOLES=/dev/tty[1-6]
# Set to '/sbin/sulogin' to prompt for password on single-user mode
# Set to '/sbin/sushell' otherwise
SINGLE=/sbin/sushell
SINGLE=<%= @single ? '/sbin/sulogin' : '/sbin/sushell' %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single is true by default. Can we switch to false as a default?


# NSA 2.2.4.1 Set Daemon umask
umask 027