All of lore.kernel.org
 help / color / mirror / Atom feed
* inclusion of selinux.h in cred.h
@ 2011-08-17  5:09 Casey Schaufler
  2011-08-17 13:35 ` Eric Paris
  0 siblings, 1 reply; 4+ messages in thread
From: Casey Schaufler @ 2011-08-17  5:09 UTC (permalink / raw)
  To: selinux


Is there some reason that linux/selinux.h is
#included in linux/cred.h?

I've been building kernels with the inclusion
commented out and I have encountered no problems.

It's not a problem, but I am curious.


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

* Re: inclusion of selinux.h in cred.h
  2011-08-17  5:09 inclusion of selinux.h in cred.h Casey Schaufler
@ 2011-08-17 13:35 ` Eric Paris
  2011-08-17 15:34   ` Casey Schaufler
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Paris @ 2011-08-17 13:35 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: selinux

On Wed, Aug 17, 2011 at 1:09 AM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>
> Is there some reason that linux/selinux.h is
> #included in linux/cred.h?
>
> I've been building kernels with the inclusion
> commented out and I have encountered no problems.
>
> It's not a problem, but I am curious.

It can be safely moved, but not removed.  This was added when
creds_are_invalid() was implemented in the header, which makes SELinux
specific calls (see commit ed868a56988464cd31de0302426a5e94d3127f10).
This function was moved to kernel/cred.c in commit
74908a0009eb36054190ab80deb9671014efed96 but the header was not moved
with it.  If you want to send a patch to move the header from cred.h
to cred.c I think that would make a lot of sense.

-Eric

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

* Re: inclusion of selinux.h in cred.h
  2011-08-17 13:35 ` Eric Paris
@ 2011-08-17 15:34   ` Casey Schaufler
  2011-08-17 15:37     ` Eric Paris
  0 siblings, 1 reply; 4+ messages in thread
From: Casey Schaufler @ 2011-08-17 15:34 UTC (permalink / raw)
  To: Eric Paris; +Cc: selinux, Casey Schaufler

On 8/17/2011 6:35 AM, Eric Paris wrote:
> On Wed, Aug 17, 2011 at 1:09 AM, Casey Schaufler<casey@schaufler-ca.com>  wrote:
>> Is there some reason that linux/selinux.h is
>> #included in linux/cred.h?
>>
>> I've been building kernels with the inclusion
>> commented out and I have encountered no problems.
>>
>> It's not a problem, but I am curious.
> It can be safely moved, but not removed.  This was added when
> creds_are_invalid() was implemented in the header, which makes SELinux
> specific calls (see commit ed868a56988464cd31de0302426a5e94d3127f10).
> This function was moved to kernel/cred.c in commit
> 74908a0009eb36054190ab80deb9671014efed96 but the header was not moved
> with it.  If you want to send a patch to move the header from cred.h
> to cred.c I think that would make a lot of sense.

Enlightenment. Thank you.

Since creds_are_invalid() only exists under CONFIG_DEBUG_CREDENTIALS
I would expect the include of selinux.h to be under that ifdef as well.

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


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

* Re: inclusion of selinux.h in cred.h
  2011-08-17 15:34   ` Casey Schaufler
@ 2011-08-17 15:37     ` Eric Paris
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Paris @ 2011-08-17 15:37 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: selinux

On Wed, Aug 17, 2011 at 11:34 AM, Casey Schaufler
<casey@schaufler-ca.com> wrote:
> On 8/17/2011 6:35 AM, Eric Paris wrote:
>>
>> On Wed, Aug 17, 2011 at 1:09 AM, Casey Schaufler<casey@schaufler-ca.com>
>>  wrote:
>>>
>>> Is there some reason that linux/selinux.h is
>>> #included in linux/cred.h?
>>>
>>> I've been building kernels with the inclusion
>>> commented out and I have encountered no problems.
>>>
>>> It's not a problem, but I am curious.
>>
>> It can be safely moved, but not removed.  This was added when
>> creds_are_invalid() was implemented in the header, which makes SELinux
>> specific calls (see commit ed868a56988464cd31de0302426a5e94d3127f10).
>> This function was moved to kernel/cred.c in commit
>> 74908a0009eb36054190ab80deb9671014efed96 but the header was not moved
>> with it.  If you want to send a patch to move the header from cred.h
>> to cred.c I think that would make a lot of sense.
>
> Enlightenment. Thank you.
>
> Since creds_are_invalid() only exists under CONFIG_DEBUG_CREDENTIALS
> I would expect the include of selinux.h to be under that ifdef as well.

Seems quite reasonable to me...


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

end of thread, other threads:[~2011-08-17 15:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17  5:09 inclusion of selinux.h in cred.h Casey Schaufler
2011-08-17 13:35 ` Eric Paris
2011-08-17 15:34   ` Casey Schaufler
2011-08-17 15:37     ` Eric Paris

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.