---
name: "ccs-patternize"
section: "8"
platform: "linux"
package: "tomoyo-ccstools1.7"
version: "1.7.2-20100401-3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/ccs-patternize"
---

# ccs-patternize(8)

Convert TOMOYO Linux's pathnames into patterns

## NAME

ccs-patternize - Convert TOMOYO Linux's pathnames into patterns

## SYNOPSIS

**ccs-patternize** *pattern* \[*pattern* ...\] *\< old\_domain\_policy \> new\_domain\_policy*

## DESCRIPTION

This program reads domain policy from standard input and replaces pathnames with patterns if the pathname matches to patterns given at commandline and writes to standard output.

Pathnames for execute permission and domainnames won't be replaced.

## EXAMPLES

\# ccs-patternize '/tmp/php\\?\\?\\?\\?\\?\\?' \< /etc/ccs/domain\_policy.conf \> /etc/ccs/domain\_policy2.conf

-

  Replace pathnames that match /tmp/php\\?\\?\\?\\?\\?\\? pattern with /tmp/php\\?\\?\\?\\?\\?\\? .

\# ccs-patternize 'file\_pattern /tmp/php\\?\\?\\?\\?\\?\\?' \< /etc/ccs/domain\_policy.conf \> /etc/ccs/domain\_policy2.conf

-

  Replace pathnames that match /tmp/php\\?\\?\\?\\?\\?\\? pattern with /tmp/php\\?\\?\\?\\?\\?\\? .

\# ccs-patternize 'path\_group GROUP1 /tmp/php\\?\\?\\?\\?\\?\\?' \< /etc/ccs/domain\_policy.conf \> /etc/ccs/domain\_policy2.conf

-

  Replace pathnames that match /tmp/php\\?\\?\\?\\?\\?\\? pattern with @GROUP1.

\# ccs-patternize 'number\_group GROUP2 0-100' 'number\_group GROUP2 100-200'\< /etc/ccs/domain\_policy.conf \> /etc/ccs/domain\_policy2.conf

-

  Replace integers between 0-100 or 100-200 with @GROUP2 .

\# ccs-patternize 'address\_group LOCALHOST 127.0.0.1' 'address\_group LOCALHOST 0:0:0:0:0:0:0:1' \< /etc/ccs/domain\_policy.conf \> /etc/ccs/domain\_policy2.conf

-

  Replace ip addresses 127.0.0.1 or 0:0:0:0:0:0:0:1 with @LOCALHOST.

## AUTHORS

 penguin-kernel \_at\_ I-love.SAKURA.ne.jp

## COPYRIGHT

Copyright © 2005-2010 NTT DATA CORPORATION.

This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty.

## SEE ALSO

 ccs-findtemp (8)\
  [ccs-diffpolicy(8)](/ccs-diffpolicy/8.md)
