logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: ldconfig, /etc/ld.so.cache and prelink ?: msg#00166

Subject: Re: ldconfig, /etc/ld.so.cache and prelink ?
On Fri, 2004-10-29 at 10:31, Tom London wrote:
> Running strict/enforcing off of Rawhide.
> 
> While doing today's rawhide installs (yum),
> I monitored the label of /etc/ld.so.cache via
>     ls -lZ /etc/ld.so.cache
> 
> Several times during the installation of packages,
> the label of this file changed from
>      system_u:object_r:ld_so_cache_t
> to 
>      root:object_r:ld_so_cache_t 
> [OK, I think]
> or to
>      root:object_r:etc_t
> [Not OK, I think]
> 
> Each time it changed to etc_t, I ran
>     restorecon -vv /etc/ld.so.cache
> a few seconds later and got the typical
>      restorecon reset context 
> /etc/ld.so.cache->system_u:object_r:ld_so_cache_t
> 
> I'm guessing that when a package updates
> /etc/ld.so.cache, it may leave the label
> in a funny state, presuming that yum
> will fix it at the end.
> 
> Does this explain the 'intermittant' prelink
> error messages generated during package installations?

The problem is that ldconfig is presently being run in rpm_script_t
rather than ldconfig_t, and thus /etc/ld.so.cache is not being labeled
properly when it is re-created by ldconfig.  ldconfig is run from %post
as a helper.  I provided a rpm_execcon() libselinux function to avoid
this problem, but it isn't included in Fedora yet.

History of the problem is:
1) Originally, rpm only ran /bin/sh helpers in rpm_script_t; all others
ran with default transitions, so ldconfig ran in ldconfig_t (as desired)
but glibc_post_upgrade ran in rpm_t (and this ultimately led to sshd
being run in rpm_t upon the /etc/init.d/sshd condrestart).
2) rpm was changed to run all helpers in rpm_script_t to avoid the
glibc_post_upgrade problem.
3) ldconfig is now being run in rpm_script_t.  Oops.
4) I created a rpm_execcon function that checks for a default transition
for the helper and only sets explicitly to rpm_script_t if no automatic
transition is defined.  This puts ldconfig into ldconfig_t as desired
and everything else in rpm_script_t.


-- 
Stephen Smalley <sds@xxxxxxxxxxxxxx>
National Security Agency



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation