All of lore.kernel.org
 help / color / mirror / Atom feed
From: selinux770@tortenboxer.de
To: selinux@tycho.nsa.gov
Subject: wrong magic number (using old sources)
Date: Fri, 10 Aug 2007 12:10:03 +0200	[thread overview]
Message-ID: <20070810101003.128080@gmx.net> (raw)

Hi everyone,

i try to integrate SELinux into my Nokia 770 Internet Tablet. For this I'm using some old sources which fit best to the architecture (no compile errors or missing components). My current state is, that everything seems to work fine. "sestatus" tells me selinux is enabled.

But my problem is to compile a policy without error messages. It tells me, that loading fails because of a wrong magic number and I don't know where this error comes from. http://www.nsa.gov/selinux/list-archive/0206/2155.cfm tells me that it "Looks like your kernel doesn't have the same policy version as the database." I recompiled the kernel after making and make install the libraries... so I don't understand my error. A full log of the error is provided at the end of my mail.

What can be responsible for a wrong magic number? The python wrapper classes? The libraries? The policy source files i try to compile?

Thanks in advance for any help.

I'm using the following versions from the debian servers (original source packages, debian changes not included):
 Apr 10  2006 checkpolicy_1.30.orig.tar.gz
 Mar 23  2006 libselinux_1.30.orig.tar.gz
 Apr 10  2006 libsemanage_1.6.orig.tar.gz
 Mar 22  2006 libsepol_1.12.orig.tar.gz
 Apr 10  2006 policycoreutils_1.30.orig.tar.gz

Don't fit these versions?

The error log:
/usr/share/selinux/policy/beta1.0# make load
Makefile:154: warning: overriding commands for target
`/etc/selinux/./policy/policy.20'
Makefile:149: warning: ignoring old commands for target
`/etc/selinux/./policy/policy.20'
( cd domains/program/ ; for n in *.te ; do echo "define(\`$n')"; done
) > tmp/program_used_flags.te.tmp
( cd domains/misc/ ; for n in *.te ; do echo "define(\`$n')"; done )
>> tmp/program_used_flags.te.tmp
mv tmp/program_used_flags.te.tmp tmp/program_used_flags.te
Building policy.conf ...
m4  -Imacros -s flask/security_classes [... shortened by me ...]
 > policy.conf.tmp
Compiling policy ...
/usr/bin/checkpolicy  -o /etc/selinux/./policy/policy.20 policy.conf
/usr/bin/checkpolicy:  loading policy configuration from policy.conf
/usr/bin/checkpolicy:  policy configuration loaded
/usr/bin/checkpolicy:  writing binary representation (version 20) to
/etc/selinux/./policy/policy.20
Loading Policy ...
/usr/sbin/load_policy /etc/selinux/./policy/policy.20
/usr/sbin/load_policy:  Warning!  Policy file argument
(/etc/selinux/./policy/policy.20) is no longer supported, installed
policy is always loaded.  Continuing...
libsepol.policydb_read: policydb magic number 0x8c007cff does not
match expected magic number 0xf97cff8c or 0xf97cff8d
libsepol.policydb_from_image: policy image is invalid
libsepol.policydb_read: policydb magic number 0x8c8c7cff does not
match expected magic number 0xf97cff8c or 0xf97cff8d
libsepol.policydb_from_image: policy image is invalid
touch tmp/load
Building file contexts files...
Validating file contexts files ...
/usr/sbin/setfiles -q -c /etc/selinux/./policy/policy.20
file_contexts/file_contexts
libsepol.policydb_read: policydb magic number 0x8c007cff does not
match expected magic number 0xf97cff8c or 0xf97cff8d
libsepol.sepol_set_policydb_from_file: can't read binary policy: Success
Error reading policy /etc/selinux/./policy/policy.20: Success
make: *** [tmp/valid_fc] Error 1

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

--
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-08-10 10:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 10:10 selinux770 [this message]
2007-08-10 11:45 ` wrong magic number (using old sources) Stephen Smalley
2007-08-10 11:55   ` Stephen Smalley
2007-08-10 12:12   ` selinux770
2007-08-10 12:21     ` Stephen Smalley
2007-08-10 13:07       ` "Björn Vogel"
2007-08-10 13:19         ` Stephen Smalley
2007-08-10 14:12           ` selinux770
2007-08-11 18:07             ` selinux770
2007-08-13 12:55               ` Stephen Smalley
2007-08-15 15:44                 ` selinux770
2007-08-15 18:33                   ` Stephen Smalley
2007-08-16  8:05                     ` selinux770
2007-08-16 12:59                       ` Stephen Smalley
2007-08-16 15:14                         ` selinux770
2007-08-21 17:05                         ` [patch] libsepol: eliminate unaligned accesses (Was: Re: wrong magic number (using old sources)) Stephen Smalley
2007-08-21 19:21                           ` Eric Paris
2007-08-21 19:33                             ` Stephen Smalley
2007-08-23 15:08                           ` 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=20070810101003.128080@gmx.net \
    --to=selinux770@tortenboxer.de \
    --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.