documentation_complete: true

title: 'Verify User Who Owns /etc/sysconfig/sshd File'

description: '{{{ describe_file_owner(file="/etc/sysconfig/sshd", owner="root") }}}'

rationale: |-
    The <tt>/etc/sysconfig/sshd</tt> file contains configuration options for the SSH daemon.
    Protection of this file is important for system security. The file should be owned by root
    to prevent unauthorized changes.

severity: medium

identifiers:
    cce@rhel8: CCE-89269-5

ocil_clause: '{{{ ocil_clause_file_owner(file="/etc/sysconfig/sshd", owner="root") }}}'

ocil: |-
    {{{ ocil_file_owner(file="/etc/sysconfig/sshd", owner="root") }}}

fixtext: '{{{ fixtext_file_owner(file="/etc/sysconfig/sshd", owner="root") }}}'

srg_requirement: '{{{ srg_requirement_file_owner(file="/etc/sysconfig/sshd", owner="root") }}}'

template:
    name: file_owner
    vars:
        filepath: /etc/sysconfig/sshd
        uid_or_name: '0'

platform: system_with_kernel
