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 maxseq over-ride parameter #297

Closed
wants to merge 9 commits into from
Closed
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
11 changes: 10 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ The following parameters are available in the `sudo` class:
* [`config_dir_keepme`](#-sudo--config_dir_keepme)
* [`use_sudoreplay`](#-sudo--use_sudoreplay)
* [`wheel_config`](#-sudo--wheel_config)
* [`sudoreplay_discard`](#-sudo--sudoreplay_discard)
* [`sudoreplay_discard`](#-sudo--sudoreplay_discard)]
* [`maxseq`](#-sudo--maxseq)]
* [`configs`](#-sudo--configs)

##### <a name="-sudo--enable"></a>`enable`
Expand Down Expand Up @@ -318,6 +319,14 @@ Array of additional command to discard in sudo log.

Default value: `undef`

##### <a name="-sudo--maxseq"></a>`maxseq`

Data type: `Optional[Integer[1]]`

Integer of value to over-ride maxseq in sudo conf.

Default value: `undef`

##### <a name="-sudo--configs"></a>`configs`

Data type: `Hash`
Expand Down
8 changes: 8 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@
# @param sudoreplay_discard
# Array of additional command to discard in sudo log.
#
# @param maxseq
# Integer to over-ride the default value of maxseq.
# The maximum sequence number that will be substituted for the “%{seq}”
# escape in the I/O log file
# The default value is 2176782336.
# Available for RHEL7 and RHEL8
#
# @param configs
# A hash of sudo::conf's
#
Expand Down Expand Up @@ -143,6 +150,7 @@
Boolean $use_sudoreplay = false,
Enum['absent','password','nopassword'] $wheel_config = $sudo::params::wheel_config,
Optional[Array[String[1]]] $sudoreplay_discard = undef,
Optional[Integer[1]] $maxseq = undef,
Hash $configs = {},
) inherits sudo::params {
case $enable {
Expand Down
4 changes: 4 additions & 0 deletions templates/sudoers.rhel7.erb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ Defaults!<%= command %> !log_output
<% end -%>
<% end -%>

<% if @maxseq %>
Defaults maxseq = <%= @maxseq %>
<% end -%>

#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
Expand Down
4 changes: 4 additions & 0 deletions templates/sudoers.rhel8.erb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Defaults!<%= command %> !log_output
<% end -%>
<% end -%>

<% if @maxseq %>
Defaults maxseq = <%= @maxseq %>
<% end -%>

#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
Expand Down