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

Revert "Include defaults as last line on all platforms" #319

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion templates/sudoers.aix.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -105,4 +106,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.archlinux.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -104,4 +105,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.darwin.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Cmnd alias specification

# Defaults specification
<%= scope.call_function('sudo::defaults', @defaults) -%>
Defaults env_keep += "BLOCKSIZE"
Defaults env_keep += "COLORFGBG COLORTERM"
Defaults env_keep += "__CF_USER_TEXT_ENCODING"
Expand Down Expand Up @@ -61,4 +62,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
3 changes: 2 additions & 1 deletion templates/sudoers.debian.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# file managed by puppet (unless config_file_replace=false)
#
<%= scope.call_function('sudo::defaults', @defaults) -%>
Defaults secure_path="<%= @secure_path %>"

<% if @use_sudoreplay %>
Expand All @@ -26,4 +27,4 @@ root ALL=(ALL:ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>

2 changes: 1 addition & 1 deletion templates/sudoers.freebsd.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!REBOOT !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -120,4 +121,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.gentoo.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!REBOOT !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -106,4 +107,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.omnios.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -105,4 +106,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.openbsd.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Defaults:%wsrc env_keep +="SUBPACKAGE WRKOBJDIR SUDO_PORT_V1"

# Uncomment to preserve the environment for users in group wheel
#Defaults:%wheel !env_reset
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -67,4 +68,3 @@ root ALL=(ALL) SETENV: ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.rhel.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Defaults !visiblepw
# this option is only effective for configurations where either
# env_reset is disabled or HOME is present in the env_keep list.
#
<%= scope.call_function('sudo::defaults', @defaults) -%>
Defaults always_set_home
Defaults match_group_by_gid

Expand Down Expand Up @@ -134,4 +135,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.smartos.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -98,4 +99,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.solaris.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -104,4 +105,3 @@ Defaults!<%= command %> !log_output
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.suse.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Defaults !insults
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output
<%= scope.call_function('sudo::defaults', @defaults) -%>

<% if @use_sudoreplay %>
Defaults log_output
Expand Down Expand Up @@ -98,4 +99,3 @@ root ALL=(ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>
2 changes: 1 addition & 1 deletion templates/sudoers.ubuntu.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#
# See the man page for details on how to write a sudoers file.
#
<%= scope.call_function('sudo::defaults', @defaults) -%>
Defaults secure_path="<%= @secure_path %>"

<% if @use_sudoreplay %>
Expand Down Expand Up @@ -40,4 +41,3 @@ root ALL=(ALL:ALL) ALL
<% @extra_include_dirs.each do |include_dir| -%>
#includedir <%= include_dir %>
<% end if @extra_include_dirs -%>
<%= scope.call_function('sudo::defaults', @defaults) -%>