Bug 464571 - Prelinking fails on RH 5 SP 2 due to "Could not set security context"
Prelinking fails on RH 5 SP 2 due to "Could not set security context"
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: prelink (Show other bugs)
i686 Linux
medium Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2008-09-29 12:12 EDT by Seppo Sahrakorpi
Modified: 2013-03-21 12:01 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-21 12:01:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Verbose output of failing prelinking (6.46 KB, application/x-gzip)
2008-09-29 12:12 EDT, Seppo Sahrakorpi
no flags Details

  None (edit)
Description Seppo Sahrakorpi 2008-09-29 12:12:45 EDT
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
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

#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");
Comment 1 Seppo Sahrakorpi 2008-09-30 12:16:49 EDT
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 12:01:42 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.