From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Patch matchpathcon to eliminate file "/"
Date: Wed, 04 Mar 2009 15:39:31 -0500 [thread overview]
Message-ID: <49AEE703.306@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
So
matchpathcon /etc/
Will work the same as
matchpathcon /etc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkmu5wMACgkQrlYvE4MpobNK4gCgiVeXXEZcCMsJKXM7jqh6r1u3
OScAoLcmXBIR63gpvA8RS3g07pcPC6IF
=e+Re
-----END PGP SIGNATURE-----
[-- Attachment #2: libselinux-matchpathcon.patch --]
[-- Type: text/plain, Size: 422 bytes --]
--- nsalibselinux/utils/matchpathcon.c 2008-10-28 10:06:51.000000000 -0400
+++ libselinux-2.0.78/utils/matchpathcon.c 2009-03-04 15:23:52.000000000 -0500
@@ -101,6 +101,11 @@
for (i = optind; i < argc; i++) {
int mode = 0;
struct stat buf;
+ int len = strlen(argv[i]);
+ if (len > 1 && argv[i][len - 1 ] == '/') {
+ argv[i][len - 1 ] = '\0';
+ }
+
if (lstat(argv[i], &buf) == 0)
mode = buf.st_mode;
[-- Attachment #3: libselinux-matchpathcon.patch.sig --]
[-- Type: application/pgp-signature, Size: 72 bytes --]
next reply other threads:[~2009-03-04 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 20:39 Daniel J Walsh [this message]
2009-04-16 21:39 ` Patch matchpathcon to eliminate file "/" Chad Sellers
2009-05-18 15:27 ` Joshua Brindle
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=49AEE703.306@redhat.com \
--to=dwalsh@redhat.com \
--cc=selinux@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.