Configuration File Permissions parsers
Parsers included in this module are:
SshdConfigPerms - command /bin/ls -lH /etc/ssh/sshd_config
Grub1ConfigPerms - command /bin/ls -lH /boot/grub/grub.conf
Grub2ConfigPerms - command /bin/ls -lH /boot/grub2/grub.cfg
- class insights.parsers.config_file_perms.FilePermissionsParser(context)[source]
Bases:
CommandParser
,FilePermissions
Base class for
SshdConfigPerms
,Grub1ConfigPerms
andGrub2ConfigPerms
classes.- line
the line from the command output
- Type:
string
- class insights.parsers.config_file_perms.Grub1ConfigPerms(context)[source]
Bases:
FilePermissionsParser
Class for parsing
/bin/ls -lH /boot/grub/grub.conf
command.Sample output of this command is:
-rw-r--r--. 1 root root 4179 Dec 1 2014 /boot/grub/grub.conf
Examples
>>> type(grub1_perms) <class 'insights.parsers.config_file_perms.Grub1ConfigPerms'> >>> grub1_perms.line '-rw-r--r--. 1 root root 4179 Dec 1 2014 /boot/grub/grub.conf'
- class insights.parsers.config_file_perms.Grub2ConfigPerms(context)[source]
Bases:
FilePermissionsParser
Class for parsing
/bin/ls -lH /boot/grub2/grub.cfg
command.Sample output of this command is:
-rw-r--r--. 1 root root 4179 Dec 1 2014 /boot/grub2/grub.cfg
Examples
>>> type(grub2_perms) <class 'insights.parsers.config_file_perms.Grub2ConfigPerms'> >>> grub2_perms.line '-rw-r--r--. 1 root root 4179 Dec 1 2014 /boot/grub2/grub.cfg'
- class insights.parsers.config_file_perms.SshdConfigPerms(context)[source]
Bases:
FilePermissionsParser
Class for parsing
/bin/ls -lH /etc/ssh/sshd_config
command.Sample output of this command is:
-rw-------. 1 root root 4179 Dec 1 2014 /etc/ssh/sshd_config
Examples
>>> type(sshd_perms) <class 'insights.parsers.config_file_perms.SshdConfigPerms'> >>> sshd_perms.line '-rw-------. 1 root root 4179 Dec 1 2014 /etc/ssh/sshd_config'