* [SEMANAGE/utility] Improve usage()
@ 2006-02-14 10:55 Ivan Gyurdiev
2006-02-14 16:08 ` Stephen Smalley
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Gyurdiev @ 2006-02-14 10:55 UTC (permalink / raw)
To: SELinux List, Stephen Smalley, Russell Coker
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
Maybe it's just me, but the semanage usage() is still not making sense...
Please apply if you consider this an improvement.
1) Document arguments to -ftype
2) Give example of a list of multiple roles (space separated, quoted)
3) Specify which protocols are allowed for ports
4) Abandon alphabetical ordering for more logical ordering.
Specifically, group primary options (-a/d/m/l) together, and then have a
section for object-specific options below.
[-- Attachment #2: semanage.usage_patch.diff --]
[-- Type: text/x-patch, Size: 1992 bytes --]
diff -Naurp --exclude-from excludes old/policycoreutils/semanage/semanage new/policycoreutils/semanage/semanage
--- old/policycoreutils/semanage/semanage 2006-01-27 10:00:54.000000000 -0500
+++ new/policycoreutils/semanage/semanage 2006-02-14 05:29:20.000000000 -0500
@@ -33,21 +33,36 @@ semanage user -{a|d|m} [-LrR] selinux_na
semanage port -{a|d|m} [-tr] [ -p protocol ] port | port_range\n\
semanage interface -{a|d|m} [-tr] interface_spec\n\
semanage fcontext -{a|d|m} [-frst] file_spec\n\
-semanage translation -{a|d|m} [-T] level\n\
+semanage translation -{a|d|m} [-T] level\n\n\
+\
+Primary Options:\n\
+\
-a, --add Add a OBJECT record NAME\n\
-d, --delete Delete a OBJECT record NAME\n\
+ -m, --modify Modify a OBJECT record NAME\n\
+ -l, --list List the OBJECTS\n\n\
+ -h, --help Display this message\n\
+ -n, --noheading Do not print heading when listing OBJECTS\n\n\
+\
+Object-specific Options (see above):\n\
-f, --ftype File Type of OBJECT \n\
- -h, --help display this message\n\
- -l, --list List the OBJECTS\n\
+ "" (all files) \n\
+ -- (regular file) \n\
+ -d (directory) \n\
+ -c (character device) \n\
+ -b (block device) \n\
+ -d (directory) \n\
+ -s (socket) \n\
+ -p (named pipe) \n\n\
+\
+ -p, --proto Port protocol (tcp or udp)\n\
-L, --level Default SELinux Level\n\
- -m, --modify Modify a OBJECT record NAME\n\
- -n, --noheading Do not print heading when listing OBJECTS\n\
- -p, --proto Port protocol\n\
- -r, --range MLS/MCS Security Range\n\
- -R, --roles SELinux Roles (Separate by spaces)\n\
- -s, --seuser SELinux user name\n\
+ -R, --roles SELinux Roles (ex: "sysadm_r staff_r")\n\
+ -T, --trans SELinux Level Translation\n\n\
+\
+ -s, --seuser SELinux User Name\n\
-t, --type SELinux Type for the object\n\
- -T, --trans SELinux Level Translation\n\
+ -r, --range MLS/MCS Security Range\n\
'
print message
sys.exit(1)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [SEMANAGE/utility] Improve usage()
2006-02-14 10:55 [SEMANAGE/utility] Improve usage() Ivan Gyurdiev
@ 2006-02-14 16:08 ` Stephen Smalley
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2006-02-14 16:08 UTC (permalink / raw)
To: Ivan Gyurdiev; +Cc: SELinux List, Russell Coker
On Tue, 2006-02-14 at 05:55 -0500, Ivan Gyurdiev wrote:
> Maybe it's just me, but the semanage usage() is still not making sense...
> Please apply if you consider this an improvement.
>
> 1) Document arguments to -ftype
> 2) Give example of a list of multiple roles (space separated, quoted)
> 3) Specify which protocols are allowed for ports
> 4) Abandon alphabetical ordering for more logical ordering.
> Specifically, group primary options (-a/d/m/l) together, and then have a
> section for object-specific options below.
Yes, I agree that this is clearer. Need to modify the man page in the
same manner, I think.
--
Stephen Smalley
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-14 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-14 10:55 [SEMANAGE/utility] Improve usage() Ivan Gyurdiev
2006-02-14 16:08 ` Stephen Smalley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.