mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Refactors inetd_conf doc (#2543)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
This commit is contained in:
parent
f1b78c65d5
commit
3f0642eef1
1 changed files with 28 additions and 17 deletions
|
@ -24,10 +24,36 @@ where
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
## Supported Resource Properties
|
||||||
|
|
||||||
|
This resource supports any of the properties listed as services in the `inetd.conf` file. You may want to ensure that specific services do not listen via `inetd.conf`.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
The following examples show how to use this InSpec audit resource.
|
The following examples show how to use this InSpec audit resource.
|
||||||
|
|
||||||
|
### Basic tests for inetd_conf services:
|
||||||
|
|
||||||
|
its('shell') { should eq nil }
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
its('netstat') { should eq nil }
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
its('systat') { should eq nil }
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
describe inetd_conf do
|
||||||
|
its('shell') { should eq nil }
|
||||||
|
its('login') { should eq nil }
|
||||||
|
its('exec') { should eq nil }
|
||||||
|
end
|
||||||
|
|
||||||
### Verify that FTP is disabled
|
### Verify that FTP is disabled
|
||||||
|
|
||||||
The contents if the `inetd.conf` file contain the following:
|
The contents if the `inetd.conf` file contain the following:
|
||||||
|
@ -63,22 +89,7 @@ then the same test will return `false` for `ftp` and the entire test will fail.
|
||||||
|
|
||||||
## Matchers
|
## Matchers
|
||||||
|
|
||||||
This resource matches any service that is listed in the `inetd.conf` file. You may want to ensure that specific services do not listen via `inetd.conf`. For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
|
||||||
|
|
||||||
its('shell') { should eq nil }
|
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
||||||
|
|
||||||
or:
|
|
||||||
|
|
||||||
its('netstat') { should eq nil }
|
|
||||||
|
|
||||||
or:
|
|
||||||
|
|
||||||
its('systat') { should eq nil }
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
describe inetd_conf do
|
|
||||||
its('shell') { should eq nil }
|
|
||||||
its('login') { should eq nil }
|
|
||||||
its('exec') { should eq nil }
|
|
||||||
end
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue