Provided by: tomoyo-tools_2.4.0-20111025-3_amd64 bug

NAME

       tomoyo-savepolicy - save TOMOYO Linux policy

SYNOPSIS

       tomoyo-savepolicy <directory>

       tomoyo-savepolicy <directory> <remote_ip:remote_port>

       tomoyo-savepolicy {-e|-d|-p|-m|-s}

       tomoyo-savepolicy {-e|-d|-p|-m|-s} <remote_ip:remote_port>

DESCRIPTION

       This program saves TOMOYO Linux policy that is in kernel memory onto the disk.  By running
       this command, a directory in /etc/tomoyo/policy/YY-MM-DD.hh:mm:ss/ format is  created  and
       four  files named domain_policy.conf, exception_policy.conf, profile.conf and manager.conf
       are saved into the created directory, and a symbolic link  /etc/tomoyo/policy/previous  is
       updated   to   point   to  previous  YY-MM-DD.hh:mm:ss/  directory  and  a  symbolic  link
       /etc/tomoyo/policy/current is updated to point to current YY-MM-DD.hh:mm:ss/ directory.

       There      should      be       symbolic       links       /etc/tomoyo/domain_policy.conf,
       /etc/tomoyo/exception_policy.conf,  /etc/tomoyo/profile.conf  and /etc/tomoyo/manager.conf
       which        respectively        point        to        policy/current/domain_policy.conf,
       policy/current/exception_policy.conf,                         policy/current/profile.conf,
       policy/current/manager.conf.    Also,    there    should    be     a     symbolic     link
       /etc/tomoyo/policy/current which point to YY-MM-DD.hh:mm:ss/ directory.

       As a result, you can access the current policy files using /etc/tomoyo/domain_policy.conf,
       /etc/tomoyo/exception_policy.conf, /etc/tomoyo/profile.conf  and  /etc/tomoyo/manager.conf
       (or                                         /etc/tomoyo/policy/current/domain_policy.conf,
       /etc/tomoyo/policy/current/exception_policy.conf,  /etc/tomoyo/policy/current/profile.conf
       and  /etc/tomoyo/policy/current/manager.conf  if  you  prefer).  Also,  you can access the
       previous    policy     files     using     /etc/tomoyo/policy/previous/domain_policy.conf,
       /etc/tomoyo/policy/previous/exception_policy.conf,
       /etc/tomoyo/policy/previous/profile.conf and /etc/tomoyo/policy/previous/manager.conf.

       This program works like the cat program, if policy type is specified.

OPTIONS

       -e
           Print /sys/kernel/security/tomoyo/tomoyo/exception_policy to standard output.

       -d
           Print /sys/kernel/security/tomoyo/tomoyo/domain_policy to standard output.

       -p
           Print /sys/kernel/security/tomoyo/tomoyo/profile to standard output.

       -m
           Print /sys/kernel/security/tomoyo/tomoyo/manager to standard output.

       -s
           Print /sys/kernel/security/tomoyo/tomoyo/stat to standard output.

       <directory>
           Save policy to <directory>/policy/YY-MM-DD.hh:mm:ss/ directory instead of the  default
           /etc/tomoyo/policy/YY-MM-DD.hh:mm:ss/ directory.

       <remote_ip:remote_port>
           Instead of saving local policy, save policy via an agent waiting at port <remote_port>
           on IP address <remote_ip>.

EXAMPLES

       Save policy to disk:
       tomoyo-savepolicy

       Print /sys/kernel/security/tomoyo/tomoyo/exception_policy to standard output:
       tomoyo-savepolicy -e

       Retrieve     policy      from      192.168.1.1:10000      and      save      into      the
       "/etc/tomoyo/192.168.1.1/policy/YY-MM-DD.hh:mm:ss/" directory:
       tomoyo-savepolicy /etc/tomoyo/192.168.1.1/ 192.168.1.1:10000

BUGS

       If  there  are  any  bugs,  send an email with as much detail as possible to tomoyo-users-
       en@lists.sourceforge.jp

AUTHORS

       Main authors:

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

       Other contributers:

       ·   Jamie Nguyen <jamie AT tomoyolinux.co.uk>

           Man pages, documentation and website.

SEE ALSO

       tomoyo-editpolicy-agent(8), tomoyo-loadpolicy(8)

       See http://tomoyo.sourceforge.jp/ for more information.