From: Daniel J Walsh <dwalsh@redhat.com>
To: Chris PeBenito <pebenito@gentoo.org>
Cc: "Martin Orr" <martin@martinorr.name>,
"Václav Ovsík" <vaclav.ovsik@i.cz>,
selinux@tycho.nsa.gov
Subject: Re: refpolicy HEAD, Debian, patch for udev.te
Date: Tue, 04 Dec 2007 09:07:32 -0500 [thread overview]
Message-ID: <47555F24.1040402@redhat.com> (raw)
In-Reply-To: <1196551302.4808.6.camel@defiant.pebenito.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chris PeBenito wrote:
> On Fri, 2007-11-30 at 17:24 +0000, Martin Orr wrote:
>> On 30/11/07 15:55, Christopher J. PeBenito wrote:
>>> On Fri, 2007-11-30 at 16:30 +0100, Václav Ovsík wrote:
>>>> On Fri, Nov 30, 2007 at 09:38:33AM -0500, Christopher J. PeBenito wrote:
>>>>>> Corresponding code is in udev_node.c, function node_symlink().
>>>>>> if (strcmp(target, buf) == 0) {
>>>>>> info("preserve already existing symlink '%s' to '%s'", slink,
>>>>>> target);
>>>>>> selinux_setfilecon(slink, NULL, S_IFLNK);
>>>>>> goto exit;
>>>>>> }
>>>>> I'll add the rule. Perhaps someone should send up a patch to remove the
>>>>> setfilecon, and update the info message.
>>>> Mean you to compare the context of symlink and no setfilecon if it is
>>>> ok?
>>> Yes. Unless there's a good reason to keep it as-is that I don't know
>>> about.
>> Well I'll send a patch to udev. Should it just be the below, or should udev
>> be relabelling symlinks if it finds that they exist but are wrongly
>> labelled? How do I test for equality of security contexts?
>>
>> --- a/udev_node.c
>> +++ b/udev_node.c
>> @@ -146,7 +146,6 @@ static int node_symlink(const char *node, const char *slink)
>> buf[len] = '\0';
>> if (strcmp(target, buf) == 0) {
>> info("preserve already existing symlink '%s' to '%s'", slink, target);
>> - selinux_setfilecon(slink, NULL, S_IFLNK);
>> goto exit;
>> }
>> }
>
> Yes, thats what I was thinkin. Since the function is node_symlink(),
> I'm guessing there is a similar function for char and block node, etc?
> Those should be checked to make sure they don't do unneeded relabeling
> too.
>
My patch for Fedora adds the ability for udev to relabelto relabelfrom
device_t symlinks.
Even if you fix udev, these rules should be added. since you could label
the symlink as something other than device_t.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD4DBQFHVV8krlYvE4MpobMRAtxBAJY2hqXrkH7QkzBui/M4c0pm7AOrAKCmGb0L
ILY0KxrCkluMfknbtr43UA==
=1VyK
-----END PGP SIGNATURE-----
--
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.
prev parent reply other threads:[~2007-12-04 14:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 14:45 refpolicy HEAD, Debian, patch for udev.te Václav Ovsík
2007-11-27 18:49 ` Christopher J. PeBenito
2007-11-29 20:06 ` Martin Orr
2007-11-30 13:49 ` Václav Ovsík
2007-11-30 14:38 ` Christopher J. PeBenito
2007-11-30 15:30 ` Václav Ovsík
2007-11-30 15:55 ` Christopher J. PeBenito
2007-11-30 17:24 ` Martin Orr
2007-12-01 23:21 ` Chris PeBenito
2007-12-04 10:41 ` Martin Orr
2007-12-04 14:07 ` Daniel J Walsh [this message]
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=47555F24.1040402@redhat.com \
--to=dwalsh@redhat.com \
--cc=martin@martinorr.name \
--cc=pebenito@gentoo.org \
--cc=selinux@tycho.nsa.gov \
--cc=vaclav.ovsik@i.cz \
/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.