All of lore.kernel.org
 help / color / mirror / Atom feed
* OpenMoko/JFFS2 sestatus difficulties
@ 2008-07-15 22:17 Willis Vandevanter
  2008-07-16  0:54 ` KaiGai Kohei
  2008-07-16 11:56 ` Stephen Smalley
  0 siblings, 2 replies; 24+ messages in thread
From: Willis Vandevanter @ 2008-07-15 22:17 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 2512 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello All,

   I am working on developing a targeted SELinux policy for
OpenMoko devices (www.openmoko.org) as a Google Summer Of Code project
(http://code.google.com/p/selinux-openmoko/).

Background:
I have cross-compiled the necessary SELinux code (libselinux-1.34.15,
checkpolicy-1.34.7, libsemanage-1.10.9, libsepol-1.16.14,
policycoreutils-1.34.16) and devloped a very basic targeted policy. I
ported the code on to the device. The policy compiles (make) and
installs (make install).

Where I am stuck:
When cross-compiling libselinux I get some strange behavior.
Specifically, I compiled libselinux with the following flags:
 make
CC=/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/cc ARCH=arm
LIBDIR=/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/lib
 I then copied the new libselinux.so.1 on to the device. sestatus
returns that SELinux is enabled and lists the correct policy version,
etc. *BUT* make relabel doesn't work. make relabel (or setfiles) gives
the following error:

file_contexts/file_contexts: Invalid argument make: *** [relabel] Error 1
The error seems to be that file_contexts is not being interpreted as a
regular file (i.e. S_ISREG(sb.st_mode) in setfiles.c is returning 0).
I assume this is because I compiled libselinux without the OpenMoko
specific header files (ie with my host-x86 /usr/include rather than
the device specific ones), so I re-compiled libselinux:

make
CC=/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/ccARCH=arm
LIBDIR=/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/lib
INCLUDEDIR=/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr/include
I then copied libselinux.so.1 on to the device. setfiles will now
correctly label the filesystem, but sestatus now returns SELinux as
disabled. I set /etc/selinux/config file to permissive and rebooted,
but it is still listed as disabled.

How is SELinux determined to be enabled? Could missing or
mis-configured header files in the OpenMoko /usr/include cause SELinux
to appear as disabled?

I apologize for the long email. The policy I am using is available at
http://code.google.com/p/selinux-openmoko/. The cross-compiled
binaries are also available. I am using a 2.6.24.7 kernel with SELinux
and JFFS2 XATTR enabled.

Thank you for your help,
  Willis


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIfSH2qCokMvr1WNARAuJdAJ0Q9iWp7+V0jTxen92WfE8RFnpJeACgiRyX
vAFzngclbVPHIZ/YckQi3Sg=
=P7dW
-----END PGP SIGNATURE-----

[-- Attachment #2: Type: text/html, Size: 2968 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-05-03 14:52 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 22:17 OpenMoko/JFFS2 sestatus difficulties Willis Vandevanter
2008-07-16  0:54 ` KaiGai Kohei
2008-07-16  3:13   ` Justin Mattock
2008-07-16  7:14     ` Russell Coker
2008-07-16  7:47       ` Justin Mattock
2008-07-16 11:56         ` Russell Coker
2008-07-16  5:15   ` Willis Vandevanter
2008-07-16  5:29     ` Yuichi Nakamura
2008-07-18  0:40     ` Mohamed Hassan
2008-07-16 11:56 ` Stephen Smalley
2008-07-16 15:03   ` Justin Mattock
2008-07-16 15:18     ` Stephen Smalley
2008-07-16 16:48       ` Justin Mattock
2008-07-16 16:56         ` Stephen Smalley
2008-07-16 18:21           ` Justin Mattock
2008-07-17 16:42       ` Attaching multiple user accounts to same home directory Hasan Rezaul-CHR010
2008-07-17 18:57         ` Daniel J Walsh
2008-07-17 19:20           ` Hasan Rezaul-CHR010
2008-07-17 19:52             ` Daniel J Walsh
2008-07-17 20:01               ` Hasan Rezaul-CHR010
2008-07-17 20:19                 ` Daniel J Walsh
2008-07-18 12:31                 ` Stephen Smalley
2010-04-30 20:32             ` Security Context after SSH-ing in Hasan Rezaul-CHR010
2010-05-03 14:52               ` Stephen Smalley

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.