Bug 464571

Summary: Prelinking fails on RH 5 SP 2 due to "Could not set security context"
Product: Red Hat Enterprise Linux 5 Reporter: Seppo Sahrakorpi <seppo>
Component: prelinkAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: mnewsome, theo_nra
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-21 16:01:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Verbose output of failing prelinking none

Description Seppo Sahrakorpi 2008-09-29 16:12:45 UTC
Created attachment 317989 [details]
Verbose output of failing prelinking

Description of problem:

Prelinking fails on RH 5 SP 2 due to "Could not set security context"


rhel52-x8664:/home/seppo/Bugs/Bug_11521 > cat /etc/*-rel*
cat: /etc/lsb-release.d: Is a directory
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
rhel52-x8664:/home/seppo/Bugs/Bug_11521 > uname -a
Linux rhel52-x8664.totalviewtech.com 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
rhel52-x8664:/home/seppo/Bugs/Bug_11521 > rpm -q glibc
glibc-2.5-24
glibc-2.5-24
rhel52-x8664:/home/seppo/Bugs/Bug_11521 > 


/usr/bin/gcc -MD  -ansi  -g  -fPIC -c ./repro_dump_solib_corefile.c -o  repro_dump_solib_corefile.o

/usr/bin/gcc -o repro_dump_solib_corefile.so -shared  -Wl,-rpath,/usr/lib repro_dump_solib_corefile.o

/usr/sbin/prelink ./repro_dump_solib_corefile.so


rhel52-x8664:/home/seppo/Bugs/Bug_11521 > /usr/sbin/prelink ./repro_dump_solib_corefile.so
/usr/sbin/prelink: Could not set security context for /nfs/netapp0/user/home/seppo/Bugs/Bug_11521/repro_dump_solib_corefile.so: Operation not supported
/usr/sbin/prelink: Could not write prelink cache: Permission denied
rhel52-x8664:/home/seppo/Bugs/Bug_11521 > 


Attached please also find:

/usr/sbin/prelink -v ./repro_dump_solib_corefile.so > & ! prelink_verbose.txt


XXXXXXXXXXXXXXXXXXXX repro code:
#include <stdio.h>

long foo = 3;

int godump (int argc, const char *arg)
{
  int *bazzbarf = 0;
  printf ("Goodbye from %s\n", arg);
  fflush (stdout);
  foo -= 4;
  bazzbarf = (int*)foo;
  *bazzbarf = 123456789;
  printf ("Oops -- %s failed to crash\n", arg);
  return (argc);
}  /* godump */

/*
 * Dump a core file when called from a dlopened shared library.
 */
int dump_from_solib()
{
  return godump (1, "dump_from_solib");
}
XXXXXXXXXXXXXXXXXX

Comment 1 Seppo Sahrakorpi 2008-09-30 16:16:49 UTC
I just noticed that the first error message "security context" goes away, if one moves the .so file to local disk (original reproducer is on NFS mounted location)

But, even on /tmp (i.e. local disk) , I still get this error message
(second of the two errors I originally saw):

 /usr/sbin/prelink ./repro_dump_solib_corefile.so
/usr/sbin/prelink: Could not write prelink cache: Permission denied

Comment 2 Matt Newsome 2013-03-21 16:01:42 UTC
As Red Hat Enterprise Linux 5 has now entered Production Phase 2, this bug has been re-evaluated with the conclusion that a fix would not be appropriate at this time. Consequently this bug is being closed. Please contact your Red Hat representative if a review is required.