All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SE Linux <selinux@tycho.nsa.gov>
Subject: Re: get_default_context_with_level seems to be broken in	libselinux.
Date: Mon, 12 Feb 2007 13:43:12 -0500	[thread overview]
Message-ID: <45D0B540.6070803@redhat.com> (raw)
In-Reply-To: <1171302713.24318.5.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Mon, 2007-02-12 at 11:16 -0500, Stephen Smalley wrote:
>   
>> On Mon, 2007-02-12 at 10:15 -0500, Daniel J Walsh wrote:
>>     
>>> Bugzilla's 211827 224637 
>>> <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224637>
>>>
>>> Show that the values after the comma are being dropped.
>>>
>>> Adding the attached patch fixes the problem.
>>>
>>> But I am not sure of the intended use of this code.  The current code 
>>> does not work and looks like it never worked.  Was there an intention 
>>> that this would work differently?
>>>       
>> If there is a bug, it needs to be fixed within
>> get_ordered_context_list_with_level, not here.
>>     
>
> Can you provide a test case to demonstrate the bug that doesn't involve
> sshd, e.g. simple use of getdefaultcon from libselinux appears to work
> as expected without your patch.
> $ ./getdefaultcon -l s2:c0,c1 sds system_u:system_r:sshd_t:SystemLow-SystemHigh
> ./getdefaultcon: sds from system_u:system_r:sshd_t:SystemLow-SystemHigh
> staff_u (null) s2:c0,c1 -> staff_u:staff_r:staff_t:Secret:A,B
>
> Applying the patch and re-trying, the only visible difference is that
> you end up with the untranslated level.  Is the problem in libselinux or
> sshd (or mcstransd)?
>
> Note that the current libselinux logic takes the provided level and puts
> it into the fromcon before computing the set of reachable contexts so
> that the levels are bounded by that level.  Rather than mutating the
> level afterward.
>
>   
Ok, it looks like the problem is somewhere in the translation daemon, 
not in libselinux.

ssh works when mcstrans is stopped, fails when it is running.

--
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.

      reply	other threads:[~2007-02-12 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 15:15 get_default_context_with_level seems to be broken in libselinux Daniel J Walsh
2007-02-12 16:16 ` Stephen Smalley
2007-02-12 17:51   ` Stephen Smalley
2007-02-12 18:43     ` 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=45D0B540.6070803@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --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.