linux/security/tomoyo
Tetsuo Handa 6bce98edc3 TOMOYO: Allow specifying domain transition preference.
I got an opinion that it is difficult to use exception policy's domain
transition control directives because they need to match the pathname specified
to "file execute" directives. For example, if "file execute /bin/\*\-ls\-cat"
is given, corresponding domain transition control directive needs to be like
"no_keep_domain /bin/\*\-ls\-cat from any".

If we can specify like below, it will become more convenient.

  file execute /bin/ls keep exec.realpath="/bin/ls" exec.argv[0]="ls"
  file execute /bin/cat keep exec.realpath="/bin/cat" exec.argv[0]="cat"
  file execute /bin/\*\-ls\-cat child
  file execute /usr/sbin/httpd <apache> exec.realpath="/usr/sbin/httpd" exec.argv[0]="/usr/sbin/httpd"

In above examples, "keep" works as if keep_domain is specified, "child" works
as if "no_reset_domain" and "no_initialize_domain" and "no_keep_domain" are
specified, "<apache>" causes domain transition to <apache> domain upon
successful execve() operation.

Moreover, we can also allow transition to different domains based on conditions
like below example.

  <kernel> /usr/sbin/sshd
  file execute /bin/bash <kernel> /usr/sbin/sshd //batch-session exec.argc=2 exec.argv[1]="-c"
  file execute /bin/bash <kernel> /usr/sbin/sshd //root-session task.uid=0
  file execute /bin/bash <kernel> /usr/sbin/sshd //nonroot-session task.uid!=0

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
2011-09-19 10:09:59 +10:00
..
audit.c TOMOYO: Allow controlling generation of access granted logs for per an entry basis. 2011-09-14 08:27:06 +10:00
common.c TOMOYO: Allow specifying domain transition preference. 2011-09-19 10:09:59 +10:00
common.h TOMOYO: Allow specifying domain transition preference. 2011-09-19 10:09:59 +10:00
condition.c TOMOYO: Allow specifying domain transition preference. 2011-09-19 10:09:59 +10:00
domain.c TOMOYO: Allow specifying domain transition preference. 2011-09-19 10:09:59 +10:00
environ.c TOMOYO: Add environment variable name restriction support. 2011-09-14 08:27:05 +10:00
file.c TOMOYO: Allow specifying domain transition preference. 2011-09-19 10:09:59 +10:00
gc.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
group.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
Kconfig TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
load_policy.c TOMOYO: Update kernel-doc. 2011-07-14 17:50:03 +10:00
Makefile TOMOYO: Bump version. 2011-09-15 08:14:21 +10:00
memory.c TOMOYO: Update kernel-doc. 2011-07-14 17:50:03 +10:00
mount.c TOMOYO: Update kernel-doc. 2011-07-14 17:50:03 +10:00
network.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
realpath.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
securityfs_if.c TOMOYO: Allow domain transition without execve(). 2011-09-14 08:27:06 +10:00
tomoyo.c TOMOYO: Add socket operation restriction support. 2011-09-14 08:27:05 +10:00
util.c TOMOYO: Allow domain transition without execve(). 2011-09-14 08:27:06 +10:00