Skip to content

Commit c576dfd

Browse files
authored
Merge pull request saz#289 from martijndegouw/master
Use gid 0 instead of group name for $host_priv_key_group
2 parents 5a5ea88 + 1091ff1 commit c576dfd

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

manifests/params.pp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
1515
$service_name = 'ssh'
1616
$sftp_server_path = '/usr/lib/openssh/sftp-server'
17-
$host_priv_key_group = 'root'
17+
$host_priv_key_group = 0
1818
}
1919
'RedHat': {
2020
$server_package_name = 'openssh-server'
@@ -28,7 +28,7 @@
2828
if versioncmp($::operatingsystemmajrelease, '7') >= 0 {
2929
$host_priv_key_group = 'ssh_keys'
3030
} else {
31-
$host_priv_key_group = 'root'
31+
$host_priv_key_group = 0
3232
}
3333
}
3434
'FreeBSD', 'DragonFly': {
@@ -40,7 +40,7 @@
4040
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
4141
$service_name = 'sshd'
4242
$sftp_server_path = '/usr/libexec/sftp-server'
43-
$host_priv_key_group = 'root'
43+
$host_priv_key_group = 0
4444
}
4545
'OpenBSD': {
4646
$server_package_name = undef
@@ -51,7 +51,7 @@
5151
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
5252
$service_name = 'sshd'
5353
$sftp_server_path = '/usr/libexec/sftp-server'
54-
$host_priv_key_group = 'root'
54+
$host_priv_key_group = 0
5555
}
5656
'Darwin': {
5757
$server_package_name = undef
@@ -62,7 +62,7 @@
6262
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
6363
$service_name = 'com.openssh.sshd'
6464
$sftp_server_path = '/usr/libexec/sftp-server'
65-
$host_priv_key_group = 'root'
65+
$host_priv_key_group = 0
6666
}
6767
'ArchLinux': {
6868
$server_package_name = 'openssh'
@@ -73,7 +73,7 @@
7373
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
7474
$service_name = 'sshd.service'
7575
$sftp_server_path = '/usr/lib/ssh/sftp-server'
76-
$host_priv_key_group = 'root'
76+
$host_priv_key_group = 0
7777
}
7878
'Suse': {
7979
$server_package_name = 'openssh'
@@ -82,7 +82,7 @@
8282
$sshd_config = '/etc/ssh/sshd_config'
8383
$ssh_config = '/etc/ssh/ssh_config'
8484
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
85-
$host_priv_key_group = 'root'
85+
$host_priv_key_group = 0
8686
case $::operatingsystem {
8787
'SLES': {
8888
$service_name = 'sshd'
@@ -120,7 +120,7 @@
120120
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
121121
$service_name = 'svc:/network/ssh:default'
122122
$sftp_server_path = 'internal-sftp'
123-
$host_priv_key_group = 'root'
123+
$host_priv_key_group = 0
124124
}
125125
default: {
126126
$sshd_dir = '/etc/ssh'
@@ -129,7 +129,7 @@
129129
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
130130
$service_name = 'svc:/network/ssh:default'
131131
$sftp_server_path = 'internal-sftp'
132-
$host_priv_key_group = 'root'
132+
$host_priv_key_group = 0
133133
case versioncmp($::kernelrelease, '5.10') {
134134
1: {
135135
# Solaris 11 and later
@@ -160,7 +160,7 @@
160160
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
161161
$service_name = 'sshd'
162162
$sftp_server_path = '/usr/lib/misc/sftp-server'
163-
$host_priv_key_group = 'root'
163+
$host_priv_key_group = 0
164164
}
165165
'Amazon': {
166166
$server_package_name = 'openssh-server'
@@ -171,7 +171,7 @@
171171
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
172172
$service_name = 'sshd'
173173
$sftp_server_path = '/usr/libexec/openssh/sftp-server'
174-
$host_priv_key_group = 'root'
174+
$host_priv_key_group = 0
175175
}
176176
default: {
177177
fail("Unsupported platform: ${::osfamily}/${::operatingsystem}")

spec/defines/server/host_key_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
with_content('bcd').
3636
with_ensure('present').
3737
with_owner(0).
38-
with_group('root').
38+
with_group(0).
3939
with_mode('0600').
4040
with_path('/etc/ssh/something')
4141
is_expected.to contain_file('something_cert').
@@ -68,7 +68,7 @@
6868
with_content('bcd').
6969
with_ensure('present').
7070
with_owner(0).
71-
with_group('root').
71+
with_group(0).
7272
with_mode('0600').
7373
with_path('/etc/ssh/something')
7474
is_expected.not_to contain_file('something_cert')
@@ -99,7 +99,7 @@
9999
with_source('b').
100100
with_ensure('present').
101101
with_owner(0).
102-
with_group('root').
102+
with_group(0).
103103
with_mode('0600').
104104
with_path('/etc/ssh/something')
105105
is_expected.not_to contain_file('something_cert')

0 commit comments

Comments
 (0)