File: ccs-editpolicy

package info (click to toggle)
ccstools 1.7.2-20100401-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 984 kB
  • ctags: 1,080
  • sloc: ansic: 20,286; sh: 890; makefile: 80
file content (71 lines) | stat: -rwxr-xr-x 1,963 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /bin/sh

if [ "$1" = "--version" ]
then
cat << EOF
ccs-editpolicy 1.7.2

Copyright (C) 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.
EOF
elif [ "$1" = "--help" ]
then
cat << EOF
Usage: ccs-editpolicy [{e|d|p|m|u}] [readonly] [refresh=interval] [policy_dir|remote_ip:remote_port]

This program edits TOMOYO Linux's policy currently loaded in the kernel.

 e     Set initial screen to exception policy editor.

 d     Set initial screen to domain policy editor. This is default.

 p     Set initial screen to profile editor.

 m     Set initial screen to manager editor.

 u     Set initial screen to memory usage.

 readonly             Browse mode. No editing is allowed.

 refresh=interval     Reload automatically for every interval seconds.

 policy_dir     Edit policy files stored in policy_dir directory instead for policy currently loaded. Must starts with / .

 remote_ip:remote_port     Edit policy via agent listening at specified IP address and port number. 

Examples:

# ccs-editpolicy
 Start policy editor with domain policy editor screen.

# ccs-editpolicy /etc/ccs/192.168.1.1/
 Edit policy stored in /etc/ccs/192.168.1.1/ directory.

# ccs-editpolicy 192.168.1.1:10000
 Edit policy via connecting to 192.168.1.1:10000 .

Usage with images are available at http://tomoyo.sourceforge.jp/1.7/tool-editpolicy.html

EOF
else
cat << EOF | help2man -i - -N -s 8 -n "Edit TOMOYO Linux's policy" $0 | gzip -9 > man8/ccs-editpolicy.8.gz
[SEE ALSO]

 ccs-loadpolicy (8)
 ccs-editpolicy-agent (8)

[NOTES]

 You need to register either path to this program ( /usr/sbin/ccs-editpolicy ) or a domain for this program in /proc/ccs/manager before invoking this program.

[AUTHORS]

 penguin-kernel _at_ I-love.SAKURA.ne.jp

 Line coloring feature is made by Yoshihiro Kusuno <yocto _at_ users.sourceforge.jp>.

EOF
fi
exit 0