Skip to content

Commit

Permalink
Fix trailing whitespace in filenames and content
Browse files Browse the repository at this point in the history
Fixes #156
  • Loading branch information
silug committed Oct 23, 2024
1 parent f40bbbf commit 65e3612
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 25 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
* Tue Oct 22 2024 Steven Pritchard <[email protected]> - 7.2.1
- Fix trailing whitespace in filenames and content

* Fri Sep 13 2024 Steven Pritchard <[email protected]> - 7.2.0
- [puppetsync] Update module dependencies to support simp-iptables 7.x


* Tue Apr 09 2024 Mike Riddle <[email protected]> - 7.1.0
- Added the cert_auth parameter
- Added the inactive parameter
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
# Path to the cracklib dictionaries. Default is to use the cracklib default.
#
# @param dictcheck
# If nonzero, check whether the password (with possible modifications)
# If nonzero, check whether the password (with possible modifications)
# matches a word in a dictionary. Currently the dictionary check is
# performed using the cracklib library. This option will be ignored
# unless the OS major version is higher than 7.
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-pam",
"version": "7.2.0",
"version": "7.2.1",
"author": "SIMP Team",
"summary": "A SIMP puppet module for managing pam",
"license": "Apache-2.0",
Expand Down
14 changes: 7 additions & 7 deletions spec/acceptance/suites/security_modules/files/su_test_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
require 'optparse'


# parses out provided command line arguments.
# parses out provided command line arguments.
# No command line args are required as sane defaults are set
# Returns:
# +array+:: Array with default then any command line args that override those
# defaults
def parse_opts
options = {:user => 'root', :output => nil, :pass => '',
options = {:user => 'root', :output => nil, :pass => '',
:prompt => '.assword:\s*'}

optparse = OptionParser.new do |opts|
opts.banner = 'Usage: su_test_script.rb [-p password] [-u user]'\
'[-e expected prompt] [-o expected output]'

opts.on('-p', '--password pass', 'Password to authenticate with,'\
' defaults to empty string') do |pass|
options[:pass] = pass
Expand All @@ -37,7 +37,7 @@ def parse_opts
options[:output] = output
end
end

optparse.parse!
if options[:output].nil?
options[:output] = "#{options[:user]}@.+[$#]"
Expand All @@ -53,11 +53,11 @@ def parse_opts
# +password+:: password to fill when prompted by pty
# +prompt+:: regex for target prompt to fill password when seen
# Return:
# +outputs+:: Concatenated output of su command for regex determination of
# +outputs+:: Concatenated output of su command for regex determination of
# success or failure
def run_interactive command, password, prompt
outputs = ''
begin
begin
r, w, pid = PTY.spawn(command)
r.expect(prompt)
sleep(1)
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
end

context 'with all possible faillock params set' do
let(:params) {{
let(:params) {{
:manage_faillock_conf => false,
:display_account_lock => false,
:deny => 6,
Expand Down Expand Up @@ -74,7 +74,7 @@
end

context 'with all possible pwhistory params set' do
let(:params) {{
let(:params) {{
:manage_pwhistory_conf => false,
:remember_debug => true,
:remember => 18,
Expand Down Expand Up @@ -108,9 +108,9 @@
end

context 'with cert_auth set' do
let(:params) {{
let(:params) {{
:cert_auth => 'try',
:sssd => true
:sssd => true
}}
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_file('/etc/pam.d/password-auth').with_content(/^auth \[success=2 default=ignore\] pam_sss.so forward_pass try_cert_auth$/) }
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file managed by Puppet
# User changes will be lost!

# User defined prepended auth content
# User defined prepended auth content
auth sufficient pam_centrifydc.so
auth requisite pam_centrifydc.so deny
account sufficient pam_centrifydc.so
Expand Down
6 changes: 3 additions & 3 deletions templates/etc/pam.d/auth.epp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ else {
-%>
<% unless empty($auth_content_pre) { -%>

# User defined prepended auth content
# User defined prepended auth content
<% $auth_content_pre.each |String $auth_pre_line| { -%>
<%= $auth_pre_line %>
<% } -%>
Expand All @@ -75,7 +75,7 @@ else {
auth optional pam_faildelay.so
auth required pam_env.so
<% if $faillock {
if $manage_faillock_conf {
if $manage_faillock_conf {
-%>
auth required pam_faillock.so preauth
<% } else {
Expand Down Expand Up @@ -256,7 +256,7 @@ account required pam_permit.so
<% if $cracklib_gecoscheck { %> gecoscheck<% } -%>
<% } -%>
<%
if $manage_pwhistory_conf {
if $manage_pwhistory_conf {
$_pam_pwhistory = 'password required pam_pwhistory.so use_authtok'
} else {
if $remember_debug {
Expand Down

0 comments on commit 65e3612

Please sign in to comment.