All of lore.kernel.org
 help / color / mirror / Atom feed
* Man page fix for matchpatchcon
@ 2007-12-06 18:11 Daniel J Walsh
  2007-12-06 21:16 ` Todd Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel J Walsh @ 2007-12-06 18:11 UTC (permalink / raw)
  To: Stephen Smalley, SE Linux

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHWDs1rlYvE4MpobMRAmDBAKC3EnBRz81RxtgLKcMSHnUvMqNJkwCcCyx+
QgfQjemToY0sD9lksoYX/wo=
=7auR
-----END PGP SIGNATURE-----

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 932 bytes --]

diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/matchpathcon.8 libselinux-2.0.45/man/man8/matchpathcon.8
--- nsalibselinux/man/man8/matchpathcon.8	2007-08-03 16:02:56.000000000 -0400
+++ libselinux-2.0.45/man/man8/matchpathcon.8	2007-12-06 11:22:40.000000000 -0500
@@ -6,7 +6,12 @@
 .B matchpathcon [-V] [-N] [-n] [-f file_contexts_file ] [-p prefix ] filepath...
 .SH "DESCRIPTION"
 .B matchpathcon
-Prints the file path and the default security context associated with it.
+Queries the system and prints the default security context associated with the filepath.
+
+Note: Identical paths can have different security contexts, depending on the file type. (regular file, directory, link file, char file ...)
+
+matchpathcon will check the system default context using the file type if the file exists.  If the file does not exist, it will get the context of a regular file.
+
 .SH OPTIONS
 .B \-n
 Do not display path.


[-- Attachment #3: diff.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Man page fix for matchpatchcon
  2007-12-06 18:11 Man page fix for matchpatchcon Daniel J Walsh
@ 2007-12-06 21:16 ` Todd Miller
  2007-12-07 20:13   ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: Todd Miller @ 2007-12-06 21:16 UTC (permalink / raw)
  To: Daniel J Walsh, Stephen Smalley, SE Linux

Comments inline, hopefully the mail client won't munge things too much.

 - todd

diff --exclude-from=exclude -N -u -r
nsalibselinux/man/man8/matchpathcon.8
libselinux-2.0.45/man/man8/matchpathcon.8
--- nsalibselinux/man/man8/matchpathcon.8	2007-08-03
16:02:56.000000000 -0400
+++ libselinux-2.0.45/man/man8/matchpathcon.8	2007-12-06
11:22:40.000000000 -0500
@@ -6,7 +6,12 @@
 .B matchpathcon [-V] [-N] [-n] [-f file_contexts_file ] [-p prefix ]
filepath...
 .SH "DESCRIPTION"
 .B matchpathcon
-Prints the file path and the default security context associated with
it.
+Queries the system and prints the default security context associated
with the filepath.

This should be a lower case 'q' since it is not the start of the
sentence.

+
+Note: Identical paths can have different security contexts, depending
on the file type. (regular file, directory, link file, char file ...)
+
+matchpathcon will check the system default context using the file type
if the file exists.  If 
the file does not exist, it will get the context of a regular file.

Should probably use ".B matchpathcon" here.

+
 .SH OPTIONS
 .B \-n
 Do not display path.


--
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] 3+ messages in thread

* RE: Man page fix for matchpatchcon
  2007-12-06 21:16 ` Todd Miller
@ 2007-12-07 20:13   ` Stephen Smalley
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Smalley @ 2007-12-07 20:13 UTC (permalink / raw)
  To: Todd Miller; +Cc: Daniel J Walsh, SE Linux

On Thu, 2007-12-06 at 16:16 -0500, Todd Miller wrote:
> Comments inline, hopefully the mail client won't munge things too much.
> 
>  - todd
> 
> diff --exclude-from=exclude -N -u -r
> nsalibselinux/man/man8/matchpathcon.8
> libselinux-2.0.45/man/man8/matchpathcon.8
> --- nsalibselinux/man/man8/matchpathcon.8	2007-08-03
> 16:02:56.000000000 -0400
> +++ libselinux-2.0.45/man/man8/matchpathcon.8	2007-12-06
> 11:22:40.000000000 -0500
> @@ -6,7 +6,12 @@
>  .B matchpathcon [-V] [-N] [-n] [-f file_contexts_file ] [-p prefix ]
> filepath...
>  .SH "DESCRIPTION"
>  .B matchpathcon
> -Prints the file path and the default security context associated with
> it.
> +Queries the system and prints the default security context associated
> with the filepath.
> 
> This should be a lower case 'q' since it is not the start of the
> sentence.
> 
> +
> +Note: Identical paths can have different security contexts, depending
> on the file type. (regular file, directory, link file, char file ...)
> +
> +matchpathcon will check the system default context using the file type
> if the file exists.  If 
> the file does not exist, it will get the context of a regular file.

Also, this last part wasn't right - if the file doesn't exist, then
matchpathcon passes a 0 mode to matchpathcon(3), which in turn does no
file mode/type matching at all in that case (so any entry will match).

Applied those fixes and committed.

> 
> Should probably use ".B matchpathcon" here.
> 
> +
>  .SH OPTIONS
>  .B \-n
>  Do not display path.
-- 
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] 3+ messages in thread

end of thread, other threads:[~2007-12-07 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 18:11 Man page fix for matchpatchcon Daniel J Walsh
2007-12-06 21:16 ` Todd Miller
2007-12-07 20:13   ` 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.