diff options
author | Julien Dessaux | 2017-08-25 17:49:43 +0200 |
---|---|---|
committer | Julien Dessaux | 2017-08-25 17:49:43 +0200 |
commit | 5f818687e373cd5ccf16e32b693e050cf5719e92 (patch) | |
tree | 4eea6ebafe690c58d8ee8ed2ba8326d6f17ef86b /services | |
parent | Changed policies organisation to use methods (diff) | |
download | masterfiles-5f818687e373cd5ccf16e32b693e050cf5719e92.tar.gz masterfiles-5f818687e373cd5ccf16e32b693e050cf5719e92.tar.bz2 masterfiles-5f818687e373cd5ccf16e32b693e050cf5719e92.zip |
Fixed sshd policy mistake
Diffstat (limited to 'services')
-rw-r--r-- | services/applications/sshd.cf | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/services/applications/sshd.cf b/services/applications/sshd.cf index da602a1..1b5bca7 100644 --- a/services/applications/sshd.cf +++ b/services/applications/sshd.cf @@ -2,12 +2,6 @@ bundle agent sshd { files: freebsd:: - "/etc/rc.conf" - create => "true", - edit_defaults => std_defs, - perms => system_owned("444"), - edit_line => append_if_no_line("sshd_enable=\"YES\""), - classes => if_repaired("sshd_rc_conf_file_repaired"); "/root/.ssh/." create => "true", perms => system_owned("700"), @@ -21,13 +15,15 @@ bundle agent sshd classes: freebsd:: "sshd_service_running" expression => returnszero("/usr/sbin/service sshd status", "noshell"); + methods: + freebsd:: + "any" usebundle => add_rc_conf_line("sshd_enable=\"YES\""); commands: freebsd.!sshd_service_running:: "/usr/sbin/service sshd start" classes => if_repaired("sshd_service_repaired"); reports: any:: - "$(this.bundle): /etc/rc.conf repaired" ifvarclass => "sshd_rc_conf_file_repaired"; "$(this.bundle): /root/.ssh directory repaired" ifvarclass => "sshd_ssh_dir_repaired"; - "$(this.bundle): /root/.ssh/authorized_keys repaired" ifvarclass => "sshd_rc_conf_file_repaired"; + "$(this.bundle): /root/.ssh/authorized_keys repaired" ifvarclass => "sshd_authorized_keys_files_repaired"; "$(this.bundle): sshd service repaired" ifvarclass => "sshd_service_repaired"; } |