From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Darrel Goeddel <dgoeddel@TrustedCS.com>,
Ivan Gyurdiev <ivg2@cornell.edu>,
Karl MacMillan <kmacmillan@tresys.com>,
SELinux <SELinux@tycho.nsa.gov>
Subject: Re: getseuserbyname patch
Date: Thu, 06 Oct 2005 09:27:35 -0400 [thread overview]
Message-ID: <43452647.4050205@redhat.com> (raw)
In-Reply-To: <1128604584.15836.67.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Mon, 2005-10-03 at 12:29 -0400, Stephen Smalley wrote:
>
>> Next question is error handling in
>> either getseuserbyname() itself or in the caller, given that you are
>> converting pam_selinux and the SELinux patches to always call this
>> function. If seusers.conf doesn't exist, getseuserbyname() could simply
>> set the *seuser to the linuxuser, set the *level to NULL and return
>> success to the caller, so that the caller would then call
>> get*_with_level with the Linux user and a NULL level, and that function
>> in turn would devolve to the normal get* call with the Linux user. That
>> would provide equivalence to the current behavior if seusers.conf
>> doesn't exist on the system. Downside is that if seusers.conf were
>> accidentally "lost", user might end up gaining greater access than
>> desired because user_u might be authorized for all categories in the
>> kernel policy. Similar issue exists if seusers.conf exists but contains
>> no default entry and no matching entry for the Linux user, as you
>> mentioned earlier. Possibly /etc/selinux/config should specify whether
>> user mapping is enabled or disabled explicitly? Then getseuserbyname
>> could use that to determine whether it should just fall back to the
>> Linux user and NULL level always, or try accessing seusers.conf.
>> Thoughts?
>>
>
> Any thoughts on this issue? I just added support for the optional
> SETLOCALDEFS= definition (defaults to 1, preserving current logic for
> setting local users and booleans) in /etc/selinux/config to libselinux
> for the new load policy logic, so I could also add support for an
> optional REQUIRESEUSERS= definition (defaulting to 0) to it. Then, if
> the definition is set to 1, and /etc/seusers.conf doesn't exist,
> getseuserbyname will return an error as it currently does; otherwise, it
> will just set *seuser to a copy of the linuxuser and set the level to
> NULL so that we end up with no change in behavior when not using
> seusers.conf. Of course, someone will ultimately need to update
> system-config-securitylevel to deal with these additional settings.
>
>
A couple of things I was thinking about.
1. The call should be to just return the username and level "" if the
file does not exist or if there is not default value and no match. So
the only time the call would return an error was if no memory.
2. The file should be put into a policy specific directories and be
shipped with the policy. When we move to LDAP, we will require a policy
type in the key for retrieving users. This way we can continue to allow
users to switch from one type of policy to another.
--
--
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.
next prev parent reply other threads:[~2005-10-06 13:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-27 18:25 getseuserbyname patch Daniel J Walsh
2005-09-28 16:39 ` Stephen Smalley
2005-09-29 13:24 ` Daniel J Walsh
2005-09-29 13:35 ` Stephen Smalley
2005-09-29 15:10 ` Stephen Smalley
2005-09-29 15:23 ` Daniel J Walsh
2005-09-29 15:20 ` Stephen Smalley
2005-09-29 19:11 ` Daniel J Walsh
2005-09-29 21:21 ` Stephen Smalley
2005-10-03 15:52 ` Stephen Smalley
2005-10-03 16:29 ` Stephen Smalley
2005-10-06 13:16 ` Stephen Smalley
2005-10-06 13:27 ` Daniel J Walsh [this message]
2005-10-06 13:38 ` Stephen Smalley
2005-10-06 13:52 ` Daniel J Walsh
2005-10-06 16:52 ` Stephen Smalley
2005-10-06 17:10 ` Daniel J Walsh
2005-10-06 18:33 ` 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=43452647.4050205@redhat.com \
--to=dwalsh@redhat.com \
--cc=SELinux@tycho.nsa.gov \
--cc=dgoeddel@TrustedCS.com \
--cc=ivg2@cornell.edu \
--cc=kmacmillan@tresys.com \
--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.