All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guido Trentalancia <guido@trentalancia.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@redhat.com>,
	Eric Paris <eparis@parisplace.org>,
	SELinux Mail List <selinux@tycho.nsa.gov>
Subject: Re: [PATCH v5] Fix includes for userspace tools and libraries (and possible security issue)
Date: Thu, 15 Sep 2011 19:03:26 +0200	[thread overview]
Message-ID: <1316106206.2202.33.camel@vortex> (raw)
In-Reply-To: <1316104531.16483.26.camel@moss-pluto>

Hello Stephen.

On Thu, 2011-09-15 at 12:35 -0400, Stephen Smalley wrote:
> On Thu, 2011-09-15 at 18:04 +0200, Guido Trentalancia wrote:
> > which results in an error caused by wrong compiler link flags being used
> > by the current SELinux userspace build system (wrong shared library path
> > to be more precise, i.e. wrong path after -L flag):
> > 
> > ...
> > make -C src install
> > make[2]: Entering directory
> > `/usr/src/selinux-userspace/git/selinux-test/libsemanage/src'
> > cc -O3 -march=corei7 -mtune=corei7 -fPIC -I../include
> > -I/opt/out/usr/include -D_GNU_SOURCE   -shared -o libsemanage.so.1
> > utilities.lo user_extra_record.lo modules.lo boolean_record.lo
> > ports_file.lo interfaces_file.lo interfaces_local.lo seuser_record.lo
> > user_base_record.lo booleans_file.lo genhomedircon.lo fcontexts_file.lo
> > booleans_local.lo database_llist.lo parse_utils.lo nodes_policydb.lo
> > policy_components.lo users_extra_file.lo debug.lo fcontext_record.lo
> > database_file.lo seusers_file.lo fcontexts_local.lo ports_local.lo
> > direct_api.lo seusers_local.lo context_record.lo nodes_file.lo
> > port_record.lo users_base_policydb.lo semanage_store.lo
> > users_base_file.lo fcontexts_policy.lo booleans_activedb.lo
> > users_policy.lo handle.lo booleans_policydb.lo nodes_local.lo
> > interfaces_policy.lo database.lo users_local.lo ports_policy.lo
> > booleans_active.lo nodes_policy.lo booleans_policy.lo users_join.lo
> > user_record.lo seusers_policy.lo database_join.lo database_activedb.lo
> > ports_policydb.lo interfaces_policydb.lo database_policydb.lo
> > iface_record.lo node_record.lo conf-scan.lo conf-parse.lo -lsepol
> > -lselinux -lbz2 -lustr -L/usr/lib64/
> > -Wl,-soname,libsemanage.so.1,--version-script=libsemanage.map,-z,defs
> > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../x86_64-unknown-linux-gnu/bin/ld: /usr/lib64//libselinux.a(selinux_config.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
> > /usr/lib64//libselinux.a: could not read symbols: Bad value
> > collect2: ld returned 1 exit status
> > make[2]: *** [libsemanage.so.1] Error 1
> > make[2]: Leaving directory
> > `/usr/src/selinux-userspace/git/selinux-test/libsemanage/src'
> > make[1]: *** [install] Error 2
> > make[1]: Leaving directory
> > `/usr/src/selinux-userspace/git/selinux-test/libsemanage'
> > make: *** [install] Error 1
> > 
> > It is sourcing dynamic libraries from /usr/lib64 or in other words from
> > LIBDIR, while you would expect it to source dynamic libraries
> > from /opt/out/usr/lib64 (or ~/out/usr/lib64 for the lucky ones that have
> > the tilde on their keyboard).
> 
> Is that with your patched tree?  

Nope, with original from git.

With my patch everything works all right. Otherwise why did I create the
patch in the first place ??

> Because I don't get that error, and it
> doesn't make sense based on my reading of the current
> libsemanage/src/Makefile and how it sets LIBDIR based on DESTDIR.

I only forgot to mention the flags that I used:

CFLAGS="-O3 -march=corei7 -mtune=corei7" LIBDIR=/usr/lib64
SHLIBDIR=/usr/lib64 DESTDIR=/opt/out make install

Regards,

Guido


--
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:[~2011-09-15 17:03 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 17:01 [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule Guido Trentalancia
2011-09-09 17:11 ` Guido Trentalancia
2011-09-09 17:17 ` Guido Trentalancia
2011-09-09 17:31   ` Eric Paris
2011-09-09 17:46     ` Guido Trentalancia
2011-09-09 17:59       ` [PATCH] Fix LIBDIR usage for load_policy (was Re: [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule) Guido Trentalancia
2011-09-09 21:19         ` [RFC] Userspace top-level Makefile (was Re: [PATCH] Fix LIBDIR usage for load_policy) Guido Trentalancia
2011-09-09 21:37           ` Joshua Brindle
2011-09-09 21:46             ` Guido Trentalancia
2011-09-09 22:35             ` Guido Trentalancia
2011-09-09 23:07               ` Eric Paris
2011-09-09 23:12                 ` Guido Trentalancia
2011-09-09 23:15                   ` Eric Paris
2011-09-09 23:25                     ` Guido Trentalancia
2011-09-09 23:45                       ` Guido Trentalancia
2011-09-09 23:56                         ` Guido Trentalancia
2011-09-10  1:04                           ` [RFC] Userspace git local build (was Re: [RFC] Userspace top-level Makefile) Guido Trentalancia
2011-09-10  2:39                             ` [RFC v2] Userspace git local build (was Re: [RFC] Userspace git local build) Guido Trentalancia
2011-09-11 23:22                     ` [RFC] Userspace top-level Makefile (was Re: [PATCH] Fix LIBDIR usage for load_policy) Joshua Brindle
2011-09-12  2:12                       ` Guido Trentalancia
2011-09-12 12:41                         ` Joshua Brindle
2011-09-12 20:17                           ` [RFC] Improve installation of userspace shared libraries (was Re: [RFC] Userspace top-level Makefile) Guido Trentalancia
2011-09-13 21:00                             ` Stephen Smalley
2011-09-13 21:12                               ` Guido Trentalancia
2011-09-13 21:35                                 ` Guido Trentalancia
2011-09-12 12:57     ` [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule Stephen Smalley
2011-09-12 20:29       ` [PATCH] Fix includes for userspace tools and libraries (was Re: [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule) Guido Trentalancia
2011-09-12 22:01         ` Eric Paris
2011-09-12 23:05           ` Guido Trentalancia
2011-09-13  0:53             ` Guido Trentalancia
2011-09-13  2:03               ` [PATCH v2] Fix includes for userspace tools and libraries (was Re: [PATCH] Fix includes for userspace tools and libraries) Guido Trentalancia
2011-09-13  2:41                 ` [PATCH v3] Fix includes for userspace tools and libraries (was Re: [PATCH v2] " Guido Trentalancia
2011-09-13 12:41           ` [PATCH] Fix includes for userspace tools and libraries (was Re: [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule) Stephen Smalley
2011-09-13 16:31             ` Guido Trentalancia
2011-09-13 17:20               ` Stephen Smalley
2011-09-13 18:33                 ` [PATCH] Fix includes for userspace tools and libraries (and possible security issue) Guido Trentalancia
2011-09-13 18:46                   ` Guido Trentalancia
2011-09-13 19:17                     ` Stephen Smalley
2011-09-13 18:48                   ` Stephen Smalley
2011-09-13 19:18                     ` Guido Trentalancia
2011-09-13 19:25                       ` Stephen Smalley
2011-09-13 19:34                         ` Stephen Smalley
2011-09-13 20:04                           ` Guido Trentalancia
2011-09-13 20:20                             ` Stephen Smalley
2011-09-13 20:49                               ` Guido Trentalancia
2011-09-13 20:26                             ` Eric Paris
2011-09-13 20:42                               ` Stephen Smalley
2011-09-13 21:09                                 ` Guido Trentalancia
2011-09-13 22:05                               ` [PATCH v4] " Guido Trentalancia
2011-09-13 23:33                                 ` [PATCH] Fix function arguments in libsemanage tests (was Re: [PATCH v4] Fix includes for userspace tools and libraries) Guido Trentalancia
2011-09-14  0:44                                   ` [PATCH] Change default make target for sepolgen " Guido Trentalancia
2011-09-14  1:10                                     ` [PATCH] Change default make target for some directories in the libraries (was Re: [PATCH] Change default make target for sepolgen) Guido Trentalancia
2011-09-14  1:20                                       ` [PATCH] Change default make target for the man directory of policycoreutils/mcstrans " Guido Trentalancia
2011-09-14 19:16                                     ` [PATCH] Change default make target for sepolgen (was Re: [PATCH v4] Fix includes for userspace tools and libraries) Eric Paris
2011-09-14 19:31                                   ` [PATCH] Fix function arguments in libsemanage tests " Eric Paris
2011-09-15  4:40                                     ` [PATCH v5] Fix makefiles for the userspace tools and libraries Guido Trentalancia
2011-09-15  9:40                                       ` [PATCH] Fix symbolic link creation for the userspace libraries Guido Trentalancia
2011-09-15 11:51                                       ` [PATCH v5] Fix makefiles for the userspace tools and libraries Guido Trentalancia
2011-09-14 12:56                                 ` [PATCH v4] Fix includes for userspace tools and libraries (and possible security issue) Stephen Smalley
2011-09-15  2:44                                   ` [PATCH v5] " Guido Trentalancia
2011-09-15 12:56                                     ` Stephen Smalley
2011-09-15 16:04                                       ` Guido Trentalancia
2011-09-15 16:35                                         ` Stephen Smalley
2011-09-15 17:03                                           ` Guido Trentalancia [this message]
2011-09-15 17:16                                             ` Stephen Smalley
2011-09-15 17:26                                               ` Guido Trentalancia
2011-09-15 18:14                                                 ` Stephen Smalley
2011-09-15 19:12                                                   ` [PATCH v5] Fix includes for userspace tools and libraries Guido Trentalancia
2011-09-15 20:00                                                     ` Stephen Smalley
2011-09-15 20:32                                                       ` Guido Trentalancia
2011-09-16 12:39                                                         ` Stephen Smalley
2011-09-16 12:50                                                           ` Guido Trentalancia
2011-09-17 20:48                                                       ` [PATCH v6] " Guido Trentalancia
2011-09-15 19:37                                                   ` [PATCH v5] " Guido Trentalancia
2011-09-15 17:15                                         ` [PATCH v5] Fix includes for userspace tools and libraries (and possible security issue) Eric Paris
2011-09-13 19:42                         ` [PATCH] " Guido Trentalancia
2011-09-13 17:08           ` [PATCH] Fix includes for userspace tools and libraries (was Re: [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule) Stephen Smalley
2011-09-09 17:31   ` [PATCH] Fix include semanage/handle.h for semanage_set_root() as used by semodule Guido Trentalancia

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=1316106206.2202.33.camel@vortex \
    --to=guido@trentalancia.com \
    --cc=eparis@parisplace.org \
    --cc=eparis@redhat.com \
    --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.