NAME

tomoyo-patternize - utility to convert pathnames in policy into patterns


SYNOPSIS

tomoyo-patternize pattern


DESCRIPTION

This program reads domain policy from standard input and replaces pathnames with patterns. The resulting policy is sent to standard output and is useful to shorten and simplify domain or exception policy.

This will not replace pathnames used for domain names themselves, or for execute permissions.


EXAMPLES

Replace /tmp/phpfk30dk with /tmp/php\?\?\?\?\?\?
  tomoyo-patternize '/tmp/php\?\?\?\?\?\?' < /etc/tomoyo/domain_policy.conf > /etc/tomoyo/domain_policy.conf.new
Replace /tmp/phpfk30dk with /tmp/php\?\?\?\?\?\?
  tomoyo-patternize 'file_pattern /tmp/php\?\?\?\?\?\?' < /etc/tomoyo/domain_policy.conf > /etc/tomoyo/domain_policy.conf.new
Replace /tmp/phpZjk1k3 with @GROUP1
  tomoyo-patternize 'path_group GROUP1 /tmp/php\?\?\?\?\?\?' < /etc/tomoyo/domain_policy.conf > /etc/tomoyo/domain_policy.conf.new
Replace integers between 0-100 or 100-200 with @GROUP2
  tomoyo-patternize 'number_group GROUP2 0-100' 'number_group GROUP2 100-200' < /etc/tomoyo/domain_policy.conf > /etc/tomoyo/domain_policy.conf.new
Replace loopback addresses with @LOCALHOST
  tomoyo-patternize 'address_group LOCALHOST 127.0.0.1' 'address_group LOCALHOST 0:0:0:0:0:0:0:1' < /etc/tomoyo/domain_policy.conf > /etc/tomoyo/domain_policy.conf.new


BUGS

If you find any bugs, send an email to <tomoyo-users_en@lists.sourceforge.net>.


AUTHORS

Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

Main author.

Jamie Nguyen <jamie@tomoyolinux.co.uk>

Documentation and website.


SEE ALSO

tomoyo-findtemp(8), tomoyo-diffpolicy(8)

See <https://tomoyo.sourceforge.net> for more information.