From: Stephen Smalley <sds@tycho.nsa.gov>
To: Richard Haines <richard_c_haines@btinternet.com>,
selinux@vger.kernel.org
Subject: Re: [PATCH V3 1/1] selinux-testsuite: Add filesystem tests
Date: Mon, 13 Jan 2020 10:45:33 -0500 [thread overview]
Message-ID: <02e4c12e-7cf9-2b10-cc3e-f1570a0c35c0@tycho.nsa.gov> (raw)
In-Reply-To: <20200112192432.862800-2-richard_c_haines@btinternet.com>
On 1/12/20 2:24 PM, Richard Haines wrote:
> Test filesystem permissions, setfscreatecon(3), file { quotaon } and
> changing file context via 'name type_transition rule'.
>
> From kernels 5.5 filesystem { watch } is also tested.
>
> Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Aside from the travis-ci build failure when trying to build the test
policy against upstream refpolicy, this looks good to me. NB you can
reproduce such failures yourself by creating your own github clone of
selinux-testsuite, enabling travis-ci on your clone, and pushing your
change to a branch of our clone.
Possible room for improvement (but I won't insist) might include:
- test non-name based type transition rule with a different type and
confirm that both files are createdi in the right type (i.e. make sure
we are actually matching on the component name),
- test two different name-based type transition rules that only differ
in name (similar),
- add tests for the new mount API, fsopen(), fspick(), fsmount().
These could all be done as separate patches later.
> ---
> defconfig | 6 +
> policy/Makefile | 4 +
> policy/test_filesystem.te | 343 +++++++
> tests/Makefile | 7 +
> tests/filesystem/.gitignore | 11 +
> tests/filesystem/Makefile | 16 +
> tests/filesystem/check_file_context.c | 75 ++
> tests/filesystem/check_mount_context.c | 127 +++
> tests/filesystem/create_file.c | 112 +++
> tests/filesystem/create_file_change_context.c | 146 +++
> tests/filesystem/fanotify_fs.c | 79 ++
> tests/filesystem/fs_relabel.c | 138 +++
> tests/filesystem/grim_reaper.c | 89 ++
> tests/filesystem/mount.c | 130 +++
> tests/filesystem/quotas_test.c | 143 +++
> tests/filesystem/statfs_test.c | 65 ++
> tests/filesystem/test | 929 ++++++++++++++++++
> tests/filesystem/umount.c | 84 ++
> 18 files changed, 2504 insertions(+)
> create mode 100644 policy/test_filesystem.te
> create mode 100644 tests/filesystem/.gitignore
> create mode 100644 tests/filesystem/Makefile
> create mode 100644 tests/filesystem/check_file_context.c
> create mode 100644 tests/filesystem/check_mount_context.c
> create mode 100644 tests/filesystem/create_file.c
> create mode 100644 tests/filesystem/create_file_change_context.c
> create mode 100644 tests/filesystem/fanotify_fs.c
> create mode 100644 tests/filesystem/fs_relabel.c
> create mode 100644 tests/filesystem/grim_reaper.c
> create mode 100644 tests/filesystem/mount.c
> create mode 100644 tests/filesystem/quotas_test.c
> create mode 100644 tests/filesystem/statfs_test.c
> create mode 100755 tests/filesystem/test
> create mode 100644 tests/filesystem/umount.c
next prev parent reply other threads:[~2020-01-13 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 19:24 [PATCH V3 0/1] selinux-testsuite: Add filesystem tests Richard Haines
2020-01-12 19:24 ` [PATCH V3 1/1] " Richard Haines
2020-01-13 15:45 ` Stephen Smalley [this message]
2020-01-13 18:32 ` Richard Haines
2020-01-13 19:01 ` Stephen Smalley
2020-01-14 12:08 ` Richard Haines
2020-01-13 16:57 ` [PATCH V3 0/1] " Stephen Smalley
2020-01-13 18:34 ` Richard Haines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02e4c12e-7cf9-2b10-cc3e-f1570a0c35c0@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=richard_c_haines@btinternet.com \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.