working linux and busybox versions
Hi all,
I am very new to this mailing list. Currently I am trying selinux on omap3. Can anyone tell me the working linux kernel and busybox version on omap3. Please feel free to give me other useful suggestions on this. Thanks.
Signature · 2 lines
Manav Hyderabad
Quoted 6 lines · Manvendra Pratap Singh
Hi all,
I am very new to this mailing list. Currently I am trying selinux on omap3. Can anyone tell me the working linux kernel and busybox version on omap3. Please feel free to give me other useful suggestions on this. Thanks.
This isn't the right list to ask general questions about Linux on omap3.
Quoted 1 line
From a quick google, it looks like you might find some useful resources
at:
http://www.muru.com/linux/omap/
Some prior material about SELinux on embedded devices is at:
http://elinux.org/SELinux
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Can anyone suggest me good guide for SELinux on omap3 (beagleboard). I tried it myself but I am not able to login after booting. On loging in root I get a msg "Cann't get SID for root". Please help me on this issue. Here take a look at boot-log.
[ 0.000000] Security Framework initialized [ 0.000000] SELinux: Initializing.
beagleboard login: root
login: can't get SID for root
Embinux Linux 1.1 beagleboard ttyS2
beagleboard login:
---
Manav
Hyderabad
On Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh <[email protected]
Quoted 33 lines
wrote:
Thanks for the information. I asked about working busybox and linux kernel versions because when I am enabling selinux in busybox (1.13.0), it is giving me lot of compilation errors and I think some code is also missing. Although the kernel (2.6.29) which I am using is working fine. If you tell anything more on this then it will be a great help.
--
Manav
HyderabadQuoted 15 lines · Stephen Smalley
Quoted 5 lines · Manvendra Pratap Singh
Hi Stephen,
May be I could not make myself clear to you. My question was not about linux on omap3, it was about SELinux on omap3. Anyways thanks for your reply. I will check the links given by you.
SELinux isn't platform-specific, and is a component of the Linux 2.6 kernel.
--
Stephen Smalley
National Security Agency
Quoted 6 lines · Manvendra Pratap Singh
Can anyone suggest me good guide for SELinux on omap3 (beagleboard). I tried it myself but I am not able to login after booting. On loging in root I get a msg "Cann't get SID for root". Please help me on this issue. Here take a look at boot-log.
Quoted 6 lines
[ 0.000000] Security Framework initialized [ 0.000000] SELinux: Initializing.beagleboard login: root
login: can't get SID for root
This message come from logind applet of busybox.
It tries to fetch the default security context of the root session.
Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts" or "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and try it again.
Thanks,
Quoted 51 lines
Embinux Linux 1.1 beagleboard ttyS2
beagleboard login:
---
Manav
HyderabadOn Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh <[email protected] <mailto:[email protected]>> wrote:
Thanks for the information. I asked about working busybox and linux kernel versions because when I am enabling selinux in busybox (1.13.0), it is giving me lot of compilation errors and I think some code is also missing. Although the kernel (2.6.29) which I am using is working fine. If you tell anything more on this then it will be a great help.
--
Manav
HyderabadOn Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley <[email protected] <mailto:[email protected]>> wrote:
On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap Singh wrote:
> Hi Stephen,
>
> May be I could not make myself clear to you. My question was
not about
> linux on omap3, it was about SELinux on omap3. Anyways thanks
for your
> reply. I will check the links given by you.SELinux isn't platform-specific, and is a component of the Linux 2.6 kernel.
--
Stephen Smalley
National Security Agency
Signature · 6 lines
KaiGai Kohei <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi KaiGai,
I checked /etc/selinux/base_policy/contexts/default_contexts and /etc/selinux/base_policy/contexts/users/root both in my rootfs and it is in correct place. But it still giving me same SID problem. Please give some idea.
Quoted 93 lines · Manvendra Pratap Singh
Thanks for reply KaiGai Kohei, I will follow your suggestion and let you know about it.
---
Manav
Hyderabad2010/3/17 KaiGai Kohei <[email protected]>
Quoted 81 lines · Manvendra Pratap Singh
Quoted 6 lines
Can anyone suggest me good guide for SELinux on omap3 (beagleboard). I tried it myself but I am not able to login after booting. On loging in root I get a msg "Cann't get SID for root". Please help me on this issue. Here take a look at boot-log.
Quoted 6 lines
[ 0.000000] Security Framework initialized [ 0.000000] SELinux: Initializing.beagleboard login: root
login: can't get SID for rootThis message come from logind applet of busybox.
It tries to fetch the default security context of the root session.
Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts" or "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and try it again.
Thanks,
Quoted 24 lines
Embinux Linux 1.1 beagleboard ttyS2
beagleboard login:
---
Manav
HyderabadOn Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh <[email protected] <mailto:[email protected]>> wrote:
Thanks for the information. I asked about working busybox and linux kernel versions because when I am enabling selinux in busybox (1.13.0), it is giving me lot of compilation errors and I think some code is also missing. Although the kernel (2.6.29) which I am using is working fine. If you tell anything more on this then it will be a great help.
Quoted 7 lines
--
Manav
HyderabadOn Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley <
Quoted 11 lines
<mailto:[email protected]>> wrote:
On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap Singh wrote:
> Hi Stephen,
>
> May be I could not make myself clear to you. My question was
not about
> linux on omap3, it was about SELinux on omap3. Anyways thanks
for your
> reply. I will check the links given by you.Quoted 1 line
SELinux isn't platform-specific, and is a component of the Linux
2.6
Quoted 8 lines
kernel.
--
Stephen Smalley
National Security Agency--
KaiGai Kohei <[email protected]>
Signature · 2 lines
Manav Hyderabad
Quoted 6 lines · Manvendra Pratap Singh
Hi KaiGai,
I checked
/etc/selinux/base_policy/contexts/default_contextsand/etc/selinux/base_policy/contexts/users/rootboth in my rootfs and it is in correct place. But it still giving me same SID problem. Please give some idea.
Does it have correct format? Does it contains an entry which matches with the security context of your logind daemon?
If your policy does not define domain-transitions appropriately, all the process may work with kernel_t, init_t or initrc_t. If so, get_default_context() cannot find out configured entry.
What is your policy type? The standard reference policy?, or others?
Thanks,
Quoted 111 lines
On Wed, Mar 17, 2010 at 11:38 AM, Manvendra Pratap Singh <[email protected] <mailto:[email protected]>> wrote:
Thanks for reply KaiGai Kohei, I will follow your suggestion and let you know about it.
---
Manav
Hyderabad2010/3/17 KaiGai Kohei <[email protected]
<mailto:[email protected]>>(2010/03/17 13:22), Manvendra Pratap Singh wrote:
> Can anyone suggest me good guide for SELinux on omap3
(beagleboard). I
> tried it myself but I am not able to login after booting. On
loging in
> root I get a msg "Cann't get SID for root". Please help me on
this
> issue. Here take a look at boot-log.
>
>
> [ 0.000000] Security Framework initialized
> [ 0.000000] SELinux: Initializing.
>
>
> beagleboard login: root
> login: can't get SID for rootThis message come from logind applet of busybox.
It tries to fetch the default security context of the root session.
Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts" or "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and try it again.
Thanks,
>
> Embinux Linux 1.1 beagleboard ttyS2
>
> beagleboard login:
>
>
>
> ---
> Manav
> Hyderabad
>
>
>
> On Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh > <[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>> wrote:
>
> Thanks for the information. I asked about working busybox
and linux
> kernel versions because when I am enabling selinux in busybox
> (1.13.0), it is giving me lot of compilation errors and I
think some
> code is also missing. Although the kernel (2.6.29) which
I am using
> is working fine. If you tell anything more on this then
it will be a
> great help.
>
>
> --
> Manav
> Hyderabad
>
>
>
> On Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley
<[email protected] <mailto:[email protected]>
> <mailto:[email protected] <mailto:[email protected]>>> wrote:
>
> On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap
Singh wrote:
> > Hi Stephen,
> >
> > May be I could not make myself clear to you. My question was
> not about
> > linux on omap3, it was about SELinux on omap3. Anyways thanks
> for your
> > reply. I will check the links given by you.
>
> SELinux isn't platform-specific, and is a component
of the Linux 2.6
> kernel.
>
> --
> Stephen Smalley
> National Security Agency
>
>
>--
KaiGai Kohei <[email protected] <mailto:[email protected]>>Signature · 2 lines
Manav Hyderabad
Signature · 6 lines
KaiGai Kohei <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
2010/3/17 KaiGai Kohei <[email protected]>
Quoted 8 lines
Quoted 6 lines · Manvendra Pratap Singh
Hi KaiGai,
I checked
/etc/selinux/base_policy/contexts/default_contextsand/etc/selinux/base_policy/contexts/users/rootboth in my rootfs and it is in correct place. But it still giving me same SID problem. Please give some idea.
Quoted 8 lines
Does it have correct format? Does it contains an entry which matches with the security context of your logind daemon?
If your policy does not define domain-transitions appropriately, all the process may work with
kernel_t,init_torinitrc_t. If so,get_default_context()cannot find out configured entry.
I am very new to SELinux, so I may not be able to answer your all questions correctly. I compiled base policy and then included it in my rootfs ( at /etc/selinux/base_policy). I compiled busbox-1.13.0 and 2.6.29 linux-kernel with SELinux support. I faced lot of errors and problems while compiling busybox with SELinux (utilities) support. then I booted beagle. And faced above problem. I did not try any extra code other then base_policy, Because initially I wanted to see the kernel booting with SELinux support and working SELinux utilities provided by busybox.
Quoted 2 lines
What is your policy type? The standard reference policy?, or others?
I think my policy is standard reference policy.
Quoted 124 lines
Thanks,
Quoted 30 lines
On Wed, Mar 17, 2010 at 11:38 AM, Manvendra Pratap Singh <[email protected] <mailto:[email protected]>> wrote:
Thanks for reply KaiGai Kohei, I will follow your suggestion and let you know about it.
---
Manav
Hyderabad2010/3/17 KaiGai Kohei <[email protected]
<mailto:[email protected]>>(2010/03/17 13:22), Manvendra Pratap Singh wrote:
> Can anyone suggest me good guide for SELinux on omap3
(beagleboard). I
> tried it myself but I am not able to login after booting. On
loging in
> root I get a msg "Cann't get SID for root". Please help me on
this
> issue. Here take a look at boot-log.
>
>
> [ 0.000000] Security Framework initialized
> [ 0.000000] SELinux: Initializing.
>
>
> beagleboard login: root
> login: can't get SID for rootQuoted 3 lines
This message come from logind applet of busybox.
It tries to fetch the default security context of the root
session.
Quoted 23 lines
Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts" or "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and try it again. Thanks, > > Embinux Linux 1.1 beagleboard ttyS2 > > beagleboard login: > > > > --- > Manav > Hyderabad > > > > On Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>Quoted 4 lines · wrote:
>
> Thanks for the information. I asked about working busybox
and linux
> kernel versions because when I am enabling selinux inbusybox
Quoted 18 lines
> (1.13.0), it is giving me lot of compilation errors and I
think some
> code is also missing. Although the kernel (2.6.29) which
I am using
> is working fine. If you tell anything more on this then
it will be a
> great help.
>
>
> --
> Manav
> Hyderabad
>
>
>
> On Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley
<[email protected] <mailto:[email protected]>
> <mailto:[email protected] <mailto:[email protected]>>> wrote:Quoted 8 lines
>
> On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap
Singh wrote:
> > Hi Stephen,
> >
> > May be I could not make myself clear to you. My question was
> not about
> > linux on omap3, it was about SELinux on omap3. Anywaysthanks
Quoted 23 lines
> for your
> > reply. I will check the links given by you. >
> SELinux isn't platform-specific, and is a component
of the Linux 2.6
> kernel.
>
> --
> Stephen Smalley
> National Security Agency
>
>
>--
KaiGai Kohei <[email protected] <mailto:[email protected]Quoted 1 line
Quoted 3 lines
--
Manav
Hyderabad--
KaiGai Kohei <[email protected]>
Signature · 2 lines
Manav Hyderabad
Quoted 22 lines · Manvendra Pratap Singh
2010/3/17 KaiGai Kohei <[email protected] <mailto:[email protected]>>
(2010/03/17 16:12), Manvendra Pratap Singh wrote:
> Hi KaiGai,
>
> I checked/etc/selinux/base_policy/contexts/default_contextsand >/etc/selinux/base_policy/contexts/users/rootboth in my rootfs
and it is
> in correct place. But it still giving me same SID problem. Please
give
> some idea.Does it have correct format? Does it contains an entry which matches with the security context of your logind daemon?
If your policy does not define domain-transitions appropriately, all the process may work with
kernel_t,init_torinitrc_t. If so,get_default_context()cannot find out configured entry.
Quoted 5 lines
I am very new to SELinux, so I may not be able to answer your all questions correctly. I compiled base policy and then included it in my rootfs ( at
/etc/selinux/base_policy). I compiled busbox-1.13.0 and 2.6.29 linux-kernel with SELinux support. I faced lot of errors and problems while compiling busybox with SELinux (utilities) support.
What kind of errors did you see?
If we cannot build busybox with SELinux support in the recent releases, we need to fix them.
Quoted 10 lines
then
I booted beagle. And faced above problem. I did not try any extra code other thenbase_policy, Because initially I wanted to see the kernel booting with SELinux support and working SELinux utilities provided by busybox.What is your policy type? The standard reference policy?, or others?
I think my policy is standard reference policy.
Hmm... It seems to me reason of the matter is still unclear.
Could you check the following items at least?
- The security policy was correctly loaded?
If OK, the kernel exports log messages as Stephen noted.
- What kind of matter you faced when you build busybox and libselinux? If you modified the code, what kind of changes were applied?
- Is the filesystem correctly labeled?
If files don't have valid security context, SELinux considers all the files have "unlabeled_t" context, but it is not expected for reference policy.
Right now, I doubt your /sbin/init could not load the security policy correctly. SELinux performs permissive mode, if it failed to load the policy. So, you can see the login prompt without any fails, because it means bootstrap sequence was correctly done.
Also note that /sbin/init applet of busybox also support to load the policy at first. If you applied different binary, it needs to be replaced.
Thanks,
Quoted 134 lines
Thanks, > On Wed, Mar 17, 2010 at 11:38 AM, Manvendra Pratap Singh > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote: > > Thanks for reply KaiGai Kohei, I will follow your suggestion and let > you know about it. > > --- > Manav > Hyderabad > > 2010/3/17 KaiGai Kohei <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>> > > (2010/03/17 13:22), Manvendra Pratap Singh wrote: > > Can anyone suggest me good guide for SELinux on omap3 > (beagleboard). I > > tried it myself but I am not able to login after booting. On > loging in > > root I get a msg "Cann't get SID for root". Please help me on > this > > issue. Here take a look at boot-log. > > > > > > [ 0.000000] Security Framework initialized > > [ 0.000000] SELinux: Initializing. > > > > > > beagleboard login: root > > login: can't get SID for root > > This message come from logind applet of busybox. > > It tries to fetch the default security context of the root session. > > Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts" or > "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and > try it again. > > Thanks, > > > > > Embinux Linux 1.1 beagleboard ttyS2 > > > > beagleboard login: > > > > > > > > --- > > Manav > > Hyderabad > > > > > > > > On Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh > > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: > > > > Thanks for the information. I asked about working busybox > and linux > > kernel versions because when I am enabling selinux in busybox > > (1.13.0), it is giving me lot of compilation errors and I > think some > > code is also missing. Although the kernel (2.6.29) which > I am using > > is working fine. If you tell anything more on this then > it will be a > > great help. > > > > > > -- > > Manav > > Hyderabad > > > > > > > > On Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: > > > > On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap > Singh wrote: > > > Hi Stephen, > > > > > > May be I could not make myself clear to you. My question was > > not about > > > linux on omap3, it was about SELinux on omap3. Anyways thanks > > for your > > > reply. I will check the links given by you. > > > > SELinux isn't platform-specific, and is a component > of the Linux 2.6 > > kernel. > > > > -- > > Stephen Smalley > > National Security Agency > > > > > > > > > -- > KaiGai Kohei <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> > > > > > > -- > Manav > Hyderabad -- KaiGai Kohei <[email protected] <mailto:[email protected]>>Signature · 2 lines
Manav Hyderabad
Signature · 6 lines
KaiGai Kohei <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
2010/3/18 KaiGai Kohei <[email protected]>
Quoted 30 lines
Quoted 3 lines · Manvendra Pratap Singh
2010/3/17 KaiGai Kohei <[email protected] <mailto:
Quoted 19 lines
(2010/03/17 16:12), Manvendra Pratap Singh wrote:
> Hi KaiGai,
>
> I checked/etc/selinux/base_policy/contexts/default_contextsand >/etc/selinux/base_policy/contexts/users/rootboth in my rootfs
and it is
> in correct place. But it still giving me same SID problem. Please
give
> some idea.Does it have correct format? Does it contains an entry which matches with the security context of your logind daemon?
If your policy does not define domain-transitions appropriately, all the process may work with
kernel_t,init_torinitrc_t. If so,get_default_context()cannot find out configured entry.Quoted 5 lines
I am very new to SELinux, so I may not be able to answer your all questions correctly. I compiled base policy and then included it in my rootfs ( at
/etc/selinux/base_policy). I compiled busbox-1.13.0 and 2.6.29 linux-kernel with SELinux support. I faced lot of errors and problems while compiling busybox with SELinux (utilities) support.
Quoted 5 lines
What kind of errors did you see?
If we cannot build busybox with SELinux support in the recent releases, we need to fix them.
This time I tried with busybox-1.11.3, Please have a look at the errors:
manav@manav-desktop:busybox-1.11.3$ make ARCH=arm
CROSS_CONFIG=arm-none-linux-gnueabi-
SPLIT include/autoconf.h -> include/config/*
GEN include/bbconfigopts.h
HOSTCC applets/usage
applets/usage.c: In function 'main':
applets/usage.c:27: warning: ignoring return value of 'write', declared with
attribute warn_unused_result
GEN include/usage_compressed.h
HOSTCC applets/applet_tables
In file included from applets/../include/busybox.h:10,
from applets/applet_tables.c:16:
applets/../include/libbb.h:56:29: error: selinux/selinux.h: No such file or
directory
applets/../include/libbb.h:57:29: error: selinux/context.h: No such file or
directory
applets/../include/libbb.h:58:27: error: selinux/flask.h: No such file or
directory
applets/../include/libbb.h:59:36: error: selinux/av_permissions.h: No such
file or directory
In file included from applets/../include/busybox.h:10,
from applets/applet_tables.c:16:
applets/../include/libbb.h:1007: error: expected ')' before 'sid'
applets/../include/libbb.h:1008: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'set_security_context_component'
applets/../include/libbb.h:1010: error: expected ')' before 'scontext'
make[1]: *** [applets/applet_tables] Error 1
make: *** [applets] Error 2Quoted 9 lines
Quoted 9 lines
then
I booted beagle. And faced above problem. I did not try any extra code other thenbase_policy, Because initially I wanted to see the kernel booting with SELinux support and working SELinux utilities provided by busybox.What is your policy type? The standard reference policy?, or others?
Quoted 8 lines
Quoted 1 line
I think my policy is standard reference policy.
Hmm... It seems to me reason of the matter is still unclear.
Could you check the following items at least?
- The security policy was correctly loaded?
If OK, the kernel exports log messages as Stephen noted.
yes, I will surely check for this, and let you know the results.
Quoted 9 lines
- What kind of matter you faced when you build busybox and libselinux? If you modified the code, what kind of changes were applied?
- Is the filesystem correctly labeled?
If files don't have valid security context, SELinux considers all the files have "unlabeled_t" context, but it is not expected for reference policy.
Quoted 8 lines
Right now, I doubt your
/sbin/initcould not load the security policy correctly. SELinux performs permissive mode, if it failed to load the policy. So, you can see the login prompt without any fails, because it means bootstrap sequence was correctly done.Also note that
/sbin/initapplet of busybox also support to load the policy at first. If you applied different binary, it needs to be replaced.
I have replaced the binary.
Thanks guys for your support, let me come up with results.
Quoted 144 lines
Thanks,
Quoted 33 lines
Thanks, > On Wed, Mar 17, 2010 at 11:38 AM, Manvendra Pratap Singh > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> wrote: > > Thanks for reply KaiGai Kohei, I will follow your suggestion and let > you know about it. > > --- > Manav > Hyderabad > > 2010/3/17 KaiGai Kohei <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>> > > (2010/03/17 13:22), Manvendra Pratap Singh wrote: > > Can anyone suggest me good guide for SELinux on omap3 > (beagleboard). I > > tried it myself but I am not able to login after booting. On > loging in > > root I get a msg "Cann't get SID for root". Please help me on > this > > issue. Here take a look at boot-log. > > > > > > [ 0.000000] Security Framework initialized > > [ 0.000000] SELinux: Initializing. > > > > > > beagleboard login: rootQuoted 8 lines
> > login: can't get SID for root > > This message come from logind applet of busybox. > > It tries to fetch the default security context of the root session. > > Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts"or
Quoted 19 lines
> "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and > try it again. > > Thanks, > > > > > Embinux Linux 1.1 beagleboard ttyS2 > > > > beagleboard login: > > > > > > > > --- > > Manav > > Hyderabad > > > > > > > > On Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap SinghQuoted 8 lines
> > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: > > > > Thanks for the information. I asked about working busybox > and linux > > kernel versions because when I am enabling selinux inbusybox
Quoted 63 lines
> > (1.13.0), it is giving me lot of compilation errors and I
> think some
> > code is also missing. Although the kernel (2.6.29) which
> I am using
> > is working fine. If you tell anything more on this then
> it will be a
> > great help.
> >
> >
> > --
> > Manav
> > Hyderabad
> >
> >
> >
> > On Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley
> <[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>
> > <mailto:[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>>> wrote:
> >
> > On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap
> Singh wrote:
> > > Hi Stephen,
> > >
> > > May be I could not make myself clear to you. My question was
> > not about
> > > linux on omap3, it was about SELinux on omap3. Anyways thanks
> > for your
> > > reply. I will check the links given by you.
> >
> > SELinux isn't platform-specific, and is a component
> of the Linux 2.6
> > kernel.
> >
> > --
> > Stephen Smalley
> > National Security Agency
> >
> >
> >
>
>
> --
> KaiGai Kohei <[email protected]
<mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>
>
>
>
>
>
> --
> Manav
> Hyderabad--
KaiGai Kohei <[email protected] <mailto:[email protected]>>Quoted 3 lines
--
Manav
Hyderabad--
KaiGai Kohei <[email protected]>
Signature · 2 lines
Manav Hyderabad
Quoted 65 lines · Manvendra Pratap Singh
2010/3/18 KaiGai Kohei <[email protected] <mailto:[email protected]>>
(2010/03/17 17:27), Manvendra Pratap Singh wrote:
>
>
> 2010/3/17 KaiGai Kohei <[email protected]
<mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>
>
> (2010/03/17 16:12), Manvendra Pratap Singh wrote:
> > Hi KaiGai,
> >
> > I checked/etc/selinux/base_policy/contexts/default_contextsand > >/etc/selinux/base_policy/contexts/users/rootboth in my rootfs
> and it is
> > in correct place. But it still giving me same SID problem. Please
> give
> > some idea.
>
> Does it have correct format? Does it contains an entry which
matches
> with the security context of your logind daemon?
>
> If your policy does not define domain-transitions appropriately,
> all the process may work withkernel_t,init_torinitrc_t.
> If so,get_default_context()cannot find out configured entry.
>
>
> I am very new to SELinux, so I may not be able to answer your all > questions correctly. I compiled base policy and then included it
in my
> rootfs ( at/etc/selinux/base_policy). I compiled busbox-1.13.0 and > 2.6.29 linux-kernel with SELinux support. I faced lot of errors and > problems while compiling busybox with SELinux (utilities) support.What kind of errors did you see?
If we cannot build busybox with SELinux support in the recent releases, we need to fix them.This time I tried with busybox-1.11.3, Please have a look at the errors:
manav@manav-desktop:busybox-1.11.3$ make ARCH=arm CROSS_CONFIG=arm-none-linux-gnueabi- SPLIT include/autoconf.h -> include/config/* GEN include/bbconfigopts.h HOSTCC applets/usage applets/usage.c: In function 'main': applets/usage.c:27: warning: ignoring return value of 'write', declared with attribute warn_unused_result GEN include/usage_compressed.h HOSTCC applets/applet_tables In file included from applets/../include/busybox.h:10, from applets/applet_tables.c:16: applets/../include/libbb.h:56:29: error: selinux/selinux.h: No such file or directory applets/../include/libbb.h:57:29: error: selinux/context.h: No such file or directory applets/../include/libbb.h:58:27: error: selinux/flask.h: No such file or directory applets/../include/libbb.h:59:36: error: selinux/av_permissions.h: No such file or directory
Quoted 8 lines
In file included from applets/../include/busybox.h:10,
from applets/applet_tables.c:16:
applets/../include/libbb.h:1007: error: expected ')' before 'sid'
applets/../include/libbb.h:1008: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'set_security_context_component'
applets/../include/libbb.h:1010: error: expected ')' before 'scontext'
make[1]: *** [applets/applet_tables] Error 1
make: *** [applets] Error 2It obviously looks like libselinux is not installed in your environment. Could you (cross) compile it and install first?
Quoted 212 lines
> then
> I booted beagle. And faced above problem. I did not try any extra
code
> other thenbase_policy, Because initially I wanted to see the kernel > booting with SELinux support and working SELinux utilities
provided by
> busybox.
>
> What is your policy type? The standard reference policy?, or
others?
>
>
> I think my policy is standard reference policy.Hmm... It seems to me reason of the matter is still unclear.
Could you check the following items at least?
- The security policy was correctly loaded?
If OK, the kernel exports log messages as Stephen noted.yes, I will surely check for this, and let you know the results.
- What kind of matter you faced when you build busybox and libselinux? If you modified the code, what kind of changes were applied?
- Is the filesystem correctly labeled?
If files don't have valid security context, SELinux considers all the files have "unlabeled_t" context, but it is not expected for reference policy.Right now, I doubt your
/sbin/initcould not load the security policy correctly. SELinux performs permissive mode, if it failed to load the policy. So, you can see the login prompt without any fails, because it means bootstrap sequence was correctly done.Also note that
/sbin/initapplet of busybox also support to load the policy at first. If you applied different binary, it needs to be replaced.I have replaced the binary.
Thanks guys for your support, let me come up with results.
Thanks, > Thanks, > > > On Wed, Mar 17, 2010 at 11:38 AM, Manvendra Pratap Singh > > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> wrote: > > > > Thanks for reply KaiGai Kohei, I will follow your suggestion > and let > > you know about it. > > > > --- > > Manav > > Hyderabad > > > > 2010/3/17 KaiGai Kohei <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>> > > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>> > > > > (2010/03/17 13:22), Manvendra Pratap Singh wrote: > > > Can anyone suggest me good guide for SELinux on omap3 > > (beagleboard). I > > > tried it myself but I am not able to login after booting. On > > loging in > > > root I get a msg "Cann't get SID for root". Please help me on > > this > > > issue. Here take a look at boot-log. > > > > > > > > > [ 0.000000] Security Framework initialized > > > [ 0.000000] SELinux: Initializing. > > > > > > > > > beagleboard login: root > > > login: can't get SID for root > > > > This message come from logind applet of busybox. > > > > It tries to fetch the default security context of the > root session. > > > > Put "/etc/selinux/<SELINUXTYPE>/contexts/default_contexts" or > > "/etc/selinux/<SELINUXTYPE>/contexts/users/root" correctly, and > > try it again. > > > > Thanks, > > > > > > > > Embinux Linux 1.1 beagleboard ttyS2 > > > > > > beagleboard login: > > > > > > > > > > > > --- > > > Manav > > > Hyderabad > > > > > > > > > > > > On Thu, Mar 11, 2010 at 3:38 PM, Manvendra Pratap Singh > > > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> > > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>>> wrote: > > > > > > Thanks for the information. I asked about working busybox > > and linux > > > kernel versions because when I am enabling selinux in busybox > > > (1.13.0), it is giving me lot of compilation errors and I > > think some > > > code is also missing. Although the kernel (2.6.29) which > > I am using > > > is working fine. If you tell anything more on this then > > it will be a > > > great help. > > > > > > > > > -- > > > Manav > > > Hyderabad > > > > > > > > > > > > On Wed, Mar 10, 2010 at 11:19 PM, Stephen Smalley > > <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> > > > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>> > <mailto:[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>>>> wrote: > > > > > > On Wed, 2010-03-10 at 22:44 +0530, Manvendra Pratap > > Singh wrote: > > > > Hi Stephen, > > > > > > > > May be I could not make myself clear to you. My question was > > > not about > > > > linux on omap3, it was about SELinux on omap3. Anyways thanks > > > for your > > > > reply. I will check the links given by you. > > > > > > SELinux isn't platform-specific, and is a component > > of the Linux 2.6 > > > kernel. > > > > > > -- > > > Stephen Smalley > > > National Security Agency > > > > > > > > > > > > > > > -- > > KaiGai Kohei <[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>> <mailto:[email protected] <mailto:[email protected]> > <mailto:[email protected] <mailto:[email protected]>>>> > > > > > > > > > > > > -- > > Manav > > Hyderabad > > > -- > KaiGai Kohei <[email protected] <mailto:[email protected]> <mailto:[email protected] <mailto:[email protected]>>> > > > > > -- > Manav > Hyderabad -- KaiGai Kohei <[email protected] <mailto:[email protected]>>Signature · 2 lines
Manav Hyderabad
Signature · 6 lines
KaiGai Kohei <[email protected]> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 6 lines · Manvendra Pratap Singh
Can anyone suggest me good guide for SELinux on omap3 (beagleboard). I tried it myself but I am not able to login after booting. On loging in root I get a msg "Cann't get SID for root". Please help me on this issue. Here take a look at boot-log.
Quoted 6 lines
[ 0.000000] Security Framework initialized [ 0.000000] SELinux: Initializing.beagleboard login: root
login: can't get SID for root
I suspect you haven't loaded a policy into the kernel.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 7 lines · Stephen Smalley
Quoted 6 lines · Manvendra Pratap Singh
Can anyone suggest me good guide for SELinux on omap3 (beagleboard). I tried it myself but I am not able to login after booting. On loging in root I get a msg "Cann't get SID for root". Please help me on this issue. Here take a look at boot-log.
Quoted 8 lines
Quoted 6 lines
[ 0.000000] Security Framework initialized [ 0.000000] SELinux: Initializing.beagleboard login: root
login: can't get SID for rootI suspect you haven't loaded a policy into the kernel.
...because I'd expect to see further SELinux: messages in your boot log, e.g.:
SELinux: Starting in permissive mode SELinux: Registering netfilter hooks SELinux: 8192 avtab hash slots, 135229 rules. SELinux: 8192 avtab hash slots, 135229 rules. SELinux: 8 users, 12 roles, 2944 types, 130 bools, 1 sens, 1024 cats SELinux: 74 classes, 135229 rules SELinux: Completing initialization. SELinux: Setting up existing superblocks. SELinux: initialized (dev dm-0, type ext4), uses xattr SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs SELinux: initialized (dev usbfs, type usbfs), uses genfs_contexts
...
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.