All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: SELinux List <SELinux@tycho.nsa.gov>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Russell Coker <russell@coker.com.au>
Subject: [SEMANAGE/utility] Improve usage()
Date: Tue, 14 Feb 2006 05:55:04 -0500	[thread overview]
Message-ID: <43F1B708.3030205@cornell.edu> (raw)

[-- 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)

             reply	other threads:[~2006-02-14 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 10:55 Ivan Gyurdiev [this message]
2006-02-14 16:08 ` [SEMANAGE/utility] Improve usage() Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43F1B708.3030205@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=SELinux@tycho.nsa.gov \
    --cc=russell@coker.com.au \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.