All of lore.kernel.org
 help / color / mirror / Atom feed
From: selinux770@tortenboxer.de
To: selinux@tycho.nsa.gov
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: wrong magic number (using old sources)
Date: Fri, 10 Aug 2007 14:12:59 +0200	[thread overview]
Message-ID: <20070810121259.128050@gmx.net> (raw)
In-Reply-To: <1186746338.7233.11.camel@moss-spartans.epoch.ncsc.mil>

> You should be able to use the latest selinux userland even if using an
> older kernel; newer userlands can still generate older kernel policy
> formats.

The current stable userlands don't compile in my environment.
First, libselinux-1.34.7 throws a compiler error which seems to be caused by a gcc bug:
cc  -shared -o libselinux.so.1 avc.lo avc_internal.lo avc_sidtab.lo booleans.lo canonicalize_context.lo checkAccess.lo check_context.lo compute_av.lo compute_cr eate.lo compute_member.lo compute_relabel.lo compute_user.lo context.lo disable. lo enabled.lo fgetfilecon.lo freecon.lo freeconary.lo fsetfilecon.lo get_context _list.lo get_default_type.lo getenforce.lo getfilecon.lo getpeercon.lo init.lo i s_customizable_type.lo lgetfilecon.lo load_policy.lo lsetfilecon.lo matchmediaco n.lo matchpathcon.lo policyvers.lo procattr.lo query_user_context.lo rpm.lo seli nux_check_securetty_context.lo selinux_config.lo setenforce.lo setfilecon.lo set rans_client.lo seusers.lo -ldl -lsepol -L/usr/lib -Wl,-soname,libselinux.so.1,-z ,defs,-z,relro
matchpathcon.lo: In function `set_matchpathcon_flags':matchpathcon.c:(.text+0x27 0): undefined reference to `__tls_get_addr'
matchpathcon.lo: In function `process_line':matchpathcon.c:(.text+0x1cf0): undef ined reference to `__tls_get_addr'
matchpathcon.lo: In function `matchpathcon_init_prefix':matchpathcon.c:(.text+0x 1fdc): undefined reference to `__tls_get_addr'
matchpathcon.lo: In function `matchpathcon':matchpathcon.c:(.text+0x2eb0): undef ined reference to `__tls_get_addr'
matchpathcon.lo: In function `selinux_file_context_verify':matchpathcon.c:(.text +0x3400): undefined reference to `__tls_get_addr'
matchpathcon.lo:matchpathcon.c:(.text+0x3468): more undefined references to `__t ls_get_addr' follow
collect2: ld returned 1 exit status
make[1]: *** [libselinux.so.1] Error 1

It could be solved by removing -z,defs from the src/Makefile. I don't know the consequences but it works.

Second, the policycoreutils-1.34-6 won't compile because of a missing header file, which is not existent in my environment:
cc -g -Werror -Wall -W -I/usr/include -D_FILE_OFFSET_BITS=64   -c -o restorecond.o restorecond.c
restorecond.c:44:25: sys/inotify.h: No such file or directory
restorecond.c: In function `watch_list_free':
restorecond.c:144: warning: implicit declaration of function `inotify_rm_watch'
restorecond.c: In function `read_config':
restorecond.c:283: warning: implicit declaration of function `inotify_add_watch'
restorecond.c:283: error: `IN_MOVED_FROM' undeclared (first use in this function)
restorecond.c:283: error: (Each undeclared identifier is reported only once
restorecond.c:283: error: for each function it appears in.)
restorecond.c:283: error: `IN_MODIFY' undeclared (first use in this function)
restorecond.c: In function `watch':
restorecond.c:291: error: invalid application of `sizeof' to incomplete type `inotify_event'
restorecond.c:293: error: invalid application of `sizeof' to incomplete type `inotify_event'
restorecond.c:309: error: dereferencing pointer to incomplete type
restorecond.c:309: error: dereferencing pointer to incomplete type
restorecond.c:310: error: dereferencing pointer to incomplete type
restorecond.c:310: error: dereferencing pointer to incomplete type
restorecond.c:311: error: dereferencing pointer to incomplete type
restorecond.c:314: error: dereferencing pointer to incomplete type
restorecond.c:316: error: dereferencing pointer to incomplete type
restorecond.c:317: error: dereferencing pointer to incomplete type
restorecond.c:317: error: dereferencing pointer to incomplete type
restorecond.c:329: error: invalid application of `sizeof' to incomplete type `inotify_event'
restorecond.c:329: error: dereferencing pointer to incomplete type
restorecond.c: In function `watch_list_add':
restorecond.c:412: error: `IN_CREATE' undeclared (first use in this function)
restorecond.c:412: error: `IN_MOVED_TO' undeclared (first use in this function)
restorecond.c: In function `main':
restorecond.c:456: warning: implicit declaration of function `inotify_init'
restorecond.c:484: warning: implicit declaration of function `matchpathcon_fini'
make[1]: *** [restorecond.o] Error 1

That's why I'm using the old sources. They work.

> Those versions are consistent with one another.
> Kernel version?  Policy version?
kernel version is 2.6.16-omap1
How do I find out the policy version?


-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger


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

  parent reply	other threads:[~2007-08-10 12:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 10:10 wrong magic number (using old sources) selinux770
2007-08-10 11:45 ` Stephen Smalley
2007-08-10 11:55   ` Stephen Smalley
2007-08-10 12:12   ` selinux770 [this message]
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=20070810121259.128050@gmx.net \
    --to=selinux770@tortenboxer.de \
    --cc=sds@tycho.nsa.gov \
    --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.